Bug#617196: grub-pc: GRUB_GFXMODE silently ignored if font unavailable

Luca Capello luca at pca.it
Fri Jan 2 22:03:16 UTC 2015


found 617196 1.99-27+deb7u2
tags 617196 + patch
user contact at itopie.ch
usertags 617196 + itopie.ch-installation
thanks

Hi there,

On Fri, 20 Dec 2013 21:50:25 -0800, Ben Longbons wrote:
> I managed to fix the core problem by doing:
> cp /usr/share/grub/unicode.pf2 /boot/grub/unicode.pf2
> Obviously it can't read any partition but /boot since it's on encrypted LVM.

This bug is still present on an up-to-date wheezy, but here /boot is on
RAID-1 and everything else on RAID-1 + LUKS + LVM.

Actually, the "problem" is in /usr/sbin/grub-mkconfig:172, then
reflected in /etc/grub.d/00_header:126, exactly because of the encrypted
partition.

What is strange is that this was bug #542314 fixed in 1.96+20090825-1
and indeed /var/lib/dpkg/info/grub-pc.postinst:634 deals with it, but
not at package configuration time since /boot/grub/grub.cfg has not been
created yet.  Indeed, a simple `dpkg-reconfigure grub-pc` is enough to
fix this bug ;-)

I would say that the easiest solution would be unconditionally copy the
font, here is a patch against 2.02~beta2-16:

--8<---------------cut here---------------start------------->8---
--- /var/lib/dpkg/info/grub-pc.postinst	2014-11-06 14:52:43.000000000 +0100
+++ /home/users/luca.capello/Downloads/grub-pc.postinst	2015-01-02 22:58:29.662664200 +0100
@@ -663,13 +663,13 @@
         fi
 
         # /boot/grub/ has more chances of being accessible by GRUB
-        if test -e /boot/grub/grub.cfg ; then
-          for i in /usr/share/grub/unicode.pf2 ; do
-            if test -e $i ; then
-              cp $i /boot/grub/
-            fi
-          done
-        fi
+        # uncoditionally copy the font because if the package is being
+        # installed there is no configuration yet, see #617196
+        for i in /usr/share/grub/unicode.pf2 ; do
+          if test -e $i ; then
+            cp $i /boot/grub/
+          fi
+        done
 
         if [ "$fix_mixed_system" ]; then
           # These never contain any valuable information, and they aren't
--8<---------------cut here---------------end--------------->8---

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20150102/dfb4e7f6/attachment.sig>


More information about the Pkg-grub-devel mailing list