• We've upgraded our forums. Please post any issues/requests in this thread.

Help on triple boot: Ubuntu, Win 7, XP.

Joined
Dec 13, 2011
Messages
390 (0.18/day)
Likes
31
Processor Intel C2Q Q9550 (2.83 GHZ)
Cooling Intel OC27vv
Memory 12 GB DDR3 667mhz
Video Card(s) XFX Radeon HD 5670
Storage Seagate - 500GB | 7200RPM | 32MB Cache | Sata-3G
Display(s) BenQ RL2455
Case Dell Tower
Audio Device(s) On-board
Power Supply Corsair 600w
#1
I'm trying to triple boot my laptop for the first time. I started off with just Windows 7, and I installed Ubuntu 11.04. All went well from the dual-booting aspect. After installing Windows XP, I had to use Boot Repair, so grub will be the default boot loader. The only way I can boot into XP is selecting Windows 7 from the grub menu, then choose XP from Windows 7 boot manager. How can I add XP to Ubuntu boot menu? I've tried editing /etc/default/grub and using os-prober to no avail. Basically, I want to be able to use XP without going through Windows 7. I read some where that you can manually add entries, but I have no idea as to where. It goes something like this:

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

Any help is greatly appreciated!
 

newtekie1

Semi-Retired Folder
Joined
Nov 22, 2005
Messages
24,277 (5.51/day)
Likes
10,365
Location
Indiana, USA
Processor Intel Core i7 4790K@4.6GHz
Motherboard AsRock Z97 Extreme6
Cooling Corsair H100i
Memory 32GB Corsair DDR3-1866 9-10-9-27
Video Card(s) ASUS GTX960 STRIX @ 1500/1900
Storage 480GB Crucial MX200 + 2TB Seagate Solid State Hybrid Drive with 128GB OCZ Synapse SSD Cache
Display(s) QNIX QX2710 1440p@120Hz
Case Corsair 650D Black
Audio Device(s) Onboard is good enough for me
Power Supply Corsair HX850
Software Windows 10 Pro x64
#2
You can't, AFAIK, you have to select Win7, which initiates the Windows boot loader and then select between the different versions of Windows from there.
 

temp02

New Member
Joined
Mar 18, 2009
Messages
493 (0.15/day)
Likes
165
#3
AFAIK
Code:
sudo update-grub
should pick both windows versions, as long as they reside on different partitions.

BTW, can you post the result of
Code:
sudo os-prober
?
 
Joined
Dec 13, 2011
Messages
390 (0.18/day)
Likes
31
Processor Intel C2Q Q9550 (2.83 GHZ)
Cooling Intel OC27vv
Memory 12 GB DDR3 667mhz
Video Card(s) XFX Radeon HD 5670
Storage Seagate - 500GB | 7200RPM | 32MB Cache | Sata-3G
Display(s) BenQ RL2455
Case Dell Tower
Audio Device(s) On-board
Power Supply Corsair 600w
#4
AFAIK
Code:
sudo update-grub
should pick both windows versions, as long as they reside on different partitions.

BTW, can you post the result of
Code:
sudo os-prober
?

Here's the results from os-prober.

/dev/sda1:Windows 7: (loader):Windows:chain

update-grub finds only Linux and Windows 7; Windows XP resides on /dev/sda2
 

temp02

New Member
Joined
Mar 18, 2009
Messages
493 (0.15/day)
Likes
165
#5
Since os-prober doesn't pick it up you can always add it to 40_custom and it will be added to grub.cfg every time update-grub is executed (these manual entries will be added after the entries found by os-prober during the update-grub process).

So
Code:
cd /etc/grub.d/
sudo gedit 40_custom
and paste the following on the end of the file (don't delete the top content of the file, also this is based on XP being on NTFS sda2)
Code:
menuentry "Windows XP" --class windows --class os {
	set root=(hd0,2)
	insmod ntfs
	chainloader +1
}
save and close GEdit.
After that, run
Code:
sudo update-grub
reboot and see if it works.
Good luck.
 
Joined
Dec 13, 2011
Messages
390 (0.18/day)
Likes
31
Processor Intel C2Q Q9550 (2.83 GHZ)
Cooling Intel OC27vv
Memory 12 GB DDR3 667mhz
Video Card(s) XFX Radeon HD 5670
Storage Seagate - 500GB | 7200RPM | 32MB Cache | Sata-3G
Display(s) BenQ RL2455
Case Dell Tower
Audio Device(s) On-board
Power Supply Corsair 600w
#6
Since os-prober doesn't pick it up you can always add it to 40_custom and it will be added to grub.cfg every time update-grub is executed (these manual entries will be added after the entries found by os-prober during the update-grub process).

So
Code:
cd /etc/grub.d/
sudo gedit 40_custom
and paste the following on the end of the file (don't delete the top content of the file, also this is based on XP being on NTFS sda2)
Code:
menuentry "Windows XP" --class windows --class os {
	set root=(hd0,2)
	insmod ntfs
	chainloader +1
}
save and close GEdit.
After that, run
Code:
sudo update-grub
reboot and see if it works.
Good luck.
I followed your steps and successfully created the "Windows XP" entry on grub boot menu, but when booting from grub, I get NTLDR is missing error. However, when I select XP from Windows boot manager; it works. I'm assuming it has been overwritten by Windows 7. Does it matter in which particular order you install the OS'es? I installed in this order: Win 7, Unbutu, XP.
 
Last edited:

temp02

New Member
Joined
Mar 18, 2009
Messages
493 (0.15/day)
Likes
165
#7
It errors at "missing NTLDR" because Windows XP boot loader wasn't installed on the partition with XP itself, so it relies on the Windows 7 loader. You might wanna do this:
  • Boot Ubuntu;
  • Run
    Code:
    sudo apt-get install gparted
    then run it
    Code:
    sudo gparted
  • And you should see that the Windows 7 partition has a flag indicating that it is a boot partition, remove that flag;
  • Reinstall Windows XP on sda2 (now XP should install its loader on sda2 too);
  • Test if XP boots from GRUB;
  • After this restore the boot flag on the 7 partition and test all OSs;
I remember doing something like this long time ago (Longhorn/Vista early days), but it was with two different HDDs so it was "kinda" easier.
Good luck.
 
Joined
Dec 13, 2011
Messages
390 (0.18/day)
Likes
31
Processor Intel C2Q Q9550 (2.83 GHZ)
Cooling Intel OC27vv
Memory 12 GB DDR3 667mhz
Video Card(s) XFX Radeon HD 5670
Storage Seagate - 500GB | 7200RPM | 32MB Cache | Sata-3G
Display(s) BenQ RL2455
Case Dell Tower
Audio Device(s) On-board
Power Supply Corsair 600w
#8
It errors at "missing NTLDR" because Windows XP boot loader wasn't installed on the partition with XP itself, so it relies on the Windows 7 loader. You might wanna do this:
  • Boot Ubuntu;
  • Run
    Code:
    sudo apt-get install gparted
    then run it
    Code:
    sudo gparted
  • And you should see that the Windows 7 partition has a flag indicating that it is a boot partition, remove that flag;
  • Reinstall Windows XP on sda2 (now XP should install its loader on sda2 too);
  • Test if XP boots from GRUB;
  • After this restore the boot flag on the 7 partition and test all OSs;
I remember doing something like this long time ago (Longhorn/Vista early days), but it was with two different HDDs so it was "kinda" easier.
Good luck.
I did exactly what you said and came up with the same results. It doesn't really matter, though. It's just a slight inconvenience that I can overlook. However, I will remember the steps and commands your provided me for future reference. I appreciate your time and effort in helping me with this matter. One last question. Is it possible to have the following OS'es: Windows XP, Windows 7, and Windows Home Server, all without conflicts?