-->
Previous Table of Contents Next


Using BOOTLIN

With the Linux BOOTLIN configuration, which is also a common form of installation, no changes to the Master Boot Record are made. During the boot process, the Master Boot Record is read, and then a decision about which operating system to load is made. This decision is usually based on a user prompt. Essentially, this is the same as a normal DOS boot except the program BOOTLIN is invoked in either the CONFIG.SYS or AUTOEXEC.BAT files. This can then execute a program that lets you choose the operating system to load. The program BOOT.SYS, for example, may be used to present a menu that lets you choose between a Linux and DOS boot.

To install BOOTLIN in your DOS partition, follow these steps:

1.  Boot Linux. Make sure you have a boot floppy disk in case of problems.
2.  Place a copy of the Linux kernel in your DOS partition either through DOS or with one of the Linux Mtools. You only have to copy the kernel file into the home directory (or any subdirectory) of the DOS partition. This can even be done from a floppy.
3.  Copy BOOT.SYS and BOOTLIN.SYS to the DOS partition, using the same process as the Linux kernel.
4.  Add both the BOOT.SYS and BOOTLIN.SYS files to your CONFIG.SYS file.
5.  Make sure DOS is the active partition and reboot the machine.

When DOS starts, the BOOT device driver should give you the option of booting DOS or Linux. If you have problems, simply remove the BOOT.SYS and BOOTLIN.SYS files from the CONFIG.SYS file and you are back to normal.

Using the BOOT.SYS program has a useful advantage: No boot sectors are altered to support several operating systems. This can make it easy to load and to remove operating systems from a hard disk. Both the Master Boot Record with active partition and BOOT.SYS approaches can be employed together so that the hard disk starts to boot whichever operating system has the active flag, then pauses and waits for confirmation from the user (or a timeout to occur). In this case, no changes to the Master Boot Record need to be made.

Boot Parameters

Regardless of which boot process you use, when Linux is booting, LILO pauses momentarily to check that the Shift, Control, and Alt keys are not pressed and that CapsLock and ScrollLock are set. If none of the keys are pressed and the locks are on, LILO displays the boot: prompt. At this point, LILO is waiting for the name of the boot image to be entered or if a timeout or Enter is pressed, the default boot image is loaded. The boot image is the kernel of whichever operating system is to be loaded, including DOS.

If you want to boot an image other than the default, you can enter its name at the boot: prompt. To obtain a list of all known boot images, enter a question mark or hit the Tab key (depending on the image and keyboard setting). The default boot image name is located in the file /etc/rc or /etc/lilo.conf (depending on the version of Linux) on the line that reads


BOOT_IMAGE=

You can specify parameters for the kernel from the boot: prompt, too. You specify a parameter by entering it after the boot: prompt. Unless overridden, the parameters are used by the default image when it boots. Valid parameters differ a little depending on the version of Linux, but most versions support the following parameters:

no387 Disables any onboard floating-point unit (FPU).
root Boots from a device specified after the root parameter, such as root=/dev/ sda1. The root command requires a hexadecimal device number of the full path name of the device.
ro Mounts the root file system as read-only.
rw Mounts the root file system as read-write.
single Boots the Linux system into single user (system administrator) mode.

The root parameter allows a hexadecimal device number to be used. The device numbers are assigned depending on the type of device. For floppy drives, the numbers are assigned starting with 200, so /dev/fd0 is 200, /dev/fd1 is 201, /dev/fd2 is 202, and so on. Hard disks have numbers assigned depending on the type of device. For most hard disks, the numbers start at 301 (not 300 because there is no /dev/hd0): /dev/hda1 is 301, /dev/hda2 is 302, and so on. When a second hard drive is used, the numbers jump to 340: /dev/hdb1 is 341, /dev/hdb2 is 342, and so on. For /dev/sda devices, numbering starts at 801: /dev/sda1 is 801, /dev/sda2 is 802, and so on. The second hard drive starts at 811: /dev/sdb1 is 811, /dev/sdb2 is 812, and so on. Because floppy and hard drives are usually the only devices that can act as a boot device, these numbers should suffice for all occurrences except removable media.

Parameters can be combined if separated by a space. For example, at the boot: prompt the following line boots the kernel called image5 located on the device /dev/hda2:


image5 root=/dev/hda2 single ro

The file system will be mounted as a read-only device. Single-user mode only will be invoked.


Previous Table of Contents Next