Picking the Right Boot Loader

For a simple configuration, just about any boot loader will do a good job. Certain exotic installations, though, have special needs. For instance, if you need to boot multiple versions of Microsoft Windows, you must set aside multiple primary partitions or use a boot loader that supports keeping several versions of Windows on a single primary partition. Booting from above the 8GB mark can also pose difficulties with some boot loaders. To perform a "normal" boot of Linux from a hard disk, either

GRUB or LILO is required, although you can use another boot loader as a primary boot loader, relegating GRUB or LILO to secondary status to boot Linux alone. Some common boot loaders, and their advantages and disadvantages, include:

LOADLIN This boot loader is a DOS program that only boots Linux. To use it, you boot DOS and run LOADLIN, passing it the name of the Linux kernel file (which must be stored on a FAT floppy disk or partition) and kernel parameters. For instance, you might type LOADLIN C:\VMLINUZ root=/dev/hda7 ro. This command boots the VMLINUZ kernel and tells it to use /dev/hda7 as the root partition, mounting it initially read-only (ro). Linux subsequently remounts the root partition for read/write access, assuming it's so configured in /etc/fstab. LOADLIN is most useful for testing new kernels without altering your standard boot procedure or for emergency boot situations (say, if you accidentally damage a boot loader configuration when installing a new OS). One important limitation of LOADLIN is that it has problems booting large kernels. Therefore, you may need to trim unnecessary options from a kernel before you can boot it with LOADLIN. Most distributions include LOADLIN in a directory called dosutils, tools, or something similar on their installation media.

GRUB This boot loader was designed with support for tools that enable a computer to boot from beyond the 1,024th cylinder (roughly 8GB on modern systems), but older BlOSes may not support this option. GRUB is extremely flexible, and it is the default boot loader for some Linux distributions. Its configuration is controlled through a file that GRUB reads at boot time, so reconfiguring it doesn't require writing to the MBR or boot sector. GRUB configuration is described in more detail in the upcoming section, "Configuring GRUB."

LILO This boot loader is older than GRUB. It didn't originally include the ability to boot anything from beyond the 1,024th cylinder, but modern versions can do so, provided the BIOS supports this feature. Although not quite as flexible as GRUB, LILO is still a powerful tool. To reconfigure it, you must alter a configuration file and type lilo, which rewrites the MBR or partition boot sector. This fact can complicate reconfiguring LILO if you can't get Linux to boot.

OS Loader This boot loader, also known as NTLDR, ships with Windows NT, 2000, and XP. It's controlled through a file called C:\BOOT.INI, and it's designed to select between different versions of Windows. It can be configured as a primary boot loader, using LILO or GRUB as a secondary boot loader to boot Linux, but doing so requires extracting a Linux boot partition's boot sector into a file and placing that file on the Wndows partition.

XOSL This boot loader, headquartered at http://www.xosl.org, is a powerful open source boot loader. It installs partly to the MBR and partly to a FAT partition, and it provides GUI configuration tools. It's easier to configure XOSL to handle multiple Microsoft OSs than to do the same with LILO, so it can be a good choice for such systems.

System Commander This program, from V Communications (http://www.v-com.com), is a very powerful dedicated boot loader. It's stored on the MBR and a FAT partition, and it presents text-based or GUI menuing tools for reconfiguring from within the program itself. It can boot multiple Windows OSs (including booting two or more versions from a single partition), hide partitions when booting specific OSs, and more.

In most cases, you'll do well to stick with whatever boot loader is the default for your distribution—GRUB or LILO. Most Linux installations do a good job of setting up a system to boot Linux alone or to select between Linux and Windows. If your system is more complex, though, you may need to modify your GRUB or LILO configuration, or you may need to dedicate GRUB or LILO to a secondary role and use a third-party boot loader. XOSL and System Commander are both very powerful and easy-to-configure primary boot loaders, so they're both worth investigating for complex systems. OS Loader is awkward to reconfigure when you upgrade your Linux kernel, so I prefer to avoid it.

0 0

Post a comment