Page 1 of 1

XP after linux

Posted: Sun Sep 07, 2008 4:04 am
by wisper
guys, need advice

so after some time on mint alone, ive decided to dual with xp. which would be fine, except that instead of seeing my choices in grub after xp install, i just saw painfully familiar xp logo. now, i cant access my linux data except from live cd.

as i understand dual boot of linux after windows is ok, but the other way around is a no-no?

Re: XP after linux

Posted: Sun Sep 07, 2008 4:29 am
by msuggs
wisper wrote: as i understand dual boot of linux after windows is ok, but the other way around is a no-no?
Yes that's right but fortunately you have a live cd and it's easy to fix

http://www.linuxmint.com/wiki/index.php ... _your_grub

Re: XP after linux

Posted: Sun Sep 07, 2008 12:43 pm
by Lantesh
You can have XP after Mint on your hard drive, but you have to make adjustments in menu.lst to adjust for that. I'll give you my PC as an example.

My output for the command: sudo fdisk -l

Code: Select all

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1530    12289693+  83  Linux
/dev/sda2            1531       10199    69633742+   5  Extended
/dev/sda3   *       10200       15298    40957717+   7  HPFS/NTFS
/dev/sda4           15299       60801   365502847+  83  Linux
/dev/sda5            1531        1785     2048256   82  Linux swap / Solaris
/dev/sda6            1786        4335    20482843+  83  Linux
/dev/sda7            4336       10199    47102548+  83  Linux
Notice that my Windows XP installation is on sda3, which in this case is the second primary partition on the disk, as sda2 is an extended partition containing sda5, sda6 and sda7.

Here is my Windows entry in menu.list. Notice how I changed the root entry to reflect that the Windows partition is not the first primary partition on the disk, but in fact the second.

Code: Select all

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title		Microsoft Windows XP Professional
root		(hd0,2)
savedefault
makeactive
# map		(hd0) (hd2)
# map		(hd2) (hd0)
chainloader	+1
I hope this helps you.

Edit: After re-reading your post I think I didn't understand correctly. Perhaps you simply meant installing XP after Mint, not it's location on the hard disk. Well either way I'll leave the info I put up just in case, and also mention that restoring Grub to the mbr is super easy if you have a copy of Super Grub Disk laying around.

Re: XP after linux

Posted: Sun Sep 07, 2008 1:42 pm
by nelamvr6
Lantesh wrote:
Edit: After re-reading your post I think I didn't understand correctly. Perhaps you simply meant installing XP after Mint, not it's location on the hard disk. Well either way I'll leave the info I put up just in case, and also mention that restoring Grub to the mbr is super easy if you have a copy of Super Grub Disk laying around.
I concur, Super Grub has helped me out once or twice... great tool!

Re: XP after linux

Posted: Sun Sep 07, 2008 4:52 pm
by wisper
thanks to all for quick replies

however the problem remains: howto make xp bootable?

title Linux Mint, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint, kernel memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
boot

title Microsoft Windows XP Professional
root (hd0,1)
makeactive
chainloader +1

but no luck. im not sure about the root (hd0,1) though. might be (hd0,2). How to find out for sure?

Re: XP after linux

Posted: Sun Sep 07, 2008 5:09 pm
by nelamvr6
Whenever I had problems like this I just used trial and error.

if hd0,1 doesn't work, try hd0,2.

It prolly isn't the second partition anyways, since the linux swap file will prolly be hd0,1...

Re: XP after linux

Posted: Sun Sep 07, 2008 6:10 pm
by donec
For XP to be bootable it must be on a primary partition in fact no Windows OS has ever liked being anywhere other than the first position on the hard drive. You can place it in a different location provided you place it on a primary partition and are willing to face the chance it may take some extra work and may actually crash more often. I would suggest putting XP on a second drive with XP being the first partition and it being a primary partition.

Re: XP after linux

Posted: Sun Sep 07, 2008 7:14 pm
by Lantesh
Nevermind. I explained something in this post incorrectly, so I've deleted it.