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 was a bit of an idiot and wiped my old Ubuntu partition whilst in Windows XP, forgetting to fix the MBR. Rebooting gives:

error: no such partition.
grub rescue>

The only things I've entered that do anything are set, which gives:


and ls, which gives:

(hd0) (hd0,msdos2) (hd0,msdos1)

I have no CD drive so I can't boot from CD, but I should be able to boot from USB (haven't tested it as I need to go find one first). Is there anything I can do to fix it without external media, and if not how would I go about fixing it from USB?

share|improve this question

Try running these commands on the GRUB command line:

insmod part_msdos
insmod chain
set root=(hd0,msdos1)
chainloader (hd0,msdos1)+1

If that fails, try using msdos2 in place of msdos1.

If you get it to to boot that way, you'll have to do that every time until you replace that bootloader.

To fix it from a USB drive, you'd either need to use a Linux LiveUSB to reinstall GRUB (the easiest way being just to reinstall Linux, although it is possible just install a GRUB partition for bootloading), or copy a Windows XP install CD to a USB drive and make it bootable and use the Recovery Console in Windows Setup to replace the Windows bootloader.

share|improve this answer

You must log in to answer this question.

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