Linux + WinNT++ mini-HOWTO
by Kurt Swendson
v1.0, 21 December 1996

This file describes how I installed Linux and Windows NT 3.51 on the same
computer.  Unlike most HOWTOs that start with "First erase your entire C
drive", this HOWTO will allow you to install Linux without harming any
existing data on your drive.

In brief, I started with the Walnut Creek Slackware 3.0.0 CD rom, and a DOS
system disk.  I used Fips, from the CD,  to create my Linux partitions.
Then I used the Loadlin program, from the CD, along with the DOS system disk
to boot Linux.  Then I copied the DOS system files to the C drive, and
edited the file BOOT.INI to include loadlin as one of the choices when you
boot up NT.  That's it.

Let's go into a little more detail.

Recall that before NT and 95, PCs had DOS as the operating system. Windows
3.1 ran as a program within DOS.  We could do all kinds of Linux installs
using DOS as our "base" operating system.  All you did was exit out of
Windows, and you were at the DOS prompt, where you could perform various
system-crunching functions like fdisk  and the Linux install.  When NT came
out, NT became the entire operating system.  Sure, DOS shell is there, but
as a program that runs within the NT operating system.  You can't exit out
of Windows NT to do the install.  You turn on the computer, and it gets you
into NT automatically, where you stay, until the end, when NT "allows" you
to turn the computer off.

Before I started the install, I went to a DOS computer and made a system
floppy, and included the files: COMMAND.COM, DEFRAG.EXE, DEFRAG.HLP,
FORMAT.COM, and SYS.COM.  I got fips from the CD rom, and stuck that on the
disk too.

Using defrag, I determined where the free space on my disk was, and was able
to safely partition the disk with fips.  On the CD rom was a good set of
instructions on how to use fips. I followed other HOWTO  instructions to do
the Linux install.

Then I made a bad mistake. I installed LILO, and when it overwrote my MBR,
it effectively killed my computer.  I'm sure that some people may be able to
fix their MBR, but in my case, I ended up completely erasing my hard drive
and re-installing EVERYTHING from scratch.  (For the record, I did ask
around, and I did look on the MS Knowledge Base, and try to recover my MBR,
but nothing worked.  A total re-install was the easiest route).

This prompted me to investigate loadlin. Loadlin is a program that runs from
the DOS prompt to bootstrap Linux. It exists in the Linux distribution, in
gzipped format.  Along with the actual loadlin program, you get a good set
of instructions and faqs.  I booted up the computer with the DOS system
disk, and ran loadlin.  Linux came up perfectly, just like if I used my
Linux boot floppy.

So, after some manual playing around, I was able to make my computer start
up using DOS, and start up Linux with an autoexec.bat file.  But surely I
was not going to overwrite my MBR again!

Watch what happens when you start up your Windows NT computer.  Upon your
standard NT startup, you momentarily see (more or less):

1.  BIOS banner
2.  Press <F1> to enter Setup message
3.  OS Loader v 3.51
           Please select the operating system to start:
	Windows NT Workstation Version 3.51
	Windows NT Workstation Version 3.51 (VGA Mode)

You will recognize all this, no doubt, and also recall that in Control
Panel, System, you see that list of OS Loader menu options. So, why not add
a DOS autoexec.bat, running loadlin, on the end of that menu?

The answer lies in the Microsoft Knowledge Base, article Q153762, "Setting
Up Dual Boot After Installing Windows NT".  Okay, Bill Gates, I properly
footnoted you, so don't send your lawyers after me for plagiarizing.

If you are doing this Linux thing, and hitting the HOWTOs pretty hard, you
should also check out the knowledge base, because there is a wealth of
knowledge out there, and you can learn a lot.  Each article has suggested
keywords at the end you may search on to get more information on related
subjects.

Back to the article. Unfortunately, it states you can't run your NT
operating system using the NTFS file system.  You must be still using the
old FAT format.

Start up the computer using the DOS system disk, and type in "sys a: c:".
When it is complete, you will get a message saying the system transfer is
complete.

Reboot your computer.  It will start up in DOS. (Note: If you followed my
footsteps, and already created an autoexec.bat file running loadlin, this
may be bad. Temporarily disable the autoexec.bat file by renaming it or
deleting it before rebooting).

Copy command.com onto your root directory, and build your  autoexec.bat
file.   (If you want to do a complete DOS install here, you can.  After all,
the official purpose of the knowledge base article is for a DOS dual boot).

Reboot your computer again, using your NT setup disk set, and specify the
"Repair" option when it asks you, and follow the setup procedure.  All you
are doing is repairing the boot sector,  so you do not need to inspect the
registry files, the system files, or the NT boot environment during the
setup procedure.

Get into File Manager, and click on View, File Type, and click on the box to
reveal system and hidden files.  You will then see BOOT.INI in your root
directory.

Click on this file, and do a File, Properties (alt-enter), and turn off the
flags for hidden, read only, and archive.  Make a backup copy of this file,
and also make another copy, which you will edit.  Add one line to the end:


	C:\"Linux"

Save this file, and copy it on top of the real boot.ini file, and turn those
flags back on.  Read Only, Archive, and System should be turned on.

When you reboot, and get to the OS Loader screen, you should see Linux on
the end of your list of operating systems.  Press the down arrow to
highlight Linux, press enter, and, well, you know, see what happens next!


Kurt Swendson
