Chapter 12. Managing the Bootloader and Multi-Booting

Introduction

Linux has two excellent bootloaders: GRUB (the Grand Unified Bootloader) and LILO (Linux Loader). GRUB is newer and more capable than the elder LILO. Both are flexible, configurable, and capable of managing complex boot scenarios, such as multibooting several different operating systems or different Linux kernels, and passing in boot-time kernel options.

If you’re still running LILO, it might be worth considering migrating to GRUB. While they work similarly, there are four major differences that set GRUB apart:

  • You can discover boot images, kernels, and root filesystems from the GRUB command shell.

  • GRUB stores boot information in a filesystem, rather than in the master boot record (MBR).

  • GRUB reads filesystems and kernel executables, rather than inflexibly restricting the user to disk geometry.

  • And best of all, GRUB is completely operating system-independent. If you install GRUB into a separate boot partition, you can remove and reinstall operating systems to your heart’s content, without having to reinstall the bootloader every time.

Both GRUB and LILO can boot non-Linux operating systems, such as Windows, OS/2, the BSD Unixes, and so forth. For operating systems that they cannot boot directly, such as Windows, GRUB and LILO employ chain loading . That is, they point the way to Windows’s own bootloader.

The MBR is the first 512 bytes of the first sector of the first partition on the drive. It contains the partition ...

Get Linux Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.