LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Triple-Boot Problem: Ubuntu, 7, and XP (https://www.linuxquestions.org/questions/linux-general-1/triple-boot-problem-ubuntu-7-and-xp-4175457121/)

opticks 04-06-2013 09:27 AM

Triple-Boot Problem: Ubuntu, 7, and XP
 
Hello all.

I have had a dual boot setup on my computer for some time now. I achieved this by first installing Windows 7, and then installing Ubuntu. Grub is the bootloader and I have had no problems.

I decided I've been working with so many XP machines that I wanted to have an install to play around with (there was getting to be too much overhead on the VMs). I made a third primary partition and installed XP to that.

At this point, only XP would boot (as I expected). I threw in Boot-Repair-Disc and ran the automated fix. This restored the original grub boot menu I had before, and at this point Ubuntu would boot fine, but Windows 7 would not boot when selected. Using the Windows 7 install disc I ran the startup repair, and this got the Windows 7 selection working again. However, I cannot see the XP install anymore :( Of course it is still there and intact, but running update-grub from Ubuntu didn't find the install, and the Windows 7 startup repair didn't find it during its 'searching for other Windows installations' phase. I even tried to add the menu entry manually to grub.cfg pointing to the partition XP is installed on.

So now I am not sure how to proceed. I wonder if XP needs to be added to the MBR, as it was somehow overwritten by Boot-Repair-Disc? Though I don't understand why or how. I was thinking perhaps I need to use the XP startup repair, followed by the Windows 7 startup repair, followed by Boot-Repair-Disc? I'm really not sure though, and don't want to get myself in any deeper lol so I figured it's about time to call in the cavalry and appeal to the gurus!

Anyone who can help shed some light on the topic, please do! TIA!

ronlau9 04-06-2013 11:48 AM

By default each windows system expect that he is on c drive : or the linux notification the sda1
As you installed windows xp as the last windows system you have to make him believe that he is on sda1 too
You can to this by drive mapping
If you do not know how to do it , post the partitioning of you're drive EQ the result of fdisk -l (L lower case }

opticks 04-06-2013 12:17 PM

Hey, thanks for the speedy reply.

Oddly, my XP installation is on the F: drive, and it sees my Windows 7 partition as the C: drive. Doesn't cause any problems since that's the way it installed, but I am pretty sure I will have issues if I try to change it.

I do not know how to do drive mapping lol, you lost me for a second there. Here is the output of the cmd you requested though:

Code:

root@hostname:~# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e098

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1      13087  105117696  83  Linux
/dev/sda2          13087      36366  186985472    7  HPFS/NTFS
/dev/sda3  *      36366      46809    83886080    7  HPFS/NTFS

The first partition is Ubuntu, then 7, then XP. After that is about 100GB of unallocated space, which I will probably format to an extended partition (which shouldn't cause any issues I don't think, but if I'm wrong please tell me lol).

yancek 04-06-2013 03:18 PM

windows bootloaders are backward compatible so Windows 7 should have detected the xp install. Don't know why it didn't. If you have windows 7 on sda2 and xp on sda3, maybe sda2 should be marked active/bootable. Try going to the site below and reading the instructions, downloading and running the bootinfoscript from Ubuntu (or any Linux Live CD) and posting the output, a results.txt file. It will contain detailed information on your partitions and boot files.

http://sourceforge.net/projects/bootinfoscript/

opticks 04-06-2013 09:29 PM

1 Attachment(s)
Attachment 12246

descendant_command 04-06-2013 09:42 PM

Looks like XP has plonked it's boot files on sda2.
Try copying/moving boot.ini ntldr and NTDETECT.COM to sda3.
Then boot buntu, run 'os-prober' which should show all three, followed by update-grub to write the correct grub.cfg.

syg00 04-06-2013 10:56 PM

Quote:

Originally Posted by yancek (Post 4926472)
windows bootloaders are backward compatible

Not strictly true - they are capable are recognising a prior release is installed during the install process. After that it can get ugly.

Without having to reinstall Win7:
- mark the XP partition as hidden.
- boot the Win7 DVD and get into recovery centre and restore the boot environment. Boot it to ensure it loads.
- hide the Win7 partition, unhide XP and do likewise.
- unhide Win7, fix grub - os-prober should find both now as both will have valid loader code for the appropriate system; Win7 via the BCD, XP via ntldr.

Looks nice in theory, but I've never installed Windoze systems "out of order" when I've needed dual boot.

opticks 04-07-2013 11:29 AM

Hey, thanks for all the suggestions.

I tried marking the 7 partition as active (I assume sda2=2nd partition and sda3=3rd partition, etc.), but that didnt seem to affect anything.

I copied the three files you listed to the 3rd partition / sda3 / the XP partition, and ran os-prober; this is the output:
Code:

/dev/sda2:Windows 7 (loader):Windows:chain
/dev/sda3:Microsoft Windows XP Professional:Windows1:chain

Followed by update-grub:
Code:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.6
Found initrd image: /boot/initrd.img-3.2.6
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
Found Microsoft Windows XP Professional on /dev/sda3
done

Could it be!? I think that may have done it! I'm in Linux right now, so let me reboot and check it out. Will post back soon!

opticks 04-07-2013 11:54 AM

Success! All of my systems boot and run fine now.

You guys have done it once again! It never fails! LQ is the hivemind of the Linux gurus!
You all shared useful info, so thanks be to you all.

descendant_command 04-07-2013 03:25 PM

Nice.
Thanks for contributing to the hive mind by posting back what works, :)

zubairismail 07-10-2014 04:00 PM

Well thats a good one...for me, I found my solution from a site here..May be that can help you too

http://softwarespro.com/2014/07/wind...activator-daz/


All times are GMT -5. The time now is 10:20 PM.