This question already has an answer here:

After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:

grub rescue >

The command ls lists

(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)

I check them one by one:

ls (hd0,msdos5)/
ls (hd0,msdos1)/

But I cannot find the right partition.

marked as duplicate by Eliah Kagan, Charles Green, Eric Carvalho, dessert, Videonauth Nov 24 '17 at 1:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Do you have another linux installation on your computer? – Dalton Jul 9 '14 at 22:09
  • 1
    No, just ubuntu 13.04, but dual with win 7 – user302065 Jul 9 '14 at 22:25
  • And when I tried rebooting by usb or dvd, it said " Error loading operating system" – user302065 Jul 9 '14 at 22:28
  • It's unclear what you are asking. Please define "right partition" Are you trying to recover a partition that you accidentally deleted? – Elder Geek Jul 9 '14 at 23:53
  • I can't post an answer so I write my answer her: create a ubuntu bootable USB, then launch ubuntu from the USB, launch ubuntu terminal and write sudo apt-get install syslinux ENTER and then sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda. To create a bootable USB : ubuntu.com/download/desktop/create-a-usb-stick-on-windows, to launch ubuntu from the usb, press F11 or F12 when your computer boot (before windows start). To launch ubuntu terminal Ctrl - Alt + T – Enora Nov 17 '15 at 13:34

Try the following ..

grub rescue > ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)
grub rescue > ls (hd0,msdos1) # try to recognize which partition is this
grub rescue > ls (hd0,msdos2) # let's assume this is the linux partition
grub rescue > set root=(hd0,msdos2)
grub rescue > set prefix=(hd0,msdos2)/boot/grub # or wherever grub is installed
grub rescue > insmod normal # if this produced an error, reset root and prefix to something else ..
grub rescue > normal

For a permanent fix run the following after you successfully boot:

sudo update-grub
sudo grub-install /dev/sdX

where /dev/sdX is your boot drive.

  • 6
    grub rescue > ls (hd0,msdos1) # try to recognize which partition is this -----> I am getting error : Unknown filesystem in each of the three partitions I get listed by the ls Command.Please help.Thanks. – Rafed Nole Jul 10 '14 at 13:28
  • 3
    the ls commands should be like "ls (hd0,msdos1) /boot" – Aakash Goyal May 29 '15 at 20:06
  • this worked for me as well! but next time when i restart the machine i had to issue the same commands again. how do i resolve that? – samsamara Jul 13 '15 at 6:41
  • 3
    thanks for the reply. but i fixed it by login in through a live USB and issuing 'update-grub' command – samsamara Jul 14 '15 at 8:08
  • 1
    I tries 'ls (hd0,msdos1) /boot' for all. it shows 'unknown filesystem'. what should I do? Please help – Anusha Prasanth Jan 22 at 11:43

I had the same problem. I removed GRUB. Just download Windows 8 or 10 from another PC. Burn the iso into the USB with Rufus. Boot from USB, click Troubleshooting, then Command Prompt, and type:

Bootrec /fixmbr  

Windows will start normally without Ubuntu's GRUB. You can reinstall Ubuntu again.

  • I run the command without the dot at the end:Bootrec /fixmbr – draw Mar 26 '17 at 20:43
  • I had the same problem and after a day of searching and trying I think this is the best solution in this case. I have win 10 (UEFI) which works normally. I want to remove grub resuce from my legacy bios and install a new Ubuntu there. However, my laptop does not have CD-ROM. I had created a bootable USB for Ubuntu that worked perfectely for me before. But now the grub rescue refuses to acknowlege it and says uknown filesystem for all the partitions (including the inserted USB). I believe I would have the same problem with bootable USB for windows. So how can I get rid of grub rescue? – Yasser Mohseni Nov 3 '17 at 12:27
  • It seems that you are not booting from USB correctly! Select your usb from BIOS settings before grub appear! – Jim Nov 3 '17 at 16:13

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:

https://help.ubuntu.com/community/Boot-Repair

  • 3
    I tried this. It claimed to have repaired it, but it just keeps putting me back to a grub terminal. – astromax Aug 11 '15 at 23:26
  • I tried boot-repair and still got black screen. In my case the problem was boot-repair attempted to repair my SD-card on laptop (based on log). So I removed the card from PC and re-ran boot-repair, then the boot was repaired. – hakatashi Jul 14 at 16:08

I did the same thing. Deleted Ubuntu partition. I am able to enter into BIOS.

If you have a bootable USB for Ubuntu, enter BIOS and choose the USB first in boot sequence. Restart. Then install Ubuntu again. And you can delete SAFELY this time.

protected by Community Aug 20 '15 at 22:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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