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


Linux in a NutshellLinux in a NutshellSearch this book

4.5. Loadlin: Booting from MS-DOS

Loadlin is a Linux boot loader that you run from within a bootable MS-DOS partition. The system must be in real DOS mode, not in an MS-DOS window running under Windows. No installation is required; you simply copy the executable file loadlin.exe from the Loadlin distribution to your MS-DOS partition.[5] You also need a compressed Linux kernel (e.g., vmlinuz), which you can load from a floppy, from the DOS partition, or from a RAM disk. For example:

[5]If Loadlin didn't come with your Linux distribution, you can download it from any of the major Linux sites, such as the Ibiblio site at http://www.ibiblio.org/pub/Linux.

C:> loadlin c:\vmlinuz root=/dev/hda2

This example loads the Linux kernel image vmlinuz, passing it the boot parameter root=/dev/hda2, telling the kernel that the Linux root partition is /dev/hda2. (If you are using a RAM disk, see Section 4.7 later in this chapter.)

If you want to use Loadlin with Windows 95/98/ME, see the Loadlin User Guide and the Loadlin+Win95/98/ME mini-HOWTO.

Loadlin can be run directly from the DOS prompt, as in the example, or it can be invoked from CONFIG.SYS or AUTOEXEC.BAT. Like LILO, Loadlin takes both options that direct its operation and options (also referred to as parameters) that it passes to the kernel.

There are two ways to specify options: in a DOS file or on the Loadlin command line.

4.5.1. Using a Parameter File

You can store Loadlin options in a file and invoke the bootloader as follows:

LOADLIN @params

where params is a DOS file that contains the options you want Loadlin to run with. The Loadlin distribution comes with a sample parameter file, test.par, that you can use as a basis for creating your own. Each line in a parameter file contains one parameter. If you want to specify the name of the Linux kernel to use (the image= parameter), it must be the first entry in the file. Comments start with a hash sign (#). The entries in the parameter file can be overridden or appended on the command line. For example, to override the value of vga set in the parameter file:

C:> LOADLIN @myparam vga=normal


Library Navigation Links

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