Grub menu displays Windows XP on Wubi installation

Bug #466745 reported by Rob Beard on 2009-10-31
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)

Bug Description

When booting Ubuntu from Windows XP boot menu, a Grub menu appears with three options, Ubuntu Linux, Ubuntu Linux rescue mode and Windows XP on /dev/sda1

Selecting Windows XP on this grub menu comes up with an error.

I'm guessing that the Ubuntu installer is detecting Windows XP and falsely installing it as an option in the Grub menu.

Steps to recreate...

Installed fresh copy of Windows XP Home SP3 on VirtualBox.

Installed Ubuntu 9.10 on top of Windows XP using Wubi installer on Ubuntu 9.10 CD. Rebooted and Ubuntu configured itself.

Rebooted and selected Ubuntu from Windows XP boot menu.

Grub menu appears with Windows XP on the list of operating systems.

Selected Windows XP and it appears with an error.

Rob Beard (rob-esdelle) wrote :

Just tried it with Windows Vista, again Grub lists Windows Vista but actually selecting Vista from the Grub menu (after selecting Ubuntu from the Windows Boot manager menu) reloads the Windows Boot manager menu rather than just throwing up an error.

Bowmore (bowmore) wrote :

Rob, could you please tell us what error message you get.

I tested this both on a real installation and a Wubi ditto and succeeded to boot XP from the real one. The Wubi install failed to boot XP.

The error was:
error: unknown command drivemap

Both cases contain the command:
drivemap -s (hd0) ${root}
but only the real installation accepted that.

Agostino Russo (ago) wrote :

The grub menu in the case of wubi should mostly be used for selecting a different kernel or recovery mode and hidden by default, since the OS choice has already been performed in a separate bootloader.

Rob Beard (rob-esdelle) wrote :

Hi Bowmore,

I also get the error...

error: unknown command 'drivemap'.


I agree, I'd have thought there shouldn't be an option for Windows XP on the grub menu, I would assume it would do the same as a single install of Ubuntu and boot automatically into the default kernel.


Rob Beard (rob-esdelle) wrote :

Sorry forgot to add (not sure if it's helpful or not), the command line it comes up with for the Windows XP option in Grub which doesn't work is:

insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set a8e4f4ebe4f4bc9e
drivemap -s (hd0) $root
chainloader +1


Bowmore (bowmore) wrote :

> since the OS choice has already been performed in a separate bootloader.

Agostino, if that is a fact then remove the os prober script /etc/grub.d/30_os-prober. That will give the user options only to boot Wubi Ubuntu kernels.

Agostino Russo (ago) on 2009-11-03
Changed in grub (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Agostino Russo (ago) on 2009-11-06
Changed in wubi:
status: New → Invalid
Colin Keenan (colinkeenan) wrote :

I went into /etc/grub.d and did a sudo chmod -x 30_os-prober, and then of course sudo update-grub. The result is that on the grub menu, where it previously said Windows XP Pro at the bottom, it now says Ubuntu at the bottom without specifying a build. If I choose that bottom option, I get the same error that Windows XP Pro was giving:

unknown command 'drivemap'

Carlos F Ostos (costos5350) wrote :

Hi all I am new to this forum, recently I install Ubuntu 10.04.1 using Wubi install program and I face the same problem you describe here. I got a boot menu from XP with 2 options 1 “Windows XP” and 2 Ubuntu. If I select option 1 I this take me to Windows XP without a problem but if I select 2 Ubuntu option, present me the grub menu with one and only option “Windows Xp Professional “ IF I select this option I got the error "unknown command 'drivemap'!." Does anybody already resolve that error?


Colin Keenan (colinkeenan) wrote :


Your problem seems much worse than what we were talking about. We just saw an extra option at the bottom of a list of options in the grub menu that gave the drivemap error. The top option was to get into the most recent version of Ubuntu and worked fine.

I never followed up on this problem because I just set the grub menu to not show up anymore since the choice had already been made with the Windows boot menu. Later, I stopped using Windows and just did a clean install from disk.

I think you should present your problem as a new question or bug because it's not the same problem that was being discussed here.

Colin Keenan (colinkeenan) wrote :

I think your Linux install failed so you should try it again or post the question in the install problems forum.

Erick Brunzell (lbsolost) wrote :

I'm now getting this with a Natty Wubi install using the 20110423 i386 iso-testing image. Note however that I was testing ubiquity so I did the install as follows.

I had Win XP installed and then created 3 more primary NTFS partitions. Then at the Allocate drive space screen I selected the option to install inside Windows. Please look at the first two screenshots here:

(The third screenshot regards a separate issue and I'll report it separately).

After removing the CD and pressing enter the machine rebooted and I was offered the Wubi DL. When the DL was complete I was prompted to reboot and did so. Then I selected Ubuntu from the Windows boot screen and the Wubi installation completed using the DL'ed image.

So far so good, but now each reboot first displays the Windows boot screen, selecting Windows works fine, but selecting Ubuntu brings up the grub menu which displays Ubuntu and Windows. Selecting Ubuntu or just waiting for the timeout boots Ubuntu as expected, but of course selecting Windows does not work.

I'll be glad to use apport-collect to gather info if needed.

Erick Brunzell (lbsolost) wrote :

Disregard that last post. I'm just testing the new ubiquity options and bcbc got me straightened out here:

Sorry for any confusion.

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

Other bug subscribers