PDA

View Full Version : Adding Linux to your W2k/XP Boot Menu.



Dramen
06-14-2002, 01:26 PM
This is how to dual boot W2k or XP & Linux and add Linux to W2k/XP Boot Menu:

1. Install W2k or XP. Partition part of it for W2k/XP (either NTFS or FAT32 will work).

2. Install Linux (any distribution).

You have to follow the following two steps exactly:

a. When asked where to install LILO, DO NOT install LILO in the MBR (Master Boot Record), since this will overwrite Windows OS Loader and you may have to reinstall W2k/XP. Instead, install LILO in other partition (superblock of the root partition of Linux drive).
b. Create a Linux boot disk. For now, this will be your only way of booting up to Linux.

3. After you have finished installing Linux, boot up to Linux (use the Linux boot disk).

4. Dump Linux boot sector to a file. Type the following:
dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1
If your linux boot partition is not in the hda2 partition, change if=/dev/hda2 accordingly (use df to get the correct partition).
For example, if your linux boot partition is in hda3, change the command to:
dd if=/dev/hda3 of=/bootsect.lnx bs=512 count=1

Once you run this command, you will have bootsect.lnx file in "/" (root) directory.

5. Mount a DOS formatted disk. Type:
mount -t msdos /dev/fd0 /mnt

6. Copy the bootsect.lnx file to the diskette:
cp /bootsect.lnx /mnt

7. Boot up to W2k/XP (by removing the Linux boot disk).

8. After booting up to W2k/XP, insert the DOS disk, and copy the file A:\bootsect.lnx to C:\ drive.

9. Edit C:\boot.ini. Usually this file is not visible. Start notepad, then open file C:\boot.ini. Add the following line to the bottom of the file:
C:\BOOTSECT.LNX="Linux"

10. Now reboot, and you will have the option to boot either to Windows or Linux.

Below is my Boot.ini, which is set up to boot XP, XP cmd console, Mandrake and RedHat.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft XP Professional"
C:\CMDCONS\BOOTSECT.DAT="Microsoft Recovery Console" /cmdcons
C:\BOOTSECT.LNX="RedHat Linux"
C:\BOOTSECT.LUX="Mandrake Linux"

IFMU
10-18-2002, 07:07 PM
To bad that makes absolutely no sense what-so-ever to the linux newb that I am.

Kurupt
10-18-2002, 07:19 PM
Well I just got linux "redhat 7.2" talk about a fun little day I had trying to get the internet settings working =/


-chris

dropadrop
04-08-2003, 02:47 AM
Great advice! Too bad I did'nt find it earlier...

I have redhat running on my server, but it's not dualboot, and I did'nt have the need to study the boot up. I installed redhat next to win2k on my main machine, and managed to completly mess up the mbr. The next time I did the floppy thing, but used a very bad floppy that would never boot...

piercedandtatto
01-05-2004, 12:30 AM
Im already duel booting xp and win2k3 enterprise....will this work if i tried a tripple boot? Been thinking about playing around a little with linux but i dont want to get rid of either of my other operating systems

sjohnson
01-05-2004, 06:03 AM
The same process will work for triple booting.

At one point, I've had DOS 6.2, WFW, Win98, Win2k and Linux all bootable on the same rig.

This method takes the most time but is the "safest" way to multi-boot for someone whose primary O/S is windows - because it doesn't mess with the windows way of booting.

Darkfold
02-28-2004, 02:58 PM
Grub seems to be good at holding my boot options sane. Got redhat 8, suse 9 and xp all loading from it without any trouble (on a laptop)

gkirilov
01-28-2005, 06:19 AM
question.
i HAD a dual boot - winXP and Linux. But. What happens if you re-install WIN XP. The MBR is erased and no Linux in the boot menu.
Any ideas? /exept using third party tools to have a boot menu/

smokey
01-28-2005, 07:50 AM
Umm... if you follow the guide, then you wouldn't have that problem. You are currently somewhere between steps 1 and 2. Continue as usual. Wash, Rinse, Repeat.

Eliatamby
05-20-2006, 07:34 PM
Another way if you have mulitple disks is to make your linux disk your primary boot device. Install grub/lilo on there, and set up the config as needed. Then, if you need to boot to Windows with linux removed, set the Windows disk as the primary boot device

2Fast4U2
06-15-2006, 09:26 AM
Keep in mind, this install procedure will NOT work with Vista!:nono:

Vista's new bootloader (BCD/boot.mgr) will disappear after installing Grub/Lilo and a repair will be needed to get Vista back which will subsequently make Grub/lilo disappear................:rolleyes:

A new bootloader will be released soon by Pro One which will make this easier to do, but, for now the easiest method is to boot Linux from a floppy..............