2012年9月3日 星期一

Quickly Customize GRUB2 Background Image

  1. (Optional) Reboot, press "c" when GRUB2 menu appear, and input 'vbeinfo' to check available resolutions for GRUB2. 'exit' to quit.
  2. Resize picture to fit size, you can use ImageMagick to do this in one line without GIMP:
  3. convert -resize 1366x768^ -gravity Center -extent 1366x768 the_image_you_like.jpg background.jpg
  4. cp background.jpg /boot/grub/
  5. sudo update-grub
  6. If output like this, it successful: 
Generating grub.cfg ...
Found background image: background.jpg
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Windows Recovery Environment (loader) on /dev/sda2
done
        Note for convert:
            The "^" is a geometry option flag, which will resize image base on the smaller fitting dimension.
            The parameter -extent will crop the region out of 1366x768.
            This command is also very useful when setting wallpaper in LXDE due to its poor capability in cropping image.

        I also found some guide on Google to customize GRUB2 background image but they need to edit /etc/grub.d/05_debian_theme or 06_mint_theme. However, after some test, it seems not essential because Mint13 have no GRUB2 background by default. (Tested on Mint13).

        Update:
        If your distro has GRUB2 background image by default, check /boot/grub and /usr/share/images/desktop-base.
        update-grub will scan these directories one by one, and the early one will be applied.

        0 個回應: