Win95 + WinNT + Linux multiboot using LILO mini-HOWTO
Renzo Zanelli, v1.0, 26 March 1998
This document describes how to use the to multiboot between Windows 95, Windows NT, and Linux.
There are a number of documents available that describe in detail how to multiboot just about any number of OS's using NT's OS loader. When I finally bought Windows NT, I already had Windows 95 and Linux installed on my system and I was using LILO to multiboot between them. I decided to add Windows NT to LILO instead of using NT's OS loader.
Originally I had Windows 95 on my first IDE disk drive and Linux on my second IDE disk drive. The Linux drive became my third IDE drive and I installed a new IDE disk for Windows NT as my second drive. Even though I haven't tried this in different configurations, I believe the order with which each OS is installed or which drive it is installed on is unimportant.
Just remember to create those emergemcy bootup floppies when each OS prompts you to!
Because I used Gilles Vollant's BootPart utility and BootPart only supports drives up to 4GB in size, this may not work if you have drives of larger capacity. If you need to work with drives greater than 4GB, contact Gilles directly (see BootPart documentation for Gilles' e-mail address).
When you install the OSes, make sure that all are installed on bootable partitions. I installed both Windows 95 and Windows NT on Fat 16 partitions, so this procedure works on Fat 16 drives. If you decide to use Fat32 for Windows 95 and NTFS for Windows NT, check to see if your version of Linux supports them and, if so, to what extent.
Install Windows 95 on your first drive. This will be your C: drive. Remember to create the Windows 95 boot floppies when prompted to do so.
I have found that it is better if the Linux drive is removed from the system when installing Windows 95, so that it is never detected and it doesn't exist as far as Windows 95 is concerned.
At this point, if you did everything correctly, you should be able to boot Windows 95.
Installing Windows NT 4.0
Install Windows NT 4.0 on your second drive. When you create the partition on this drive, make the partition bootable. Not all versions of Linux support NTFS, so I created a FAT16 partition, just to be on the safe side and because I wanted to exchange data between the Windows drives.
When Windows NT installs, it will detect the presence of Windows 95 and will create an entry for it in the NT OS loader and you should see three entries in the OS loader menu as follows:
Windows NT Workstation Version 4.00 Windows NT Workstation Version 4.00 [VGA mode] Microsoft Windows
At this point, if you did everything correctly, you should be able to multiboot to Windows NT and Windows 95.
Install Linux on your third drive. When I installed Linux, I only had Windows 95 installed so I only added the Windows 95 partition to Lilo. You can go ahead and install all OSes while installing LILO, or edit the Lilo configuration file later. However you decide to do it, I will show you how the /etc/lilo.conf file is supposed to look in the next section. Once Linux is installed, you should be able to boot to Linux.
This will involve editing the /etc/lilo.conf file and reinstalling LILO. The following should already be present in /etc/lilo.conf:
The Linux stanza should also be already present:
# Linux stanza image=/vmlinuz root=/dev/hdc1 label=Linux # End Linux stanza
Now add the Windows 95 stanza:
# Windows 95 stanza other=/dev/hda1 table=/dev/hda label=Windows95 # End Windows 95 stanza
Now add the Windows NT stanza:
# Windows 95 stanza other=/dev/hdb1 table=/dev/hda loader=/boot/any_d.b label=WindowsNT # End Windows 95 stanza
Now run LILO again. At this point, if all is well, you should have Windows 95, Windows NT, and Linux as selections from LILO. You should be able to boot to Linux and Windows 95 (which should give you the Windows NT OS loader). To make the Windows NT entry operational, you still need to do some work on the Windows NT side.
Before you can continue, you need two do two things.
The first is to download and unzip Gilles Vollant's BootPart utility which can be found at http://www.winimage.com/bootpart.htm with some information on how to use it.
The second thing to do is copy (do not delete them yet!) the following files to the root of the Windows NT drive:
These files are the Windows NT loader. They are located in the root of the Windows 95 drive and were placed there by Windows NT when you installed it.
Boot.ini Bootsect.dos Ntdetect.com Ntldr
Once this is done, boot to the Windows 95 DOS prompt (press Shift+F5 when Windows 95 loads) and issue the following command:
Now you must edit Boot.ini in your Windows NT root directory. You must edit three lines, one in the [boot loader] section and two in the [operating systems] section.
BOOTPART WINNT BOOT:D:
This is the original Boot.ini:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(1)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos C:\ = "Microsoft Windows"
This is the new Boot.ini:
Notice that all instances of rdisk(1) have been changed to rdisk(0) and the line referencing Windows 95 has been removed.
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos
After saving Boot.ini, if you did everything correctly, you should now be able to boot to Windows NT from LILO.
Create a bootable DOS floppy from the Windows 95 DOS prompt (press Shift+F5 when Windows 95 loads). It is important that this floppy be created at the DOS prompt, not from a DOS window inside Windows95! Do not boot to Windows95 until this step is complete! Copy the file C:\WINDOWS95\COMMAND\SYS.COM to the floppy (substitute your Windows95 path if different). Now boot from the floppy and enter the command:
This should have removed the Windows NT OS loader and you should be able to boot directly into Windows 95 from LILO.
You can now remove the NT loader files:
Boot.ini Bootsect.dos Ntdetect.com Ntldr
Thanks to the following people (in no particular order):
James C. Bevier & D. Michael McFarland. In a message exchange on the reddhat-list they provided some information on how to boot NT from Linux.
Gilles Vollant. BootPart is a very useful utility and Gilles makes it available for free with some nice documentation. Thanks Gilles.
Mike Harlan. By reading his 'Linux-DOS-Win95-OS2' mini-HOWTO, it helped me make some assumptions about LILO's behavior.