I had a Ubuntu partition and windows 7 partition after installing windows 10 I accidentally deleted my Ubuntu partition, now I'm stuck at grub rescue. I saw a YouTube tutorial and did the steps like set boot, set prefix etc. I tried em all hd0 and msdos0 to 9. No luck... Any help? Pretty please...

  • This is a duplicate of at least three answered questions on Ask Ubuntu. Did you search before you asked? Aug 24, 2015 at 14:43
  • 4
    If partition is missing and was logical inside the extended this see this thread: askubuntu.com/questions/654386/…
    – oldfred
    Aug 24, 2015 at 15:35
  • What's your question? Apr 12, 2017 at 15:12
  • VTC as dup to get this 2 y/o abandoned question off the radar permanently. Feb 28, 2018 at 23:48

3 Answers 3


Use a Windows 7 disc (or later). Boot from the disc. Choose to repair the Operating system. Use Command Prompt and use bootrec /fixmbr command. This will remove grub and let you access windows only. Use a Linux live cd if you wish to restore grub


Another thing you could do (this worked for me) is take out your hard drives and then turn the PC/Laptop on, you should then try make your way into the Bios and stick windows on top of the boot order and Linux at the bottom, then save and exit.

Then turn off the PC/Laptop and stick the hard drives back in.


Others (including me) had this problem before. Visit GRUB rescue problem after deleting Ubuntu partition!

what worked for me was the answer from rumman0786:

boot your computer on a Ubuntu live-CD or live-USB

then follow the section "2nd option : install Boot-Repair in Ubuntu" from this link


This happend because you lost your ubuntu partition but still have the grub. In case you later want to remove a linux partition, remove the grub first and then the partition (plenty of info on askubuntu and youtube about that)

  • Welcome to Ask Ubuntu. Please note that in order to minimize clutter, when you come across a question that has already been asked here, it is good practice to flag it as a duplicate.
    – hmayag
    Aug 24, 2015 at 20:36

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