从DOS引导linux系统

据说,linux本身的多重引导程序lilo和grub非常优秀了。但是,总还有优秀的事物无法解决的问题。巧得很,我就碰到两台机子不得不从DOS引导。

一台是单位的p4 1.8G, 40G, 256M, Windows XP的机器,挂了一块10G的redhat linux9.0;不知原来装Windows XP时用什么分的区,grub程序始终不能引导Windows XP;用pqmagic报告是分区表有问题,但是使用起来一切正常。

另一台是老掉牙床的486DX100, 28M,212M 装的win97,用来给小孩练打字;1.6G,装的是没有X图形界面的redhat linux9.0,在没有机器用的时候可以学习一下linux的脚本编程。但是老机只能从C或A启动,而且,那块1.6G的硬盘不知什么问题,不能设为主盘,只能是从盘或者single模式;老主板的另一个硬盘接口又不能用(一个叫LBA,一个叫AT,这个叫AT的不能用),最后只能从Windows 97下来引导linux了。

从DOS下引导linux需要一个叫作loadlin.exe的文件,你可以在下面下载到;

附件:loadlin.zip,9898 bytes

把loadlin.exe和你的linux系统需要启动的核心,比如:vmlinuz,和那个影像文件叫:initrd.img(如果有的话) 放在一个文件夹中,比如C:\linux文件夹中。

然后把一个DOS的批处理文件linux.bat放到比如:C盘中。

这样,当你进入纯DOS状态时(不是图形界面下的DOS),输入C:\linux.bat,就可以启动系统了。

我的linux.bat的内容:


c:\linux\loadlin  c:\linux\vmlinuz initrd=c:\linux\initrd.img root=/dev/hda4 vga=792 rw

上面这个办法是我从slackware发行包中的那个zipslack文件夹中学到的。zipslack是一个简化的linux,可以拷在一个windows分区中在dos状态下引导。这是关于zipslack的信息:http://www.slackware.org/zipslack/


ZipSlack

ZipSlack is a special edition of Slackware Linux that can be installed onto any FAT (or FAT32) filesystem with about 100 MB of free space. It uses the UMSDOS filesystem and contains most of the programs you will need. This means that you do not need to repartition your hard disk if you already have DOS or Windows installed. ZipSlack installs into a directory on your DOS filesystem. It can also be installed to and booted from a Zip disk.

This distribution is ideal for people who don't have a lot of hard disk space, do not have a fast Internet connection to download the entire distribution, or who want a Linux distribution they can carry around on a Zip disk.