Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 hard drive that has an xfs partition with ubuntu in it (that was created and installed first), and a windows xp ntfs partition that was installed second.

After I did this , I was getting the "Could not find operating system error" on boot, so I took some steps to re-install grub on the disk. This now lets me boot straight into Ubuntu, but it never stops to give me the option to boot Windows XP. HOw do I fix that? Attached is what gparted is showing me.enter image description here

share|improve this question

The ideal method is to install Windows first and Linux second. Then GRUB usually over-writes NTLDR and gives you access to both Windows and Linux. But now you've recovered GRUB and it cannot detect Windows partition. You have to manually point to it.

I think /dev/sda3 is the windows partition.

Edit /boot/grub/menu.lst file as root, then add the following lines -

title Windows
root (hd0,2)
chainloader +1

It just tells grub that the 3rd partition of first harddisk contains the Windows bootloader. Restart your PC. It should work.

share|improve this answer

Rebuilding the grub menu should automatically detect the bootable windows partition. This is the correct way to do that:

  1. Open a terminal and cd \boot
  2. sudo update-grub

That should list the windows boot as something like "windows recovery partition". Once you select that from the grub boot menu, it will list the actual text of the windows boot menu (including multiple windows boot partitions from the boot.ini).

If you edit the menu.lst manually, the next time grub gets an update, you'll lose those settings. So its general advised not to manually edit it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .