Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a computer with one HDD that has Ubuntu 14.04 as the only OS and GRUB2 on the same disk (hd0/sata0). Its partitions are:

sda1 - ext4 primary
sda2 - swap area
sda3 - NTFS

I found an old HDD that has XP installed on it as the primary (and only) OS. I attached it to my computer (sata1) and it is recognized by the GRUB2 as hd1.

My goal is to load the XP OS (without changing the BIOS boot order or reinstalling XP) via the GRUB2 command line/configuration files.

I entered the GRUB2 command line and tried the following commands:

set root='(hd1,msdos1)'
drivemap -s hd0 hd1
chainloader +1

This solution didn't work. It said that the command drivemap doesn't exist and the command chainloader asked for an input file.

How can I boot Windows XP (not EFI) using the GRUB2 on another HDD?

share|improve this question
Post the exact error message you are getting or try boot-repair . . You will have to disable uEFI in your bios (legacy boot) – bodhi.zazen Apr 29 '14 at 20:03

The error message you're seeing implies that your current setup is in EFI mode. Windows XP, though, does not support booting in EFI mode -- it's a BIOS-only OS. Furthermore, Windows XP has reached end-of-life (EOL) status. The simplest answer to your question is therefore "forget it." You should be able to extract user data from the disk from either a more modern Windows or from Linux. If you really have a compelling need to run Windows XP, I have several suggestions:

  • Virtualize it -- You can run XP in a virtual machine, such as under VirtualBox. See here for information on how to provide VirtualBox with direct ("raw") disk access to boot your existing Windows XP installation.
  • Convert it all to BIOS mode -- You can convert all your current OSes to boot in BIOS mode. This will require doing a GPT-to-MBR disk conversion, re-installing GRUB, and either re-installing your existing Windows boot loader or re-installing Windows. This is probably the most difficult transition of the options described here, but it should work smoothly once you're done with it.
  • Manually switch boot modes -- Many EFIs provide a built-in boot manager that can switch between EFI-mode and BIOS-mode boots. If you have such a firmware, you should be able to manually switch boot modes by accessing this boot manager. Unfortunately, details vary greatly from one EFI to another, so I can't provide detailed instructions on how to do this.
  • Use rEFInd -- My rEFInd boot manager can switch boot modes, but you'll need to edit the refind.conf configuration file: Uncomment the scanfor option and ensure that hdbios is among the options. This feature is very primitive, though; at the moment, it usually works to boot only from the first hard disk, so you may need to swap disk cables or install a BIOS-mode boot loader on the first disk to redirect the boot process to the second disk. Some computers lack the necessary firmware features for rEFInd to work at all in this way.
  • Use a second computer -- This is the simplest option. Stick the disk in a second computer and use it.

Note also that Windows (even as old as XP) tends to be fussy about its hardware, so it may require several reboots to update its drivers for its new environment. In fact, it probably doesn't even have drivers for modern computers; you may need to get them from your computer's manufacturer -- assuming they even exist! (VirtualBox is likely to be easier this way, because it emulates fairly old hardware.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.