[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#605705: grub-pc: grub does not use desktop-base background image when / is encrypted (LUKS on LVM)



Package: grub-pc
Version: 1.98+20100804-8
Severity: normal
X-Debbugs-CC: debian-desktop@lists.debian.org

When / is encrypted, grub does not use the desktop-base background
image. There are multiple issues involved here...

The first is that the grub-pc postinst copies the wrong file
to /boot/grub during install:

        # /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 /usr/share/images/desktop-base/moreblue-orbit-grub.png ; do
            if test -e $i ; then
              cp $i /boot/grub/
            fi
          done
        fi

The second is that 05_debian_theme may override the wallpaper but then
does not try to copy the overridden file to /boot/grub:

        # this allows desktop-base to override our settings
        f=/usr/share/desktop-base/grub_background.sh
        if test -e ${f} ; then
          . ${f}
        else
          WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"
          COLOR_NORMAL="black/black"
          COLOR_HIGHLIGHT="magenta/black"
        fi
        
        ...
        
    for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
      if is_path_readable_by_grub $i ; then 
        bg=$i
        case ${bg} in
          *.png)                reader=png ;;
          *.tga)                reader=tga ;;
          *.jpg|*.jpeg) reader=jpeg ;;
        esac
        if test -e /boot/grub/${reader}.mod ; then
          echo "Found background image: `basename ${bg}`" >&2
          use_bg=true
          break
        fi
      fi
    done

Third is that there doesn't seem to be any cleanup of old images:

        pabs@chianamo:~$ ls -l /boot/grub/*.png 
        -rw-r--r-- 1 root root  83K Nov  9  2008 /boot/grub/debian-blueish-wallpaper-640x480.png
        -rw-r--r-- 1 root root  50K Nov 18 12:37 /boot/grub/moreblue-orbit-grub.png

Fourth 05_debian_theme doesn't appear to have been written with
corner-cases, flexibility or error handling in mind, for example:

      * if grub_background.sh somehow doesn't define WALLPAPER, things
        will break. instead it should fall back on the default wallpaper
      * fails to account for anything other than png/jpeg/tga
      * no way for users to override the default easily
      * only allows for one package (desktop-base) to set the default
        wallpaper

All this hardcoding of moreblue-orbit is not a good idea either. If you
are going to hard-code this stuff, at least hard-code the default image
name.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing'), (600, 'unstable'), (550, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]    1.5.36          Debian configuration management sy
ii  grub-common              1.98+20100804-8 GRand Unified Bootloader, version 
ii  libc6                    2.11.2-7        Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1       2:1.02.48-4     The Linux Kernel Device Mapper use
ii  ucf                      3.0025+nmu1     Update Configuration File: preserv

Versions of packages grub-pc suggests:
ii  desktop-base                  6.0.2      common files for the Debian Deskto

-- 
bye,
pabs

http://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: