My machine always reboot into the GRUB prompt instead of GRUB menu

11,856

I had the same issue apart from that it was booting not at all. Reason: My fresh install of Ubuntu 18.04, 17.10 and Mate 18.04 had all put the wrong uuid in /boot/efi/EFI/ubuntu/grub.cfg.

Version 1 (grub-cmd):

From grub shell, find root folder by peeking into the outputs of ls (e.g. ls (hd0,gpt2)/) and make sure to know on which partition your system was installed! For me, it was sda2 since ESP is recommended to be the first.

set root=(hd0,gpt2)
linux /boot/vmlinuz-number-generic root=/dev/sda2
initrd /boot/initrd.img-number-generic
boot

If booting is successful now, you can get your uuid's (not partuuid) by typing blkid and verify that the correct one is noted in /boot/efi/EFI/ubuntu/grub.cfg.

For me:

search.fs_uuid <uuid> root hd0,gpt2
...

Version 2 (install-stick):

If you happen to have a bootable linux-stick, you can also boot that, mount your ESP and change the uuid there:

# Create folder to mount ESP
mkdir /tmp/esp

# Mount ESP (assuming sda1) to esp
sudo mount /dev/sda1 /tmp/esp

# Get UUID's of devices
sudo blkid

# Ensure correct `uuid` is set in `/tmp/esp/efi/EFI/ubuntu/grub.cfg`

reboot
Share:
11,856

Related videos on Youtube

mathmd
Author by

mathmd

An aspiring applied mathematician.

Updated on September 18, 2022

Comments

  • mathmd
    mathmd almost 2 years

    I got a problem that is after rebooting grub CLI always appears instead of grub menu. For me the problem is not being unable to boot into any kernels (it is simple: type exit and enter twice do the job and the grub menu reappear). What I want is to boot into grub menu instead of CLI. Is there any way to fix this?

    I'm using Ubuntu 18.04 with GRUB2.