Bug#604699: grub2: Fails to enable the background image with encrypted LVM

Cyril Brulebois kibi at debian.org
Tue Nov 23 15:47:32 UTC 2010


Package: grub2
Version: 1.98+20100804-8
Severity: normal

Hi,

even with a fresh grub-pc/grub2 (re)installation, grub can't set the
background image, because is_path_readable_by_grub() on the file (as set
by desktop-base, i.e. desktop-grub.png pointing to spacefun) fails,
because grub-probe fails.

I presume this is due to its accessing /dev/sda$foo directly, which is
an encrypted LVM. As a workaround, I tried copying the wallpaper under
/boot/grub (which is on a separate, non-encrypted partition), which
worked fine. For reference, the snippet I used in 05_debian_theme:
| # this allows desktop-base to override our settings
| f=/usr/share/desktop-base/grub_background.sh
| if test -e ${f} ; then
|   . ${f}
↓
|   # Do a little dance to make the image readable by grub:
|   if [ ! -z "$WALLPAPER" ]; then
|     cp $WALLPAPER /boot/grub/$(basename $WALLPAPER)
|     WALLPAPER=/boot/grub/$(basename $WALLPAPER)
|   fi
↑
| else
|   WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"
|   COLOR_NORMAL="black/black"
|   COLOR_HIGHLIGHT="magenta/black"
| fi
(additional lines between arrows)

I'm no grub guru, so I can't tell about the possible impact of such a
chance, but I'd tend to think it might be reasonable to:
 - test whether the path is readable;
 - if it's not, attempt a copy to /boot/grub, adapt $WALLPAPER, and try
   again.

What do you think?

Mraw,
KiBi.





More information about the Pkg-grub-devel mailing list