Dual boot XP/pro and linux (lindows)

Klaus-Peter Schrage kpschrage
Mon May 17 11:46:02 PDT 2004


Joel Hammer wrote:
> I would like to dual boot XP pro and linux (lindows). I have 
> lindows on a hard drive (IDE0). I physically replaced  this hard drive with
> a second drive (still IDE0) and installed XP pro.
> 
> Now, I would like to have both drives installed at the same time and dual
> boot this machine.
> 
> This seems easy enuf but I can't find any references to dual booting XP and
> linux with lilo, which is the boot software in lindows.
> 
> Any pointers or references to documentation  appreciated.
> 

Now, there are basically two approaches:
a) To let the XP boot loader to the job, see
http://www.linux-sxs.org/administration/win2kboot.html
(should work for XP too)

b) To let grub or lilo do it, see the attached text which I had picked 
from a Redhat newsletter some time ago (don't know any reference URL)

Klaus
-------------- next part --------------
 Tips & Tricks: Dual booting Windows XP or 2000 with Linux

------------------------------------------------------------------------

There are a couple of ways to approach a dual boot.

In the first scenario, let's say you have an empty machine, and because
you're a glutton for punishment, you want both Windows 2000/XP and Red
Hat Linux. This is a bit like using Earl-shine on a Porsche, but here goes:

   1. Partition. Use fdisk to create two partitions of appropriate size
      for your install.

   2. Install Windows. You're on your own here. Time and many reboots go
      by...

   3. Boot into the Red Hat Linux installer, and install into the second
      partition. All should go swimmingly, until you're faced with a
      choice between boot loaders and install locations.

If you wish to let Lilo or GRUB control the install, so be it. Either
one *should* pick up the fact that Windows is already there and compensate.

If it doesn't, and your boot loader of choice only boots Linux, a
lilo.conf entry should look like:

other=/dev/hda1
label=windows

A grub.conf entry should look like:

title windows
	map (hd0,0) (hd0,2)
	map (hd0,2) (hd0,0)
	setup (hd0)
	rootnoverify (hd0,2)
	chainloader +1

(Hint: type "info grub" at a command prompt for a full breakdown of what
this entry means.)

You may choose to let another boot loader handle the install, in which
case you will want to:

Boot into Linux and copy the boot image from the first sector of your
boot partition. You'll want to take 512 bytes of this partition once,
and write it out to a file called bootsect.lnx. The entry should look like:

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

Move that file onto your c:\ drive and edit boot.ini, adding the
following line:

c:\bootsect.lnx="Linux"

On to the second, more common scenario. It's likely that you already
have Windows and are testing the waters, taking a class, or planing to
migrate. Or maybe you just want to get something done without crashing
for a change.

In this case:

   1. Scandisk, defrag, and empty your recycle bin (unless you want a
      clump of cruft at the end of your drive.)

   2. Repartition your drive with fips (or something similar). Don't
      bother trying to format this partition--you'll only wipe it out
      later and certain 3rd party formatting doesn't go right.

   3. Enter the Red Hat Linux installer and proceed through the install
      using the second partition as your target drive.

(Hint: make sure to create a boot disk. If something goes wrong, you
want to at least be able to get into one of the OS's.)

Check out the helpful dual booting HOW-TO's at:

    http://www.tldp.org <http://www.tldp.org/>

And read the lilo and/or grub info pages, for some of the other possible
scenarios, or activate your support entitlement and call our hotline.


More information about the Linux-users mailing list