Page 1 of 1

GRUB2 Fixing

Posted: Mon Jan 23, 2023 8:24 pm
by zemerdon
GRUB MENU

Command: ls

It will list all your drives and partitions, like:

(hd0) (hd0,gpt3) (hd0,gpt2)

If you don't know your Ubuntu boot partition, check them one by one:

ls (hd0,gpt22)/
ls (hd0,gpt3)/
When you hit the right one, you'll get a line mentioning lost+found, more importantly boot, and so on.

Assuming (hd0,msdos2) is the right partition:

set prefix=(hd0,gpt32)/boot/grub
set root=(hd0,gpt3)
insmod normal
normal

Now you'll be able to boot into Ubuntu. Once you do, execute the following commands:

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