Pick a Free OS

User login

Navigation

GRUB: Multi-boot without LILO!

GRUB, unlike LILO, is able to read filesystems and recognize kernel images too. While LILO requires the physical location of the kernel on your drive, GRUB does not. Even the latest filesystem ReiserFS is supported. This means that you don't have to re-install GRUB every time you make a change to the config file or install a new kernel. If your BIOS supports LBA then there is also no problem reading beyond 1024 cylinders. There's some good support for network booting of diskless clients. On the other hand, GRUB installation can be a bit of a problem. Maybe we're all too used to LILO or maybe GRUB still has some way to go? Little of both we think.

GRUB can be obtained from ftp://alpha.gnu.org:/gnu/grub/. The official page where you can look for documentation and FAQ's is http://www.gnu.org/software/grub/. According to the site, the software hasn't been released publicly and the various releases are merely test releases. We haven't faced problems setting up and booting GRUB but there are several known bugs and missing features that might trip you up. The latest release as of writing this article is 0.5.96.1 and this is what we'll be using here.

Installation

Simply un-tar the file somewhere.

bash-2.04$ tar zxvf grub-0.5.96.1.tar.gz

Enter the directory "grub-0.5.96.1" and run the following sequence of commands there

mayank@agni:/tmp/grub-0.5.96.1 > ./configure

mayank@agni:/tmp/grub-0.5.96.1 > make

mayank@agni:/tmp/grub-0.5.96.1 > su -c "make install"

Configuration

GRUB provides a menu-based interface that you can use. By default GRUB will install into /boot/grub and the configuration file will also reside there. The default configuration file is menu.lst. This is the GRUB equivalent of lilo.conf. This is the file where you define the various boot options, boot images etc.

A sample menu.lst file is given below

timeout 5

color black/yellow yellow/black

default 0

password freeos

title My Linux

kernel (hd0,1)/vmlinuz root=/dev/hda3 idebus=66

title Another Distro!

kernel (hd0,6)/boot/vmlinuz root=/dev/hda7 idebus=66

title Windows

root (hd0,0)

makeactive

chainloader +1

Let's look at the configuration options given here

timeout - The delay in seconds before the default entry is booted.