By Wendy Dixon,2014-09-12 14:24
6 views 0




    区无法再被引导;MBR被覆盖而且使用“fdisk /MBR”通常也无法修复?。对这些缺乏



    LOADLIN needs not to be installed in any way, it is usable as is

     and the kernel images can reside on any DOS accessable medium

     (even on a network drive). This also makes LOADLIN an exellent

     tool, if it comes to boot your Linux after a crash and a

     filesystem restore from backup medium (you must run LILO after

     this, but you can't if you have not yet booted, isn't it?).

     Many CDrom producers already have seen the advantage of starting

     the Linux-installation process by means of LOADLIN, because it

     runs out of the box. And using DOS to push Linux on the road

     isn't wrong, if you have DOS (or Windows 95 DOS mode) available.

     With LOADLIN you can directly boot Linux from the CD without

     needing an intermediate bootfloppy.

     --------- +++ --------

2. Features of LOADLIN


     LOADLIN is highly adaptable to different DOS configurations, and now

     has very few loading restrictions. It makes use of extended memory and

     also can load big kernels (bzImages) and ramdisk images (initrd)

     directly high. The bzImage+initrd standard was jointly developed

     by the LILO-author (Werner Almesberger) and the LOADLIN-author (me)

     and is part of the official kernel since version 1.3.73.

     It is also capable of booting a UMSDOS-based system from a DOS drive.

     Some options (-v, -t, -d) produce debug information, so if you have

     problems, you can follow what is really being done by LOADLIN.

     LOADLIN also can load out of Virtual-86 mode (which is normal when

     using EMS drivers) if a VCPI server is present.

     --------- +++ --------

3. How to use LOADLIN



     LOADLIN is a utility which starts a "logical reload" of your machine,

     causing DOS to be completely overlaid with Linux. When you wish to

     return to DOS you must use the Linux "reboot" command.

3.1. What you need


     1. A 386 or higher CPU (of course!),

     DOS or WINDOWS95 installed on your machine.

     2. Any compressed linux kernel image (zImage, bzImage).

     NOTE: zImage is the old kernel binary format, bzImage is the

     new one ( kernel version >= 1.3.73), which can have a commpressed

     size of 1Meg, hence taking kernels up to 2Meg uncompressed.

     In the following we will refer only to zImage, though you may

     put a bzImage in place of it.

     3. The LODLIN16.TGZ package, which includes among other things:

     ( Note: these are DOSish files )


     DOC\MANUAL.TXT (this file)

     Example parameters file, DOC\TEST.PAR


3.2. Booting from the DOS prompt


    3.2.1 Quick start


     For the rest of this documentation I will assume that you have

     unpacked LODLIN16.TGZ into the directory C:\LOADLIN.

     At the DOS prompt you can type, for example:

     C:> CD \LOADLIN

     C:\LOADLIN> LOADLIN zimage /dev/hdb1 ro vga=ask

     or, if you want to load a big kernel together with a RAM disk:

     C:\LOADLIN> LOADLIN bzimage /dev/ram rw initrd=diskimage

     or, if you have more parameters than will fit into the 128-byte

     DOS command line:

     C:\LOADLIN> LOADLIN @params

     An example params file is "test.par". Please read it.

     A detailed collection (extracted from kernel sources) of most

     command line parameters can be found in the file PARAMS.DOC

     ( however, it is a bit out of date now )

     A much better list of boot parameters can be found in Paul Gortmakers

     BootPrompt-HOWTO, which can be access by WWW:


3.2.2 Quick help


     You can get online help and configuration analysis by typing:

     C:\LOADLIN> loadlin <enter>

     or, perhaps a bit more helpful:

     C:\LOADLIN> loadlin | more <enter>

     You then get an output like this (from my machine) ....

     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     LOADLIN v1.6 (C) 1994..1996 Hans Lermen



     LOADLIN @params

     LOADLIN [zimage_file] [options] [boot_params]

     without any params, LOADLIN displays this help message.


     params is a DOS file containing all other options


     DOS file name of compressed Linux kernel image


     -v verbose, show information on params and configuration

     -t test mode, do all but starting Linux, also sets -v

     -d file debug mode, same as -t, but duplicates output to "file"

     -clone ( Please read MANUAL.TXT before using this switch! )

     -n no translation for root=/dev/...

     -txmode switch to textmode 80x25 on startup

     -noheap disable use of setup heap

     -wait=nn after loading wait nn (DOS)ticks before booting Linux

     -dskreset after loading reset all disks before booting Linux


     root=xxx filesystem to be mounted by Linux as "/"

     (string passed unchanged to the kernel)

     xxx = hex number (e.g. root=201 for /dev/fd1)

     = /dev/mmmn (e.g. root=/dev/hda2)

     mmm = fd,hda,hdb,sda,sdb...

     n = 1..10.. decimal

     ro mount "/" readonly

     rw mount "/" read/write

     initrd=x (for kernels > 1.3.72) load file x into /dev/ram. If FS in x

     contains /linuxrc, execute it, and then remount to root=xxx.

     If root=/dev/ram, just load, bypass execution of /linuxrc

     for more boot params see PARAMS.TXT or Paul Gortmakers HOWTO:

     Your current DOS/CPU configuration is:

     load buffer size: 0x0082D000 VCPI, setup buffer size: 0x3E00 (reloc setup)

     lowmem buffer: 0x0006DC00 (part of load buffer)

     total memory: 0x01000000

     CPU is in V86 mode

     SetupIntercept: YES, patching setup code

     stat4: VCPI_present, physmap=logmap, all OK for switch to realmode

     input params (size 0x0000):

     LOADLIN started from DOS-prompt

     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     NOTE: All LOADLIN options (such as -t,... ) MUST come before

     the Linux command_line params

3.2.3 Starting linux from a batch file (LINUX.BAT)


     Most DOS users have disk caching (e.g. SMARTDRV) activated.

     If "write-behind" caching is supported by the cache program,

     then any unwritten cache buffers MUST be flushed before

     LOADLIN is called.


     C\LOADLIN> smartdrv /C do this to "sync" your disk (usually not

     needed for DOS 6.2, but it doesn't hurt)

     C\LOADLIN> loadlin ....

     It would be much smarter to use a batch file something like this:

     +-------------------- start of LINUX.BAT


     | SMARTDRV /C

     | C:\LOADLIN\LOADLIN C:\LOADLIN\ZIMAGE root=/dev/hdb2 ro vga=3


     +-------------------- end of LINUX.BAT

     So you could simply type:

     C> linux

     ... and you are on the road!

     A sample LINUX.BAT file is provided with the LOADLIN package.

3.2.4 Loading Ramdisks with newer kernels


     If you have a kernel image which is newer than version 1.3.72,

     LOADLIN can load the ramdisk directly from a file and let

     Linux mount the ramdisk (/dev/ram) as root filesystem.

     The file must contain the image of any Linux supported

     file system, such as minix or ext2. The technique used is

     called 'initrd' and is more flexible than the old loading

     from floppy. There can be the following cases:

     A) You simple want to load the ramdisk and have that mounted as

     root FS.

     C\LOADLIN> loadlin zimage root=/dev/ram rw initrd=imagefile

     You will see two LOADING.... sequences, one for the kernel

     and the other for the ramdisk.

     B) You want to have the ramdisk loaded and mounted only to

     bootstrap a bigger system. Your kernel has only support

     for few driver, but not all. Well, then the contents

     of your ramdisk image must contain an executable '/linuxrc'

     which is able to load kernel modules (via insmod). After

     /linuxrc has terminated, the root FS is remounted either

     to the device you supplied via root=/dev/..., or to the

     device that /linuxrc has chosen. This technique is described

     in detail in the file linux/Documentation/initrd.txt which is

     part of the kernel source. The LOADLIN call for

     loading such a configuration is:

     C\LOADLIN> loadlin zimage root=/dev/hda1 ro initrd=imagefile

     The non-initrd method, i.e. _not_ LOADLIN loads the ramdisk

     but the kernel does it from a floppy, has changed with Linux 1.3.48.

     It now look like this:

     C\LOADLIN> loadlin zimage root=/dev/fd0 rw load_ramdisk=1

     or, if you want have a prompt before inserting the floppy:

     C\LOADLIN> loadlin zimage root=/dev/fd0 rw load_ramdisk=1 prompt_ramdisk=1

     The size of the ramdisk is allocated dynamically.

     NOTE: In all cases the ramdisk image may be compressed (gziped)

    3.2.5 Floppys and Ramdisks using older kernels ( Linux < 1.3.48 )


     If LOADLIN encounters ramdisk=xxxx together with root=/dev/fdx

     it loads the kernel image into memory, but before starting up

     Linux it prompts for insertion of the root floppy.

     This enables you to boot DOS (and start LOADLIN) from the same

     floppy drive as the root disk.

     Of course, this is a two-floppy boot, but with Linux becoming

     bigger and bigger there will be no room on the root floppy to

     hold both the kernel image and the root filesystem. With

     LOADLIN there is no need for any fancy tricks to install a

     distribution when your drive configuration doesn't match that

     of the distribution.


     LST distribution comes only with a 3.5 inch floppy

     but your drive A: is 5.25 inch.

     Slackware 3.0 has a big directory tree with lots of possible

     drive constellations. With LOADLIN you need only the image disk

     and an appropriate root disk.

3.2.6 System constraints


     With LOADLIN-1.6 there are _very_ few contraints left, given you

     use a newer kernel, because the kernel now supports LOADLIN and

     aids to overcome the restrictions of old LOADLIN-1.5.

     The * (asterix) marked parts below only apply, if your kernel

     is an old one (not supporting LOADLIN).