meh, I'm doing it anyway.
Dual booting Windows and Linux using LILOThere is a FAQ that describes
how to dual-boot Windows NT and Linux using the Windows NT bootloader, but what if you want to use LILO as the main bootloader? This FAQ will tell you how to do that. Note that throughout this FAQ, I'll be using the term "Windows NT" to describe all releases of Windows based on the WinNT kernel. That includes Windows 2000 and Windows XP.
The first part of this FAQ will tell you how to dual boot Linux and WinNT using a single hard drive. This is a fairly simple configuration, and is also the most common. The second part will describe something a little more complex: running Linux and Windows NT on seperate hard drives that both believe they are installed on the primary master IDE drive. This is useful if you've been dual-booting by swapping out hard drives to switch between Linux and NT, as I once did.
Example 1: WinNT and Linux on one hard drive
This is the most common configuration, and is fairly easy to set up. In fact, if you install Windows NT first, most Linux distros will detect it and set up a dual boot automaticly. However, if you install Linux first and NT second, you will need to do it manually. Here's how to do that:
1. Establish your partitions. I recommend this allotment, in this order:
48% of drive: Linux OS partition
1.5x physical RAM: Linux swap space partition
Whatever is left: Windows NT OS partition
2. Install Linux. When asked, install LILO in the MBR. I don't think Windows NT will trash the MBR when a bootloader exists there, but make a boot disk just in case!
3. Install Windows NT. If it doesn't wreck LILO, you will end up back in Linux after the text-mode install finishes. Otherwise, complete the install and then use your boot disk to get back to Linux.
4. Once you are in Linux, open up
/etc/lilo.conf in your fa
vor
ite text editor, and add this to the bottom, below the
image= stanzas.
other=/dev/hda3
label=WindowsNT
The
other= line tells LILO that it's booting an "other" (not DOS, not Linux) OS that is able to boot itself. The
/dev/hda3 part tells it what partition to try to boot. If you used the partition example I suggested above, and you're doing this with the Primary Master IDE drive, then /dev/hda3 will be correct. The
label= entry can be anything, but you cannot use spaces.
5. Save the file.
6. Run
/sbin/lilo -L
The
-L switch tells LILO to use LBA32 mode. Unless you have a <2GB hard drive, you will need this switch. If all is well, you'll see some "Adding" lines, then the prompt will return. One will have a * after it, that is the default entry. Now you may reboot, and Windows will be an option in the LILO menu. You are done!
Example 2: WinNT and Linux on seperate hard drives
This part of the FAQ is based on a guide from
Frankenlinux.
What if you want to have Windows NT and Linux on seperate hard drives? Previously, you either had to give WinNT the primary hard drive, or swap out the hard drives to switch OSes. If you've been taking the swap approach, here's how to use LILO to make sense of it:
1. Jumper the Linux hard drive to be the master, and the NT drive to be the slave.
2. Hook them both up to the primary IDE channel.
3. Boot. You will get LILO and end up in Linux.
4. Open up
/etc/lilo.conf, and add this to the end of the file:
other=/dev/hdb1
label=WindowsNT
table=/dev/hdb
map-drive = 0x80
to = 0x81
map-drive = 0x81
to = 0x80
Here's the line-by-line explanation:
other=/dev/hdb1: Tells LILO to boot an OS from the first partition on the primary slave drive.
label=WindowsNT: Tells LILO what this OS should be called.
table=/dev/hdb: Tells LILO to use the partition table from the primary slave drive.
map-drive = 0x80 / to = 0x81: Tells LILO to remap device 80 (primary master IDE drive) to 81 (primary slave).
map-drive = 0x81 / to = 0x80: Same as above, but in reverse.
5. Save the file.
6.
/sbin/lilo -L
Reboot, and Windows will be a boot option. If you choose it, LILO will trick it into thinking it is on the Primary Master drive, when in fact it is on the Primary Slave.
As usual, I hope this FAQ has been informative.