0

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.

  • Once you boot, run sudo update-grub – defalt May 12 '18 at 13:26
1

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
0

You say you can get into your Ubuntu install, so it should be simple enough to update/reinstall grub and see if that fixes the issue.

First, try simply using sudo update-grub if you haven't already, then reboot to check if that fixed it.

If this doesn't work, try manually reinstalling it with sudo grub-install /dev/sd## (replace ## with the current location of grub). This should be enough to reset any files that might be causing your issue.

Note: if you customized your grub install originally, this may reset those changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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