Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 am a budding Linux enthusiast who seems to keep running into problems, but am determined to fix this one. Hopefully someone here can help:)

I was having some problems with an install of Ubuntu 12.10 so I decided to reinstall Ubuntu Studio 12.04 over the existing install.

I am running a dual boot WinXP/Ubuntu system and decided it would be safe to reinstall Ubuntu from a liveusb of Ubuntu Studio 12.04 I had on an existing USB stick.

All went well, booted from the usb, played around with it for a while then decide to install. Chose the option that said 'Install over your existing Ubuntu 12.10' - let this run, finish and then rebooted.

I was then faced with the grub rescue prompt and 'no such partition'.

I then rebooted this time with my usb stick in and lo and behold it booted into grub with my usual boot options e.g. Ubuntu, Memtest, Win XP etc.etc.

So I figure somehow I've installed the bootloader to my USB (/sdb1) and my system won't boot without it.

Have installed boot-repair and ran the log:

My OLD Ubuntu 12.10 was installed on a partition called /dev/sda2 which no longer exists, and new install of 12.04 is on /dev/sda6.

Should I just run boot-repair and hope for the best? I have had a similar problem before and boot repair melted my system somehow. Fortunately I have got a complete image of my hard drive which I took about 6 months ago, I'd rather use this as a last resort though if I can't recover this.

Help me please!!!

share|improve this question

All you need to do is re-install grub. Put it onto the MBR of your first disk drive.

boot-repair is the appropriate graphical tool for the task ;)

See for details

share|improve this answer

You can fix it with either one of three things:

  1. Leave it as it is

    I understand your post, but this is the easiest thing to do, and that is to leave the flashdrive plugged into your computer. Then, everything will run smoothly and you will even have bootloader boot from some kind of an SSD. This is the easiest thing to do (nothing), but you will "lose" that flashdrive.

  2. Install Windows bootloader again

    Many linux users would say that you should definitely not do this, but it is a way. Plug in the USB and in grub menu select Windows XP. Let it boot, at user select take out the USB. Log in as administrator and download EasyBCD (and install it). Now, restore the Windows bootloader. The easiest way to do this is run EasyBCD and click "BCD Deployment". There, choose your os (Windows XP for this question) and click Write MBR. Now, if lower left corner shows "MBR Written succesfully", you are almost done. Now, you need to add Ubuntu to the Windows bootloader. We will use EasyBCD again, so click "Add new entry", select Linux/BSD, type is "Grub 2", name is whatever you want, then click "Add Entry". Confirm by going to "Edit boot menu" and maybe edit default. Confirm by rebooting with USB stick out.


  3. Install Grub again

    Put the USB in and boot linux from it. There, log into a terminal and type in sudo -i. That will get you a root prompt. There, type in grub-install /dev/sda, assuming your disk of installed Linux is /dev/sda, if not, replace /dev/sda with the correct disk. It will run some commands and install grub. Confirm by removing USB flashdrive and typing in "reboot".

share|improve this answer
@techraf OK, edited the answer to make it more "formal". Is it better now? Sorry for the edit, accidentaly pressed enter. – Kryštof Píštěk Apr 17 at 13:42

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.