Book HomeLinux in a NutshellSearch this book

4.3. 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 just need to copy the executable file loadlin.exe from the Loadlin distribution to your MS-DOS partition.[4] 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:

[4]If Loadlin didn't come with your Linux distribution, you can download it from any of the major Linux sites, such as the Metalab site at http://metalab.unc.edu/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.6, "initrd: Using a RAM Disk" later in this chapter.)

If you want to use Loadlin with Windows 95/98, see the Loadlin User Guide and the Loadlin+Win95 mini-HOWTO for how to do that. Note that if your disk uses the FAT32 filesystem, the standard techniques for using Loadlin and Windows 95 won't work; if this is the case or if you aren't sure whether you have FAT16 or FAT32, it's important to read the mini-HOWTO before you proceed.

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 forms of the Loadlin syntax:

LOADLIN @params
LOADLIN [zimage_file] [options] [boot_params]


Library Navigation Links

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