Customizing Linux Bootloader

This is an old way to customizing Bootloader, since its the same way I modified bootloader until now.

Please correct me if I made a mistakes.

GRUB

Grub uses 640×480(px) and up to 14 color for the background image. You may convert/resize any images with any image editor, save it as .xpm file. If you have ImageMagick, you may use :

$ convert yourbootimage.png -colors 14 -resize 640x480 bootimggrub.xpm

Then gzipped and copy boot-grub.xpm to /boot/grub

$ gzip bootimggrub.xpm
# cp bootimggrub.xpm.gz /boot/grub

Now open /boot/grub/grub.conf and add bootimggrub, here’s an example of configuration :
default=0
timeout=33
splashimage=(hd1,0)/boot/grub/bootimggrub.xpm.gz
foreground=000000
background=fafafafa
hiddenmenu
title Slackware 12 (2.6.21.5-huge-smp)
root (hd1,0)
kernel /boot/vmlinuz-huge-smp-2.6.21.5-smp root=/dev/hda10 ro
boot
title Windows XP SP3
rootnoverify (hd0,0)
chainloader +1

Where other customizable lines:
default=0: The default priority boot Operating System
timeout=33: Countdown timer setting for selecting OS
foreground, background: This is for the color setting.
title Slackware 12 (2.6.21.5-huge-smp): This is where you edit the title for your OS, only this line, the afterlines are meant to be left as is.

=====
LILO

LILO uses the same resolution, 640×480(px), but up to 255 color. Convert and save your image as .bmp file. After that, copy that file to /boot. For example, I use mybootimg.bmp, then :

$ cp mybootimg.bmp /boot

Now edit file /etc/lilo.conf, and put these lines:
install=bmp
bitmap=/boot/mybootimg.bmp
bmp-table=50p,215p,1,6
bmp-colors=255,0,240,75,240,60
bmp-timer=580p,455p,0,254,

Where :
bmp-table : A position of where the LILO table must be shown. The syntax is (x-coordinates),(y-coordinates),(column),(row); p means in pixels. On my examples, it means the LILO table will be shown 50pixels from left and 215pixels from top.

bmp-colors : Color setting. The syntax is <x-coordinates>,<y-coordinates>,<bgcolor>,<fgcolor>,<shadowcolor>

You may left both shadow color and selection shadow color empty, the value is 0-254.

bmp-timer : Countdown Timer setting for OS selection. The syntax is

Check above rule for value.

Once you are sure that /etc/lilo.conf is properly configured, run
lilo -v

Reference :
LILO mini HowTo
Grub Official Documentation

  1. No comments yet.

  1. No trackbacks yet.