| Monday October 20th 2014

Feedburner

Subscribe by email:

We promise not to spam/sell you.


Search Amazon deals:

HOWTO: Make your own background image for GRUB bootloader


No matter what distribution of Linux you’re using, the default GRUB bootloader background image is probably pretty generic. Or, maybe you just want to personalize it. GRUB single user mode select screenSince your system isn’t booted very far, your tool set is rather limited, so there are strict requirements for the image.

  • It must be exactly 640×480
  • It can only use up to 14 colors
  • It must be in .xpm file format

That’s pretty limited when you’re used to digital cameras taking high resolution pictures with millions of colors, but it will have to do. Use Gimp or other image editing software (I like mtpaint, available in the standard Fedora YUM repositories) to chop your image if you want to play with it visually first.


If you’re all set, or you already have the image ready, use ImageMagick to get your chosen image down to spec. (ImageMagick is usually installed by default, but is available in the standard repos)

$ convert image.png -colors 14 -resize 640×480 grubimg.xpm

ImageMagick’s “convert” tool will recognize the file types and take care of all the “magick” for you. All that’s left to do is put this image file in your grub.conf

splashimage=(hd0,0)/boot/grub/grubimg.xpm

You can also gzip the image file if you want, in which case you would probably call it grubimg.xpm.gz. You can call it splash or fallout3 or whatever, as long as you specify the path to it in grub.conf.

Fallout 3

Note: I used this image from Fallout 3 which required me to open it in GIMP and change the color mode to indexed. (Image -> Mode -> Indexed) and then I changed the maximum colors to 14. I thought it was a good picture to use because there’s not much variation of color in the first place. I can’t really see a difference in the before & after except for the smaller file size.

Related Posts: On this day...

Leave a Reply

You must be logged in to post a comment.