The Linux operating system usually begins its boot process with a screen or Start menu displayed by the boot Grub.

This background image is in the file / boot / grub / splash.xpm.gz.

Grub is possible to customize the home screen with your favorite photo, the logo of your business or company and even a cartoon or animated character.

Preparing the Image

  1. The image must be 640 x 480 pixels and have a maximum of 14 colors, that because the VGA mode used during boot has a resolution of 640 x 480 pixels with 16 colors and 2 color reserved for text (black and white) . If we use the Gimp graphics editor, simply make sure that the image or picture to be 640 x 480 pixels (the title bar of the picture in Gimp shows the image size) and then select the menu option Image> Mode> indexing, entering as 14 as the maximum number of colors.
  2. Save the image to the / boot / grub / with an extension. Xpm.gz
  3. Edit the file / boot / grub / grub.conf so that the parameters of splashimage point to our image. This path will be on the start of the partition / boot, so that / boot / grub / myimage.xpm.gz be written as (hdX, Y) / grub / mi_imagen.xpm.gz .- where X is the number of disk BIOS / Grub and Y is the number of partitions in the BIOS / Grub.
file: / boot / grub / grub.conf
  # Grub.conf generated by anaconda 
 # 
  # Note that you do not have to rerun grub after making changes to this file 
  # NOTICE: You have a / boot partition.  This means that 
  # All kernel and initrd paths are relative to / boot /, eg. 
  # Root (hd0, 0) 
  # Kernel / vmlinuz-version ro root = / dev/concord3/f8root 
  # Initrd / initrd-version.img 
  # boot = / dev/md0 
  default = 0 
  timeout = 5 
  splashimage = (hd0, 0) / grub / myimage.xpm.gz 
 hiddenmenu 
  title Fedora (2.6.23.15-137.fc8) 
  root (hd0, 0) 
  kernel / vmlinuz-2.6.23.15-137.fc8 ro root = / dev/concord3/f8root rhgb quiet 
  initrd / initrd-2.6.23.15-137.fc8.img 
  title Fedora (2.6.23.14-115.fc8) 
  root (hd0, 0) 
  kernel / vmlinuz-2.6.23.14-115.fc8 ro root = / dev/concord3/f8root rhgb quiet 
  initrd / initrd-2.6.23.14-115.fc8.img 

Reboot to see the result.

The XPM format used by Grub is very peculiar, is a piece of source code in C table containing a translation of ascii-to-color and image is encoded in ASCII art. This can be checked using gunzip to unzip the file and then see it as text.

Tips for preparing an image of Grub Splash

  • Choose an image with few colors so as not to cause too much contrast or solarization to convert the format indexed.
  • Grub displays the text in white letters with a black shadow to be seen against any background color. It is better to avoid the white or other light colors.
  • We can use symbols with links grub. With a little scripts (/ etc / rc.local, for example), we may have a different background or wallpaper in every reboot of the system.

Popularity: 1% [?]