Another xp/mint dual boot problem

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ltspicoli

Another xp/mint dual boot problem

Post by ltspicoli »

So I have tried scanning the forum here and elsewhere in an attempt to fix my dual boot problem (sigh) with no avail.

-> I formatted my computer (2 hard drives) and installed Windows XP Pro on to the slave drive (my master wasn't taking the install so I installed on slave to see if it was the install disk).
-> windows installed fine, and I figured this was a great time to install mint (as I have wanted to dual boot for a long time now).
-> Mint installed beautifully and i am using it to type this. The only problem, is i no longer can boot into windows.... grub must not have auto detected.

Current partitions (from gparted)
MASTER:
/dev/sda1 5GB linux swap with boot flag set [i don't know how the boot flag was set here.... keep reading]
144.05GB unformatted space

SLAVE:
/dev/sdb1 20GB ntfs no flags [this is where Windows XP is]
/dev/sdb2 20GB ext3 /,/dev/.static/dev mountpoint, no flags [this is where mint is installed]
/dev/sdb3 109.05GB ntfs no flags [i was going to use this for windows apps, etc.]

this is the last part of my grub menu.lst:

Code: Select all

title		Linux Mint, kernel 2.6.24-16-generic
root		(hd1,1)
kernel		/boot/vmlinuz-2.6.24-16-generic root=/dev/sdb2 ro quiet splash
initrd		/boot/initrd.img-2.6.24-16-generic

title		Linux Mint, kernel 2.6.24-16-generic (recovery mode)
root		(hd1,1)
kernel		/boot/vmlinuz-2.6.24-16-generic root=/dev/sdb2 ro single
initrd		/boot/initrd.img-2.6.24-16-generic

title		Linux Mint, kernel memtest86+
root		(hd1,1)
kernel		/boot/memtest86+.bin
*****************
I have tried the following options, by placing them below what you see above (all separately)

Code: Select all

title		Windows
root		(hd0,0)
chainloader +1

Code: Select all

title		Windows
root		(hd1,0)
chainloader +1

Code: Select all

title		Windows
root		(hd1,0)
map         (hd0) (hd1)
map         (hd1) (hd0)
chainloader +1
*******************************
I am pretty sure that my windows root is (hd1,0), but on the variations that I tried with that i was getting the famous NTLDR does not exist error. I ran the recovery cd using fixboot, where it said that there was a problem and it fixed it, however, i still cant boot. Using supergrub hasn't helped either... whenever i try to switch hd (because win is on hd1) it freezes with select hd written on the screen.

if anyone has any suggestions, besides reinstall everything, I would really appreciate it!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ltspicoli

Re: Another xp/mint dual boot problem

Post by ltspicoli »

appendment:
here is the <<fdisk -l>> printouts of both drives

HD0 (master):

Code: Select all

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb0efb0ef

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         653     5245191   82  Linux swap / Solaris
HD1 (slave):

Code: Select all

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x31d22dc5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2611    20972826    7  HPFS/NTFS
/dev/sdb2            2612        5222    20972857+  83  Linux
/dev/sdb3            5223       19457   114342637+   7  HPFS/NTFS
rbanavara

Re: Another xp/mint dual boot problem

Post by rbanavara »

I am not sure on this, but is based on what ever I have heard before...

Windows boots only if its on first disk (primary). so I would expect the map to happen before you even mount:

Code: Select all

map         (hd0) (hd1)
map         (hd1) (hd0)
title      Windows
rootnoverify      (hd0,0)
chainloader +1
Try this out, may work.
ltspicoli

Re: Another xp/mint dual boot problem

Post by ltspicoli »

rbanavara wrote:Windows boots only if its on first disk (primary)
This is essentially what my problem was. On my install of mint, i set hd0,0 to be my linux swap. So, even though windows was on hd1, it required that some boot stuff gets put on hd0. I overwrote it on my format for swap space, and it was unrepairable (but still had the boot flag). Perhaps I could have fixed it, but during my attempts at one point I was no longer able to mount my NTFS windows partition in mint. This made me feel that it needed to be reformatted, so I reinstalled windows, went to the live boot of mint to reinstall grub, and after editing the menu.lst file am right where I want to be!

:arrow: Moral of the story: installing windows on anything but hd0 is not worth it (at my skill level [~7/10]).

If anyone has ideas or responses to my original post for all those others who are experiencing problems, please continue to post. And now for all the windows xp updates since september 2004... :roll:
User avatar
merlwiz79
Level 8
Level 8
Posts: 2418
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

Re: Another xp/mint dual boot problem

Post by merlwiz79 »

For anyone who is having the same problem and wants to fix it you don't need to format anything.
Just edit your menu.list to look similar to mine.

Code: Select all

title		Windows Vista/Longhorn (loader)
root		(hd1,0)
savedefault
makeactive
map		(hd0) (hd1)
map		(hd1) (hd0)
chainloader	+1
Image
Fred

Re: Another xp/mint dual boot problem

Post by Fred »

While we are on the subject, I'll give you a couple more tid-bits of info. Windows wants to be on the first primary partition of the first drive. It is usually wise to follow this rule unless there are over riding reasons not to, ie more than one Windows install on your system, etc.

Having said that, you can fool Windows into booting when it is in other positions. What merlwiz79 showed you above remaps the the partitions for Windows so the loader thinks the second drive, first partition is the first drive, first partition and the first drive, first partition is the second drive, first partition. This works if the installation is on the first primary partition of the drive.

If you have Windows on the second, third or fourth primary partition of a drive you can mask or hide the partitions before the install partition and then remap it to the first drive position. Again fooling the Windows loader into thinking it is booting from the first drive, first partition. All this hiding and remapping gets a bit complicated, but it can be done. I will leave it to your own research to workout all the combinations possible, but it is possible.

Notice I have only been referring to primary partitions. I have never been able to get Windows to boot reliably from a logical partition, so I wish you good luck with that. :-)

Fred
AK Dave

Re: Another xp/mint dual boot problem

Post by AK Dave »

It theoretically should be possible to do more complicated things, but I concur with Fred: give Windows the first partition on the first drive and it is very happy. The only other way I've had success is to put a linux swap as the first partition and Windows as the second, since Windows cannot see or be confused by the linux swap.
Locked

Return to “Installation & Boot”