A couple of months ago, I mistakenly remove the latest boot kernel of my Ubuntu while I was cleaning boot partition because of limited boot partition space. After the boot partition cleaning, my Ubuntu could not boot due to the missing boot kernel. I followed the steps below to fix my boot kernel.
- Create Ubuntu Desktop USB bootable drive. I recently use Rufus for bootable USB.
URL: http://rufus.ie/en
2. Start the Ubuntu Live USB.
3. Install GRUB Repair Tool.
sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair -y
4. Start boot repair. If you encrypt your drive, you may receive below message.
5. Find your drive
6. My Ubuntu drive is encrypted so decrypt the drive by entering password.
7. Click repair boot.
8. Follow the boor repair tool directions.
9. After the repair, reboot OS.
If boot repair above did not fix the problem, please enter Ubuntu recovery shell and follow steps below.
1. List kernels.
ls /boot
2. Reinstall missing kernel and headers.
sudo apt-get install --reinstall linux-image-<PKG_NAME_HERE>
sudo apt-get install --reinstall linux-headers-<PKG_NAME_HERE>
- Update Grub.
sudo update-grub
- Reboot.
sudo reboot now
Above steps fixed my missing boot kernel problem, I hope this blog post help someone who has the same problem. Ubuntu booting problem is very scary but there is a way to fix it. I am glad I fixed this problem. My booting partition was about 1~2GB. It was small. I should have given boot partition about 3~4GB. If I have more boot partition space, this problem did not happen.