Grub Rescue Mode - /boot/grub directory does not exist

5,073

Boot into the grub menu, press 'c', and try running

grub> ls (hd0,msdos1)/boot/ 
grub> ls (hd1,msdos1)/boot/ 

for each of the disk partitions shown as (xxx,xxx) until you locate the partitian that contains your /boot directory. Once you find the correct partition, then do the set root=(xxx,xxx), because it sounds like that is not the right partition, unless something more serious is wrong.

Once you identify the correct partition, if you want to boot from grub, you can do the following.

Choose the kernel and init ram disk you want to boot with from the info you see after executing

grub> ls (xxx,xxx)/boot/

and then enter the following:

grub> linux (xxx,xxx)/boot/vmlinuz-xxxx-generic root=/dev/sda2 ro
grub> initrd (xxx,xxx)/boot/initrd.img-xxxx-generic
grub> boot

note:

If you do not know what the root=/dev/xxx name is, it is most likely the same number in msdos(n) ---> /dev/sda(n), but you can find out for sure by executing.

grub> cat (xxx,xxx)/etc/fstab

The path of the correct device will be in a comment above above the partition UUID=xxxxx

One more thing, make sure you do not include any spaces in the (xxx,xxx) partition identifiers, or you will get an error.

Share:
5,073

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have gone through a lot of questions and answers related to grub rescue but I am having a different problem which I am not able to understand.

    As per some of the answers, I tried following steps to resolve this problem -

    1. First of all I used ls command to get all the partitions which in my case were (hd0), (hd0,msdos5), (hdo,msdos1), (hd1) & (hd1,msdos1)

    2. Out of the above 5 partitions, I got Filesystem is ext2 message for (hd0,msdos1) drive.

    3. As per some of the answers provided in ask ubuntu & stack exchange I tried to set the root & prefix using (hd0,msdos1) drive (which I found using ls command)

    4. While setting prefix I realised that the /boot/grub directory does not exist in selected drive (hd0,msdos1).

    5. As a result of this when I try to fire insmod normal command, grub rescue gives an error saying /boot/grub/i386-pc/normal.mod not found

    6. Apart from this, I tried using bootable USB drive with ubuntu 14, 16, 17, 18 & even windows OS but I always ended up in grub rescue window.

    This leaves me with following questions -

    1. Am I setting a wrong drive as root drive (provided this is the only ext2 drive among 5 enlisted drives) ?

    2. Is there a way of including the /boot/grub folder in the root directory so that I can run `insmod normal command ?

    Your help is truly appreciated as I tried almost all the possible solutions I could think of over past few days.

    Thanks! :)

  • julandi
    julandi over 3 years
    That solved my problem, but not permanently. My system still only boots to grub after rebooting. What do I need to do to make it work permanently?
  • Paul W
    Paul W over 3 years
    Unfortunately I had to remove Ubuntu off of my macbook and reinstall MacOS for an IOS project. I also spilled water on my other linux computer and it is broken right now, and I actually forget of the top of my head. Sorry.
  • julandi
    julandi about 3 years
    Well, I found the solution by myself, I removed and reinstalled grub and after that, the problem disappeared.