Graphical GRUB
From ArchWiki
[edit] Introduction
This is a mod to the current grub package found on Arch base repository which adds support for a splash image (a background).
While the patch is not officially supported by grub developers due to their policy of only bugfixes on their grub 0.9x series, it is used by many distributions like Fedora/Red Hat, SuSE, Gentoo, MEPIS, and others. The patch I use is based on the one included by Fedora Core 3 grub srpm and rediffed to the latest vanilla grub version.
After the installation is done, you will have a grub screen with the following background. http://www.mundolink.net/users/mariov/images/arch-grub-096.png
Due to demand, the old splash image is optionally available for those who like it more.
http://www.mundolink.net/users/mariov/images/arch-grub.png
New: In addition to the standard package, a new alternate one is available for those who follow the Reiser4FShowto steps and want a grub package with both reiserfs4 and splashimage.
[edit] Pre Install Notes
- Make a copy of your menu.lst for backup. It is not replaced by the installation steps below, unless you remove your current grub package.
- We are dealing with your boot system info, so there is a small chance that things can be screw up. But I haven't got any issue.
- If want to compile the package with the old splash image, or your custom splash image instead of the current one, you need to edit the PKGBUILD and change the md5sum assigned to
splash.xpm.gz. - The alternate package with reiser4 requires libaal, reiser4progs, and a reiser4 patched kernel. Those are not on Arch repos, you can get them and read about all the process involved on Reiser4FShowto, or grab my updated PKGBUILDs:libaal, and reiser4progs.
- Be sure not to upgrade grub via pacman after following this guide, as the version used in this guide is older than the current version available via pacman. You can set pacman to ignore any grub upgrades by editing your pacman.conf accordingly.
[edit] Installation
Note: Reiser package not updated since reiser patch need to be rediffed.
Files changed for 0.97-1: PKGBUILD, menu.lst.
Note: grub-gfx can be found in the community-repo, so you just need to edit the menu.lst and add the splash file to your /boot directory.
1. Grab the following files and save them on a folder on your /var/abs/local path:
- PKGBUILD.
- menu.lst
- install-grub o copiarlo desde /var/abs/base/grub/install-grub
- grub-0.97-graphics.patch
- splash.xpm.gz* Only for reiser4 support: grab the reiser4 patch
2. Build the package:
# makepkg
3. Install the package:
# pacman -U grub-0.97-1.pkg.tar.gz
4. Edit your menu.lst and add the following splash instruction anywhere before your OS's menu entries:
splashimage /boot/grub/splash.xpm.gz
For example:
# general configuration: timeout 5 default 0 splashimage /boot/grub/splash.xpm.gz
Important: Since grub 0.96-4 the splash path is /boot/grub/splash.xpm.gz and not /grub/splash.xpm.gz. Previous users need to correct the path.
Actually you should have: splashimage /path/to/your/image.xpm{.gz} relative to the grub's root
partition
If you have separate partition for /boot:
splashimage /grub/splash.xpm.gz
If you don't:
splashimage /boot/grub/splash.xpm.gz
Wrong path makes grub hang with black screen and blinking cursor (without the prompt) :-(
5. Install the new grub boot images to your /boot dir. Change x with your boot drive letter (ie. hda):
# install-grub /dev/hdx (or sdx)
6. ONLY if your system dual boot AND your primary boot loader is NTLDR - remember to update your boot binary file (dd if=/dev/hdx of=/linux.bin bs=512 count=1) and copy the file to your NTFS boot partition. If you don't know what I'm talking, don't worry and just skip this step.
[edit] Troubleshooting
[edit] Black display menu visible
Stages probably not updated, try again install-grub (your partition where /boot belongs, or MBR). To check if your stage2 supports splash image, use checksplash.sh script.
[edit] Black display, no menu, or corrupted display
Check the splashimage instruction. If you have a separate /boot partition try splashimage /grub/splash.xpm.gz. Also check that you have a splash.xpm.gz in grub's dir.
[edit] FAQ
[edit] 1. Can I use my custom image in grub?
Yes, but it need to fulfill these requisites: 640x480 resolution, 14 color xpm picture gziped compressed.
[edit] 2. Do I need to recompile or reinstall grub when changing a splash?
Any splash can be used at any time, and no compilation is required after this package is installed, just replace splash.xpm.gz with another one, or edit menu.lst and change the path of splashimage instruction to match the desired picture to show.
[edit] 3. I currently use lilo, can I replace it with grub?
Yes you can, but AFAIK the menu.lst get your drive partition info on Arch installation and not grub installation (and same applies to lilo.conf). So you need to edit the menu.lst after package installation and add your boot device and kernel image configuration. That kind of problem is beyond the scope of this guide. If that's your case, first get working the the standard grub package on the current repository, and then update to this package. For more info or sample grub configs check GRUB or Gentoo Handbook - Configure the bootloader.
[edit] 4. Where can I get more information about splash images on grub?
GNU Grub Splashimage Howto - General Grub bootsplash info and sample images.
checksplash.sh - script that check if your stage2 support splashimage.
[edit] 5. I would like to test your package, but do not know how to build one?
Simply, download the pre-compiled package and install it using step 3, 4 and 5 of the Installation guide. :-)
[edit] Current Issues
None at the moment.
[edit] TODO
I will investigate the patch used by SuSE/Novell. It is a new modified one that allows for a greater resolution (not just 640x480) and more fancy stuff like menus. But that will means a heavy modified grub install, and thus completely sure it will not be accepted on Arch repos, and please don't ask when it will be done.
[edit] Change Log
2005-05-16 Updated to 0.97
2005-03-02 Added alternate PKGBUILD with reiser4 support and related grub patch.
2005-02-27 PKGBUILD 0.96-4, Fix splashimage path issue by adding a boot symlink on boot.
2005-02-26 Fixed some document steps.
2005-02-04 Provided old splash image for those who like it more.
2005-02-03 PKGBUILD 0.96-3, removed dependency on gzip. Splash is taken from $startdir instead of the uncompressed one on $statdir/src. Pre-compiled package provided. (FAQ question #4).
2005-02-02 Updated to grub 0.96, rediffed patch, new splash based on tpowa's KDE 3.4 wallpaper.
2005-01-09 Added autoreconf entry to fix compilation of new files added by patch. Update to FAQ.
2005-01-06 First public release of PKGBUILD based on grub 0.95.
Hope you enjoy it.
Original by darkcoder
Wikified by Romashka.