GNU Grub 2.04
Ubuntu/ Linux Distros
In case video is not clear, follow the commands below
Since angled brackets are not allowed follow it as (-)
-------------------------------------------------------------------------------------------------
If you get to a grub prompt, it means that grub can't find the boot files that it expects. The sequence of commands to load the files and boot when grub doesn't do that for you goes something like this. First, find all partitions that grub sees:
grub- ls
(hd0) (hd0,gpt2) (hd0,gpt1) (proc)
This lists disks and partitions on the disks. One of these partitions holds your Linux system. Say it is (hd0,gpt2). Then do:
grub- set root=(hd0,gpt2)
grub- linux /boot/vmlinuz-5.15.0-46-generic root=/dev/sda2
Replace (hd0,gpt2), the version number and the partition (/dev/sda2) by what is valid for your system. In the case of vmlinuz you can just type vmlinuz- and press Tab.
grub- initrd /boot/initrd.img-5.15.0-46-generic
grub- boot
should now boot up your system.
After your system boot up, open terminal and update you grub, not to face same issue again.
For updating Grub
sudo update-grub
This should solve all the issues
Thankyou,
gp_sec