Grub rescue prompt, repair grub

Solution 1:

To fix grub rescue go with following steps:

  • First thing is we have to start our OS only then after we can fix grub.

    #to start OS-->
    error: unknown filesystem.
    Entering rescue mode...
    grub rescue>
    

    When you see such an error first we have to check for “Filesystem” is ext2'

    grub rescue> ls        # type 'ls' and hit enter to see drive partition.
    (hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos4) ...   # you will see such things 
    

this are our drives now we have to check which one is ext2.

grub rescue>ls (hd0,msdos6)
error: disk 'hd,msdos6' not found.

go for another drives until you get “Filesystem is ext2”.

grub rescue>ls (hd0,msdos5)
error: disk 'hd,msdos5' not found.
grub rescue>ls (hd0,msdos2)
(hd0,msdos2): Filesystem is ext2        # this is what we want

now set the path

grub rescue>set boot=(hd0,msdos2)
grub rescue>set prefix=(hd0,msdos6)/boot/grub
grub rescue>insmod normal
grub rescue>normal
  • Now just fix grub by following command on any Ubuntu

    sudo grub-install /dev/sda
    sudo apt-get update
    # to update grub
    sudo apt-get upgrade
    

make sure you must update grub after login into OS

Solution 2:

I would try running update-grub in order to build grub.conf / grub.cfg again.

You can try also using grub-install, but I think this one won't help.

If you want to read more, check first which version you have (GRUB 1 or 2) by running:

dpkg -l | grep grub

If you have GRUB 2, you can use the following tutorial: http://www.dedoimedo.com/computers/grub-2.html

Of course be careful dealing with GRUB as we are talking about the boot process, which is a sensitive mechanism.

Solution 3:

It seems to me that update-grub assembles the grub.cfg, but you also need to (re-)run grub-install (or grub-setup?) to update the MBR / boot sectors with the basic info -- on which partition to find the grub.cfg file & apparently these modules.

Solution 4:

Solve ultimate case of grub rescue failure: problems: 1.i386-pc not found****normal mode not working cp not working search.file not working. All can be solved by the following commands, Works with Ubuntu 18.04 also. Step1: Find the root folder containing directory.

ls

For example, if the root folder is in (hd0, gpt4), then type

this is how it looks

ls (hd0, 4)/

You will see some files or folders:

my root file is in (hd0, gpt4)

Now if you are lucky then do the following:

set root=(hd0, 4)
set prefix=(hd0, 4)/boot/grub/
insmode normal
normal

If you are lucky then it will solve your problem. Sometimes people have problems like cannot find 1386-pc folder. In that case you have to look where is your grub folder. If you have a problem like:

boot/grub/i386-pc/normal.mod not found

In this case, you need to find the folder grub2. If you have grub2 and inside that folder you could have your i386-pc folder. Then you need to type

prefix=(hd0, 4)/grub2/

it will work. If you do not have grub2 and could not locate i386-pc folder then do the following:

grub rescue>set root=(hd0, 4)
grub rescue>set prefix=(hd0, 4)/usr/lib/grub
grub rescue>insmode normal
grub rescue>normal

after executing this command your grub rescue mode will go to grub menu. Now you can execute the linux command.

linux comand

grub>set root =(hd0, 4)
grub>set prefix= (hd0, 4)/boot
grub>insmaod linux
grub>linux vmlinuz.....-generic
grub>intrd (hd0, 4)/boot/...-generic
grub>boot

It will bring you to the recovery mode. From there you can choose from the several available recovery options. If it does not help then you need to download an ubuntu os, for example ubuntu 18.04. You can download from the following link: ubuntu link

Make a bootable drive and open your computer with that live disk. It will not harm any of your documents. See a video on how to do that. Now you have to find your i386-pc folder. It will be in

rootContainingDirectory-usr-lib-grub

Now copy i386-pc to boot/grub/ folder. you may have a permission problem to overcome that type the following command:

sudo nautilus

Now right click on that directory and change owner to ubuntu live session user

follow the video: permission change

Now after you paste it in the boot/grub folder restart and remove the usb drive. This time use the 1st set of commands, it will work. If the cp command is working then you can do this from grub menu also.