- 论坛徽章:
- 0
|
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 fileloadlin.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 parameterroot=/dev/hda2, telling the kernel that the Linux root partition is/dev/hda2. (If you are using a RAM disk, seeSection 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 asparameters) that it passes to the kernel.
There are two forms of the Loadlin syntax:
LOADLIN @params
LOADLIN [zimage_file] [options] [boot_params]
4.3.1. Using a Parameter File
In the first form of the preceding syntax,paramsis 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 (theimage=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 ofvgaset in the parameter file:
C:>LOADLIN @myparam vga=normal
4.3.2. Putting Parameters on the Command Line
In the second form of the preceding Loadlin syntax, zimage_fileis the name of a Linux kernel to run, followed by a list of Loadlin options and/or boot options. SpecifyingLOADLINwith 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 likemore:
C:>LOADLIN | more
The Loadlin options are:
-clone
Bypasses certain checks -- read the LOADLIN User Guide that comes with the Loadlin distribution before using.
-dfile
Debug mode. Like-tbut sends output tofileas well as to standard output.
-dskreset
Causes disks to be reset after loading but before booting Linux.
-noheap
For use by serious Linux hackers only; disables use of the setup heap.
-t
Test mode. Goes through the loading process but doesn't actually start Linux. Also sets-v.
-txmode
Sets the screen to text mode (80x25) on startup.
-v
Verbose. Prints parameter and configuration information to standard output.
-wait=nn
After loading, waitsnn(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 also the BootPrompt-HOWTO for a more complete list. |
|