PDA

View Full Version : Dual-booting Linux and Windows 2000/XP


pikachu
10-13-2002, 08:15 PM
Naveen Selvadurai

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

Naveen,

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
information.

--
Patrick D. Buick

ExtremVi3t
10-21-2002, 01:45 AM
anyone try it yet? i want to give it a shot. But khong biet co' work hay khong. Extrem Ti'nh la` use removable hard to install ma` read duoc cai info nay EXtrem thich lam, Nhung khong biet la` co' duoc hay khong..

Vuthu co' y' kien gi` khong

pikachu
10-21-2002, 06:52 AM
Tui thu roi no work do'. You don't need to have FAT partition on your system to make it work. I tried it the first time, nothing worked! I had to reinstall the GRUB again on the boot partition , not the MBR, and follow the instruction. If you have any problem let me know.

Now I'm using VMware that let you run Win and linux on the same hard drive at the same time. I can switch back and forth between two OS without reboot the system. It's really worth a try.

yeudoi
10-21-2002, 06:54 AM
I've done the triple boot before. It should work if you do it correctly. ;)

unknowxmas
10-21-2002, 07:59 PM
thanks for the info, i am going to try it soon :xmas:

ExtremVi3t
10-22-2002, 12:07 AM
here is what i did to day but is not work...
1. fdisk and make 2 partion
2. 1st i format as ntfs to install windows xp
3. 2nd i leave it unkown
4. install windows xp on the 1st part....done
5. insert linux red hat 7.2 in cd rom drive and reboo sys... to install linux
6. i'm format the 2nd part.. with linux.
* /boot (60mb)
* / (4000mb)
* /swap (516mb)
* /home (all available)
7. I'm install LILO on o boot dir of 2nd Part......done...and create a bootdisk for linux
8. Boot in to linux and type command that show above the it not work it say (error that is not file or directory)
9. waitting for a instruction from u guys..

kmaicorp
10-22-2002, 03:15 PM
what was the command you type?
did you boot into linux or into lilo?

when you first boot, you should get a lilo screen, there you choose a boot partition, if you dont choose any, the default will be used. will need some more information from you to understand your situation better.

pikachu
10-22-2002, 08:07 PM
In order to apply the command you need to know where the boot partition is. Execute this command "df"
>df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 3771316 1650848 1928896 47% /
/dev/sda1 101089 9482 86388 10% /boot
none 63088 0 63088 0% /dev/shm

So the boot partition is on /dev/sda1 in this example. you need to type the following command to copy the linux boot image to the floppy

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

Because I use SCSI hard drive , the device for SCSI partition is sdax (x can be 1,2,3 ...). If you are using IDE hard drive , the device will be hdax.
Try again and let us know the result. :)