Chapter 4. Boot Methods
|
4.1. The Boot ProcessOn an x86-based PC, the first sector of every hard disk is known as the boot sector and contains the partition table for that disk and possibly also code for booting an operating system. The boot sector of the first hard disk is known as the master boot record (MBR), because when you boot the system, the BIOS transfers control to a program that lives on that sector along with the partition table. That code is the boot loader , the code that initiates an operating system. When you add Linux to the system, you need to modify the boot loader, replace it, or boot from a floppy or CD to start Linux.
In Linux, each disk and each partition on the disk is treated as a device. For example, the entire first hard disk is known as
/dev/hda
, and the entire second hard disk is
/dev/hdb
. The first partition of the first hard drive is
/dev/hda1
, and the second partition is
/dev/hda2
. The first partition of the second hard drive is
/dev/hdb1
, and so on. If your
Once you've made the decision to install LILO or GRUB, you still need to decide how it should be configured. If you want your system to dual-boot Linux and Windows 95/98/ME, you can install LILO or GRUB on the MBR and set it up to let you select the system to boot. Dual-booting Linux and Windows NT/2000/XP is not quite as straightforward because these systems use the Windows NT loader, which is installed on the MBR and expects to be in charge. The standard solution described in this chapter is to add Linux as an option in the NT loader and install LILO or GRUB in the Linux partition as a secondary boot loader. The result is that the NT loader transfers control to the secondary loader, which then boots Linux. See Dual-Booting Linux and Windows NT/2000/XP.," later in this chapter, for more information. You can also install one of the Linux boot loaders in the MBR and use it to boot Windows. (See the "Linux+WindowsNT" and the "Multiboot with GRUB" mini-HOWTOs if you're interested in doing that.)
When you install the boot loader (either LILO or GRUB) on the MBR, it
The common element in all three
The rest of this chapter describes the various techniques for booting Linux and the options that you can specify to configure both the boot loader and the Linux kernel. Whether you use LILO or GRUB, you can pass options to the loader and specify options for the kernel. |