Pick a Free OS

User login


GRUB: Multi-boot without LILO!

color - The color combination for the menu. The first entry is the foreground and background color of an entry in the menu and the second is the color combination to be used when a entry is highlighted.

default - The default entry that will be booted after the timeout value is reached. Here we've given '0' as the default. This means that the first boot entry will be used. GRUB counts up from '0' and not from '1'. So the first entry would be '0' and the second '1'.

password - This is the password to be used if someone wants to access GRUB's advanced features at boot. GRUB puts some very powerful features at your disposal because of its ability to read filesystems. For example, at the grub boot prompt, someone can just type 'cat /etc/shadow' and read your shadow passwords -- without even booting into your system! Using a password restricts such actions to authorized users only. This password will also be used to prevent booting of other users.

Now come the boot entries. Each boot entry starts with the keyword 'title', followed by any string that describes that entry. Next are the 'kernel' entries. We've not worked with the BSD's, but the process of booting the BSD's is very well documented in the texinfo manual. For the moment, we’re sticking with Linux.

kernel (hd0,1)/vmlinuz root=/dev/hda3 hdc=ide-scsi

The line above is pretty self-explanatory but for GRUB's naming convention of your devices. Floppy drives become (fdx) and hard drives become (hdx) where 'x' is the number of the device. One thing to remember is that GRUB counts up from '0' and not '1'. hd0 represents the first hard drive and hd1 the second. All device names are enclosed within brackets. Further, hard drive partitions are specified with a comma separating the two. e.g - (hd0,1) means second partition on the first device. Similarly, (hd1,5) refers to the first logical partition on the second hard drive.

GRUB can read most filesystems, and in the above line we set it up so that GRUB looks for the kernel in (hd0,1), which is the second primary partition on the first hard drive and the file '/vmlinuz'. You will also have to give 'root=/dev/hda3' or wherever your root filesystem lies, otherwise the kernel will not be able to mount the root filesystem. After this, you can put in any parameters that you want to pass to the kernel. These parameters are specified, as they would be when using LILO.