O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

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.

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

Putting Parameters on the Command Line

Another way to run Loadlin is to include options on the command line. The syntax is:

LOADLIN [zimage_file] [options] [boot_params]

zimage_file is the name of a Linux kernel to run, followed by a list of Loadlin options and/or boot options. Specifying LOADLIN with no parameters gives a help message listing the Loadlin options and some of the possible kernel boot options. The message is long enough that you probably want to pipe the output through a pager like more:

C:> LOADLIN | more

The Loadlin options are:


Bypass certain checks. Read the LOADLIN User Guide that comes with the Loadlin distribution before using.

-d file

Debug mode. Like -t, but sends output to file as well as to standard output.


Cause disks to be reset after loading but before booting Linux.


For use by serious Linux hackers only; disable use of the setup heap.


Test mode. Go through the loading process but don’t actually start Linux. Also sets -v.


Set the screen to text mode (80x25) on startup.


Verbose. Print parameter and configuration information to standard output.

-wait= nn

After loading, wait nn (DOS) ticks before booting Linux.

In addition to these Loadlin options, the help message prints a number of kernel boot options that you can specify. The boot options that it prints are only a few of the many available boot options; see the BootPrompt HOWTO for a more complete list.

[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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required