Dual-booting Linux and Windows 2000/XP

Naveen Selvadurai
[ << back home]

  1. Use fdisk to partition your drive properly.
  2. Install Windows 2000/XP on the first partition.
  3. Start your Linux Installation and install the /root directory into the second partition. Install LILO into the first sector of your boot partition (usually /boot) and not in the MBR.
  4. Make a boot disk during the Linux installation if possible so that you can boot into it.
  5. Now boot into Linux and copy the boot image from the boot sector. To do this run: dd if=/dev/hdan of=/bootsect.lnx bs=512 count=1, where /dev/hdan is the location of /boot and /bootsect.lnx is the Linux boot image. Copy this bootsect.lnx file to a safe location where you can reach it using Windows.
  6. Reboot into Windows 2000/XP and copy this bootsect.lnx file into the root directory (C:\).
  7. Edit c:\boot.ini and append the following line: c:\bootsect.lnx="Linux".
  8. Reboot your system and boot directly from the hard disk.
  9. The Windows NT boot loader should now give you the option of booting into either Windows 2000/XP or Linux. Try booting into both of them to see if you were successful.
Additional Comments:

Date: Tue, 23 Oct 2001 10:30:32 -0600
From: Pat Buick
Subject: Dual Booting Linux and Windows 2000


First off, thanks for the document, it was a pointer in the right direction.

In my case however, the user had installed NT and clobbered the MBR,
which is where LILO was stored.  However on this version of Linux
(RedHat 7.x  if I recall correctly), when the system gets ready to make
the boot sector, it creates a file in /boot called boot.xxxx where xxxx
is some number. (In his case, it was 0300 again IIRC.)  This file is 512
bytes long to match the boot sector size. I found this because he had
(smart man) created a boot floppy for the system and was able to boot
into the system to find this file.

I copied this file into the bootsect.lnx file as you suggested and
voila, the system booted into Linux.

I just thought you might add a small section to your writeup that if the
actual boot code is *not* installed in /boot, but in the MBR that people
should look for this file as an alternative way to get the boot sector

Patrick D. Buick