Ubuntu – After Repairing Deleted Kernel, why would GRUB still not boot into Linux

bootdual-bootkernellive-usbupdates

I had the problem described, and followed the top two procedures, explained here: How to restore a system after accidentally removing all kernels?

I have a separate boot partition, and I used the above described procedure to mount it to /mnt/boot

I was able to complete everything successfully, but GRUB boot menu still does not contain a Linux distro. In other words, when I boot, I am left at GRUB boot menu and no option to boot into Ubuntu.

Best Answer

Ok, so follow these steps:

  1. Boot up a Live Ubuntu.

  2. Open a terminal and switch to a root user.

  3. Create your chroot dir

mkdir /tmp/chroot

  1. Mount your HDD to the chroot dir

mount /dev/sda1 /tmp/chroot adjust the 1 to whichever partition your root folder was on.

  1. Mount the other necessaties.

mount -t proc proc /tmp/chroot/proc/

mount -t sysfs sys /tmp/chroot/sys/

mount -o bind /dev /tmp/chroot/dev/

  1. Chroot into that folder now.

chroot /tmp/chroot

  1. Install the generic kernel you need

apt install linux-generic

  1. If it didn't run the update grub run them yourself.

update-grub2

  1. Reboot the system and enjoy ubuntu again.