How to boot from Grub Rescue? Fixed(error): no such partition.

Ever get into the freaking condition, when your system doesn’t boot successfully and throw your control to a grub rescue utility informing the following error?

error: no such partition.
Entering rescue mode...
grub rescue>

I went through this situation today. And here is how I rescued with it.

Note: Other possible solutions might be available, but this is just what worked for me. You are recommended to explore the web first, then go with the solution that suits *your* condition perfectly.

1. Reason

Actually, I was trying to resize my Linux (Ubuntu 16.04 LTS) partition which is dual booted with Windows 10. For that, my first step was to unallocate the partition which I wanted to merge with my ext4 (Linux partition). For this, first I logged in Windows and tried to unallocate the partition I wanted to merge (Local Disk :D) but I found out that it can be done with Gparted from Ubuntu as well. But still.

“I started to explore windows storage management console, and a couple of times I detached and reallocate this partition, together with separating out a partition of 3 GB from it. I was just playing and testing the working of the console. But this fun, lead me to freak, later in the day.”

2. Problem

Now the next step was to use Gparted from Linux. But for that, I needed to reboot and login to my Ubuntu 16.04 LTS and here is the twist. When I did reboot my laptop to switch the OS. Oh my God! I get encountered with this scary error.

error: no such partition.
Entering rescue mode... 
grub rescue>

I was screwed up! I didn’t know what the hack is done with my system.

I searched the web and found out the reason for this error that was “I deleted a Windows partition. and somehow (I don’t know how), I messed up with some grub configurations.”

3. Solution

But something worked like heaven for me. Here is the solution, if you ever get into this, proceed as follows.

4. List File Systems

error: no such partition.
Entering rescue mode...
grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

This “ls” command will list possible file systems where grub might be available. Now our next step is to find out, that which among these listed systems is the one that we can use for booting.

5. Find the File System we may use to boot

grub rescue> ls (hd0,msdos1)
(hd0,msdos1): Filesystem is unknown.
grub rescue> ls (hd0,msdos2)
(hd0,msdos2): Filesystem is unknown.
grub rescue> ls (hd0,msdos3)
(hd0,msdos3): Filesystem is unknown.
grub rescue> ls (hd0,msdos5)
(hd0,msdos5): Filesystem is ext2.

Hurray! we have found out, that which filesystem we have to choose for booting. In this case, it is (hd0, msdos5).

6. Configuration

grub rescue> set root=(hd0,msdos5)
grub rescue> set prefix=(hd0,msdos5)/boot/grub
grub rescue> insmod normal
grub rescue> normal

After this, I could see the old booting menu, where I may select between Ubuntu and Windows. At this point, it seems that the problem is solved, but that’s not the truth!

Now if you again reboot your system, you will again get into this grub rescue. If you want to permanently fix this issue. Proceed as follows (after step 3).

7. Updating System grub

Login to Ubuntu and just give these 2 commands.

$ sudo update-grub
$ sudo grub-install /dev/sda

Now try to reboot! Hopefully, you are back to your previous experience of booting. After going through this, now I don’t feel that grub rescue is a freaking issue, on the other hand, it’s a simple utility to rescue our system with faulty grub configurations.

Updated:

  • Unfortunately, sometimes this process doesn’t work. I recommend you to have a look at this post if you want to give a try to recover your files.
  • Recently, I found out here, that sometimes insmod normal doesn’t work due to the absence of a complete path of normal module. If this is the case, please try the complete path with insmod (hdX, Y)/boot/grub/normal.mod. If this doesn’t work please try the command using “semicolon” instead of “coma” after “hdX” as pointed out here.
  • Also, the location of the complete path to normal.mod is not consistent across all the systems. Therefore, you may use ls or search.file commands to find out the exact location of your system’s `normal.mod` as explained here.
  • In my case, I didn’t get into condition when insmod normal doesn’t  work. So, all these additional updates, I have not performed myself. Therefore, I request you all if any of these *updated* points doesn’t work or if you see a bug in these, then please let me know in the comments section below.

Aftermath:

When I was back with my Linux and an unallocated partition, I proceeded ahead for my goal of re-sizing. Explore the second part of this journey on How to resize your Linux partition with Gparted?

See you in the next post.

25 thoughts on “How to boot from Grub Rescue? Fixed(error): no such partition.

    1. Help! Could you please help me?
      I followed all the same instructions, but when I typed “normal” at the end, the response was “unknown command”, and I was back to the same “grub rescue”.

      Like

      1. I apologise for the delay in reply but did you try the following complete path for “normal” as I have mentioned in other comments as well?
        (hdX, Y)/boot/grub/normal.mod

        Like

  1. Hi, It helped me a lot, but after I tried Step4 and reboot my Ubuntu 18.04, It still goes to GRUB Error, and I have to try Step3 again, Is there any solution to this?

    Liked by 1 person

  2. I found my normal.mod file and I wrote insmod normal (hd0,msdos5)/boot/grub/i386-pc/normal.mod. Result:
    error: symbol ‘grub_file_filters’ not found. WHY???

    Like

  3. hello word .After doing a clining of my hard disk ,I was seen this error:no such partition entering rescue mode

    Like

  4. My problems began when I decided to upgrade from Ubuntu 18 to 19.04. I used a boot able pendrive and installed 19.04 where 18 had been, But, I had installed it via uefi instead of legacy. Now I cannot get my dual booted windows 10 back. The only way I can get into Ubuntu is through an efi file.
    if I don’t do that the it just defaults to grub rescue> prompt. I have gone through what you have suggested methodically, but I cannot find normal.mod anywhere. I think I should just manually reinstall and allocate swap, root etc instead of letting the installer decide.
    Thanks for a good page tho.

    Liked by 1 person

  5. So, I tried to extend my Linux Mint partition and ended up breaking something, I’m getting a similar error: “Unknown filesystem” (or “Filesystem is unknown”), I tried to find the right partition using ls, but I get the same message with all of them. I had Windows 7 installed in sda1 and sda2 (I think the sda2 was its swap?), and Linux Mint in sda3 with its swap in sd4, I tried to create the extended partition in sda3 using fdisk, From what I can remember, those are the steps I did: fdisk something/sd3 > n > e > enter > +60GB > enter. The partition was 160GB, the fdisk confirmation menu showed me that the extended partition was using 58,9 or something… Not sure if these infos are usefull, but I really don’t know what to do now, i’m literally using the (ugly) Xbox One browser app because I don’t have a mobile phone haha. Any help is welcome.

    Like

  6. I found the solution hours after posting this comment but forgot to update here.
    So, in my case the Boot Repair software solved the problem… What I did was use another computer to create the bootable pendrive (linux mint), and then plug that pendrive into the “defective” computer. After running mint on the bootable pendrive I ran “Boot Repair” (a common program that is already installed in the latest versions), after pressing “continue” on all screens I restarted the computer and grub was no longer a problem.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s