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.

  • 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 – MagTun 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.

| improve this answer | |
  • 9
    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
  • 5
    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
  • 4
    I tries 'ls (hd0,msdos1) /boot' for all. it shows 'unknown filesystem'. what should I do? Please help – Anusha Prasanth Jan 22 '18 at 11:43

To remove 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.

| improve this answer | |
  • 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
  • 1
    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
  • Can I legally install Windows 7 this way? I have Windows 7 recovery partition and I am both unable and uninterested in installing Windows 8 on that computer. – reducing activity Nov 17 '19 at 14:43
  • It's very important circa 2020 to recognize that fixmbr commands will restore an MBR style boot. If you had UEFI before, it would now be MBR again. I don't see many correct answers floating around, so if you've already fallen into that place, you should look into Windows' mbr2gpt program which is part of the WinPE bootable. It's an absolute PAIN to use, but it works to get your disk back to GPT/UEFI. It possibly also has repair tools to restore a UEFI setup supposing you didn't run fixmbr. – Joshua Detwiler Apr 24 at 2:26

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:


| improve this answer | |
  • 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 '18 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.

| improve this answer | |

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