X
Tech

Configuring GRUB for Graphic Booting

As I have mentioned previously, there are two popular versions of GRUB in use today, the "standard" or original version, which does only text display while booting (with background colors), and the "gfxboot" version, which can display and update graphic files while booting. I will concentrate on the gfxboot version here.
Written by J.A. Watson, Contributor

As I have mentioned previously, there are two popular versions of GRUB in use today, the "standard" or original version, which does only text display while booting (with background colors), and the "gfxboot" version, which can display and update graphic files while booting. I will concentrate on the gfxboot version here.

The graphic information to be displayed is specified in the GRUB configuration file (typically /boot/grub/menu.lst) using the gfxmenu keyword. The file is usually called message (openSUSE and friends) or gfxmenu (Mandriva and friends), but in fact in could be called pretty much anything you want. Likewise, the file is usually located in the /boot directory, although I have also seen it in /boot/grub, but of this also can be pretty much anything you like.

This only gets slightly tricky when you have a multi-boot Linux system, and some versions have the graphical GRUB while others don't. Basically, what happens is that if you use the simplest specification of the graphic file, like this:

gfxmenu /boot/message

When it boots, GRUB finds this file and displays its contents. But if you have multiple Linux partitions, and you specify the others with the configfile keyword, when you select one of them from the boot list, GRUB goes looking for the gfxmenu file in those partitions, which will result in an error message if the file is not found.

The simple way around this problem is to always include the disk and partition specification with the file specification, like this:

gfxmenu (hd0,7)/boot/message

This way, if the GRUB configuration file in the new partition doesn't contain a gfxmenu specification, GRUB will continue to use the one it already has; if there is a new specification, it will of course switch to displaying from that one. Of course, be sure to include the partition specification in all of the GRUB config files you have...

jw 13/1/2009

Editorial standards