LOADLIN is a program that can boot Linux from DOS. Since the advent of Windows ME and Windows XP, it is no longer natural that PC users have DOS installed on their PCs. Windows versions up to and including Windows 98 came with a DOS version that was usable for LOADLIN. In my opinion LOADLIN is primarily of historical interest for this reason. The primary reasons to use LOADLIN were the following:
Linux could even be installed without repartitioning the disk. For this very purpose the UMSDOS file system was added to the Linux kernel. It still exists, though it sees very little usage today. The Linux file systems lived in the LINUX directory on the DOS partition and it contained special files to translate long file names into DOS 8+3 file names and to specify attributes such as users, groups, permissions and device files. Linux could be installed just by unpacking a bunch of ZIP files, just as one would install a large DOS application. LOADLIN made booting Linux just as easy as running a DOS application, hence it fit nicely into the DOS mindset.
Loadlin can be downloaded from Hans Lermen's home page. Download the file lodln16.tgz and unpack it. We will use only the file loadlin.exe.
In order to run LOADLIN, we need DOS. Create a bootable DOS diskette with just the bare system and COMMAND.COM on it. For those of you who have either Windows NT/ME/2000/XP or no Microsoft OS at all, you can use Freedos. Download the file FDB8_144.DSK (the rawrite image) and transfer it to a diskette
dd if=FDB8_144.DSK of=/dev/fd0Next remove everything but KERNEL.SYS and COMMAND.COM from this diskette.
mount /dev/fd0 /mnt
cd /mnt
rm -rf config.sys *.bat kernel32.sys kernel16.sys readme\
docs fdos games install util
cd
umount /mnt
Now that we have a minimal DOS diskette, copy LOADLIN.EXE, the linux kernel and the initial RAM disk to it:
mount /dev/fd0 /mnt cd /home/lennartb/myboot cp loadlin.exe /mnt cp zImage /mnt/zimage cp root.img.gz /mnt/root.gz umount /mnt
Next try to boot from the diskette. You should boot into DOS. As there
is no AUTOEXEC.BAT, you will be prompted for date and
time. Press enter twice. Now you should be at the A> prompt.
Type the following line to boot Linux:
loadlin zimage initrd=root.gzOf course you can put this line in a batch file or even in AUTOEXEC.BAT.