GRUB Loader

GRUB is a multiboot boot loader. It is the loader of my choice, as a consequence I have replaced the ancient LILO loader which is still number one in Slackware. GRUB is an alternative to other familiar bootloaders such as LILO. Unlike LILO, it loads a kernel through direct file system support rather than a block list so it does not need to be updated if a new kernel is installed.

Also included is Kent Robotti's 'grubconfig' tool (similar to the Slackware 'liloconfig' setup tool).

GRUB is yet part of the /extra folder. Grab and store it in a folder of your choice.

 

Step 1:

Install GRUB

 

installpkg <packagename>

 

Step 2:

GRUB has now to be anchored and configured. You can do this via command line or the "grubconfig" tool.

 

grubconfig

 

grubconfig

Do not configure to use frame buffer if unsure. Your kernel has to support this feature, you can always do this later. How to configure your kernel for framebuffer is outlined in the "after setup tasks" article.

grubconfig

Or whatever your hard disk is.

grubconfig

Install to superblock sometimes fails for the first time. If so, simply restart "grubconfig" and try again.

grubconfig

grubconfig

This is what the boot menu looks by default.

grubconfig

 

Default GRUB menu file

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sat Feb 16 15:17:01 2008
#
# Start GRUB global section
#timeout 30
#color light-gray/blue black/light-gray
# End GRUB global section
# Linux bootable partition config begins
title Linux on (/dev/hda1)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 ro vga=normal
# Linux bootable partition config ends
title --- For help press 'c', type: 'help'
root (hd0)
title --- For usage examples, type: 'cat /boot/grub/grub.txt'
root (hd0)

 

Customize boot menu

To customize the boot menu, simply edit /boot/grub/menu.lst. Example:

 

# Boot up first entry
default 3

# Boot automatically after "x" seconds
timeout 3

# Color scheme
color light-gray/blue black/light-gray

# For booting Linux
title Linux 2.6.20.6 with FB 1280x1024 (0x307)
kernel (hd0,0)/boot/vmlinuz_2.6.20.6 root=/dev/sda1 vga=0x307 dev=/dev/hda=ide-cd acpi=off
title Linux 2.6.21.5 with FB 1280x1024 (0x307)
kernel (hd0,0)/boot/vmlinuz_2.6.21.5 root=/dev/sda1 vga=0x307 dev=/dev/hda=ide-cd acpi=off
title Linux 2.6.22.9 with FB 1280x1024 (0x307)
kernel (hd0,0)/boot/vmlinuz_2.6.22.9 root=/dev/sda1 vga=0x307 dev=/dev/hda=ide-cd acpi=off
title Linux 2.6.23.16 with FB 1280x1024 (0x307)
kernel (hd0,0)/boot/vmlinuz_2.6.23.16 root=/dev/sda1 vga=0x307 dev=/dev/hda=ide-cd acpi=off