Dual Boot/Dualboot Linux with nt/2k/XP



Thank you all who have re-written what I have done and made it pretty for others to see. Most of all thank you for the credit. So far I have credit on over 40 websites around the world, some I can't even read or translate. PS: Thank you Red Hat for sending some of your clients to my site for help.


This site has navigation from here Otherwise navigation is not nice at all. You've been warned.


Reported problems from users about the install process I use

I used grub to dualboot and it was even easier than this on 07-31-2002


Have a success/failure story you would like to share? Want to see something else? Ways for me to improve? Have something you would like to add?

You can find other references on the net about this that have more info than I do, but it is changing. This is only directions that I know work. I'll let everyone know when I finish my latest test on the install. I'm thinking that when I had 98 and Linux togehter one time and threw on XP that I didn't have to change anything. I could boot into the NT loader and choose DOS and LILO would pop us, but I need to retest to see for sure.

You may want to look at Second Operating System (OS) Concerns and What is a filesystem? before going on


Here is some reading ,directly from Red Hat, that gives some key points to consider. They also explain some of what I am doing here.


Operatings Systems I have used to do this include:Red Hat Linux 7.2-9.0, Windows 98se, Windows NT 4.0 Server and Workstation, Windows 2000 Professional and Advanced Server, and Windows XP build 2505(Beta) and 2600(Retail). All installs were done on a single hard drive in various systems. Someone e-mailed me that they did it with Mandrake 8.1 or 8, I forget.


When installing XP/NT you must remember that most Linux distrobutions can't read a NTFS partition. So if you want to share info between Linux and NT you're going to have to make a small fat32 partition to do so. Otherwise you will have to compile the kernel with read-only NTFS support or go through a hassle to get it to write to an NTFS partion. Though you can use NFTS for this process.

This tuturoial is not meant to teach you Linux, only how to dual boot it with Windows. After you install XP/NT you need to install Linux, or you can install XP first. With these instructions I have put 98 first with Linux followed by XP. So it is up to you. When installing Linux do not install LILO into the MBR Install it the first boot partion of the drive you install it into, and remember where you installed the /boot partiton. Like /dev/hda4 or whatever.

This method works for LILO. I do not use GRUb this way. I would advise you to get a newer version that has GRUB and use it to install with. It has not failed me once. But if you are in a situation and need this it is here for you.

I DO NOT RECOMMEND INSTALLING INTO THE MBR - THIS MAY FAIL IF YOU DO SO


Make sure you make the boot disk, otherwise this process will not work.


Note: Installing Linux , Red Hat 7.1 and down at least, have a limitation that you must install the /boot to the first 1024 sectors of the disk and your present OS installed may be bigger that that. So if installing an older verion of Linux, install it before NT or XP will keep you where you need to be, NT/XP will take the MBR anyway.

Someone aksed, "Why not install into the MBR?" --- Upon initial install Red Hat will see and boot Win98 and ME from LILO, but we are using an NTFS partition and not a fat32. Although Linux can read-only NTFS, it is not recommended by most. In most cases Linux will fail to boot the NT install, even when it looks all good and you think it will. You may as well go ahead and do it right the first time rather than fdisk/mbr and adding to its headaches.

Make sure you make the boot disk. Otherwise this process will not work.


I DO NOT RECOMMEND INSTALLING INTO THE MBR - THIS MAY FAIL IF YOU DO SO


Once you have finished the Linux install make sure you can still boot XP/NT. You can? Now boot Linux using the boot disk I told you to make. You can do that too?

Now you need a formated DOS floppy to use. Once you have that you can boot into Linux using your boot floppy. Now go to the root drive (cd /) and type the following command.

df -h

You can 'man' the df command, bascically it will show you the current filesystem, the H is human readable. Look for the /boot part of it.

Then type the follwing command to copy the the boot sector info from the boot sector to the root of linux

dd if=/dev/hda4 of=/bootsect.lnx bs=512 count=1

the if=/dev/hda4 is supposed to be where you put the /boot partion so look at yours and replace as needed.

Do an ls to see if it is there, like it is supposed to be.

Now put in the dos floppy and do the following commands to mount and copy the file bootsect.lnx to the floppy

mount -t msdos /dev/fd0 /mnt

Mounts the ms-doss floppy so you can use it.

cp /bootsect.lnx /mnt

Copies the boot sector info to the floppy and the last command will list the floppy to ensure it is there.

ls /mnt

Is it there? Good. Now unmount the floppy drive.

umount /mnt

Now reboot into XP/NT and go to a Dos prompt with the following command.

Do this from the DOS promt

If you do this from Windows Explorer and Notepad, you will get a blinking cursor when you try to boot Linux from the boot loader.

Do it from the dos prompt


Start ---> run ---> cmd

This will open a dos box for your needs in editing the file boot.ini is in the c:\ directory.
Now let's move into the right direcoty and set the file properties to not read-only, not system, not hidden

cd \

attrib -r -s -h boot.ini

Remember to use edit from a dos prompt here

edit boot.ini

It should look something like this.

[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="Microsoft Windows 2000 Professional" /fastdetect

Now look at the bottom of the file and add the following to it

c:\bootsect.lnx="Linux"

Once you add that, it should now look closer to this.

[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="Microsoft Windows 2000 Professional" /fastdetect
c:\bootsect.lnx="Linux"

attrib +r +s +h boot.ini

Now copy the a:\bootsect.lnx file from the floppy to the root drive c:\ .

Simply put the floppy in the drive and copy the file a:\bootsect.lnx c:\ . Stay at the dos prompt and type the following commmand to copy it to your c:\ drive


copy a:\bootsect.lnx c:\

Now you should be able to reboot and have Linux as part of your XP/NT boot loader and hit Linux to boot Linux

This file was created in less than 5 mins so if a typo occurs I will fix as I go

DATA HOME    HOME

Contact Web beginner
CSK