Grub2 detects Windows 7 when only Windows XP is installed

Bug #525643 reported by Andreas Schildbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: grub2

On a drive containing Windows XP and Ubuntu Lucid, grub2 (grub-update) detects Windows 7 instead of XP. Booting into XP works fine, though.

Revision history for this message
Colin Watson (cjwatson) wrote :

Do you have a \bootmgr or \boot\bcd file in your Windows filesystem? If so, what's in \boot\bcd?

affects: grub2 (Ubuntu) → os-prober (Ubuntu)
Changed in os-prober (Ubuntu):
status: New → Incomplete
Revision history for this message
Andreas Schildbach (schildbach) wrote :

Both files are present and c:/boot/bcd is a binary file.

Changed in os-prober (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Robert Pollak (robert-pollak) wrote :

I had a similar, maybe related problem:
I have installed three OSes in separate partitions in the following order:
Windows XP, Windows 7 Ubuntu 10.04.
Windows XP is on another hard disk as the other two.

My problem was that Ubuntu's Grub2 detected my Windows XP as "Windows 7" and could not boot it. (The real Windows 7 was detected correctly.)

I noticed that booting the Windows XP directly (by removing the Win7+Ubuntu HDD) worked, and presented a WinXP/Win7 selection dialog. What had happened was that the installation of Windows 7 had added the abovementioned \bootmgr file and the \Boot directory to Windows XP.

So my fix was to rename these items to bootmgr.bak and Boot.bak. Now grub-update correctly detected Windows XP and added "drivemap -s (hd0) ${root}" to its grub.cfg entry, which made it bootable and removed the Windows-internal superfluous WinXP/Win7 selection dialog.

Revision history for this message
Asapuntz (asapuntz) wrote :

Similar problem - triple boot system with

XP SP3
Ubuntu 12.10
W8 RP (build 8400)

Ubuntu and XP are on the boot drive, but when W8 was installed on its own drive, it overwrote grub and installed Windows Boot Manager in the XP partition. I restored Grub2, then switched the XP paritition from WBM back to NTLDR using

bootsect.exe /nt52 D: [from a W8 administrator System32\cmd.exe]

However, grub-update still recognizes the XP partition as Windows 8 (loader), resulting in 2 such entries in the boot menu. One runs XP, one runs W8, but you have to remember which is which.

It would be much cleaner if grub-update could read the volume/master boot code to figure out which is active, rather than "guessing" based on the presence (and contents) of bootmgr / ntldr files?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.