home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeLinux in a NutshellSearch this book

Chapter 4. Boot Methods

This chapter describes some techniques for booting your Linux system. Depending on your hardware and whether you want to run any other operating systems, you can configure the system to boot Linux automatically or to provide a choice between several operating systems. Choosing between operating systems is generally referred to as dual booting, but you can boot more than two (e.g., Linux and Windows 95/98/NT/2000). This chapter covers the following topics:

  • The boot process

  • LILO: the Linux loader

  • Loadlin: booting from MS-DOS

  • Dual booting Linux and Windows NT/2000

  • Boot-time kernel options

  • initrd: using a RAM disk

4.1. The Boot Process

Once your Linux system is up and running, booting the system generally is pretty straightforward. But with the wide variety of hardware and software in use, there are many possibilities for configuring your boot process. The three most common choices are:

Other boot managers that can load Linux are available, but we don't discuss them in this chapter. We also won't talk further about booting from a floppy except to say that whatever method you choose for booting, you should be sure to have a working boot floppy available for emergency use. In particular, don't experiment with the files and options in this chapter unless you have a boot floppy, because any error could leave you unable to boot from the hard disk.

On an Intel-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 disk to start Linux.

In Linux, each disk and each partition on the disk is treated as a device. So, for example, the entire first hard disk is known as /dev/hda and the entire second hard disk, if there is one, 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 drives are SCSI instead of IDE, the naming works the same way except that the devices are /dev/sda, /dev/sda1, and so on. Thus, if you want to specify that the Linux partition is the second partition of the first hard drive (as in the examples in this chapter), you refer to it as /dev/hda2.

The rest of the chapter describes the various techniques for booting Linux and the options that you can specify to configure both the boot loader that you use and the Linux kernel. Both LILO and Loadlin let you pass options to the loader and they also let you specify options for the kernel.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.