How to solve Kernel Panic issue on Digitalocean
↳ Post created Friday, January 22nd 2021 by Administrator. ⌈no comments⌋If you have your sites hosted on Digitalocean, you can see often this message after upgrading and rebooting the server “Kernal Panic – Not syncing : VFS: unable to mount root fs on unknown-block (0,0) error”, and you can’t access your files and all your sites are down. One of the simplest method to resolve the issue is below.
1. Power off the droplet and boot from the recovery ISO
2. Choose 6 for interactive shell (don’t mount or chroot)
3. In the interactive shell,
a. Mount the filesystem:
mount /dev/vda1 /mnt
b. Bind mount /dev:
mount --bind /dev /mnt/dev
c. Bind mount /proc:
mount --bind /proc /mnt/proc
d. Bind mount /sys:
mount --bind /sys /mnt/sys
e. Chroot:
chroot /mnt
Now run this or go to f. point if you run before
sudo apt-get install --reinstall linux-image-generic linux-image
For me worked follow command because i get an error so i need to specific my linux image version (you should put your version)
apt-get install --reinstall linux-image-generic linux-image-4.15.0-1-generic
If you don’t know your version. Use:
dpkg --list | grep linux-image
f. Update and upgrade:
apt update
and
apt upgrade
4. Exit the interactive shell and restart the droplet to boot from main harddisk
Note that when using “apt update”, previously broken installation automatically restarted.
This method works for Ubuntu, if you have your droplet on Centos try this and if you have this problem on your laptop or PC try this solution.