Kernal Panic - Not syncing : VFS: unable to mount root fs on unknown-block (0,0)

June 20, 2018 5.7k views
DigitalOcean CentOS

After rebooting the server I am getting Kernal Panic - Not syncing : VFS: unable to mount root fs on unknown-block (0,0) error, and not able to access it. Any suggestion to fix it quickly? It's a production server having 150+ websites and all of them are down now.

1 comment
  • I too have this problem. WTH Centos...

    Were you able to fix it?

8 Answers

Yes, finally I was able to fix it.

  • I am having same problem with centos when I tried to update it but failed some packages due to low memory and i am stuck now. Can you explain how did you solve? I tried to change kernel but all in vain

    • You need to boot your droplet using Digitalocean's recovery iso, here are the steps to do it https://www.digitalocean.com/docs/droplets/resources/recovery-iso/

      After that, you can mount the file system and choose the option to chroot, so you can switch to centos file system. next option is to switch the kernel of centos to recovery kernel and boot again with the original HDD and remove the kernel and install it again.

      • Sorry to annoy you but did you use same exact procedure given in the link to fix it? I don't know the commands for option 6 of /bin/bash. This is my live production server so can't bear HDD corruption

        • What I suggest is to first create a snapshot of HDD to safeguard your data, the same steps wouldn't work for you as the case is kernel related not the filesystem.

          If you want me to look over this, I can do this work for you.

          • I did these steps successfully until this point

            After that, you can mount the file system and choose the option to chroot, so you can switch to centos file system.
            

            but i don't understand how to do this

            next option is to switch the kernel of centos to recovery kernel 
            

            i changed kernel from digitalocean control panel to DigitalOcean GrubLoader v0.2 (20160714) CentOS

          • omfg tysm you're god in human form

            here is what i did which i think fixed it:

            • Mount file system
            • chroot
            • yum reinstall kernel
            • change boot sequence back to HDD
          • I'm having the same issue and I can't seem to solve it. I need help :/

Can someone help me with this? I get stuck at yum reinstall kernel with a message saying I need 55mb more space while in recovery mode.

I got it. this worked finally!

  • hey I am also stuck with this kernel panic issue, please can you tell me the steps and commands that you used? I am not aware of the commands.

Hey, Ill be glad to login and help you if you need me to but here's what I did:

1- I powered off my droplet
2- Switched to recovery boot mode
3- Powered it on
4- Opened console and did the following:
a- Mount file system
b- chroot
c- yum reinstall kernel
i- I had an issue of insufficient disk space so this failed
ii- I went ahead to locate my backup folder to delete one of my backups in order to make space
iii- I repeated "c" above and let it run while I followed the prompt to answer a "Y" when asked...
iv- I exited and x-ed out the console window
d- change boot sequence back to HDD
e- Powered on my droplet
f- When fully powered, I opened console and did nothing while some scripts ran
g- Open your site to verify - it should be up and running.

  • Hey, umm could you also share the commands for point a,b,c & d. sorry, but its been forever since I used these commands and as its a production server I do not want to mess things up.

They are not really commands, except for c:
a- (enter the number on the options that represent "Mount file system" [I think its 1] and hit ENTER)
b- (Same as "a" but I think the number here is 5)
c- command is "yum reinstall kernel" ... of course without the double quotes
d- Not a command. Go to your droplet Power page and you will see the options to boot from Recovery and HDD.

Hmm, I am not sure but if you backup your data, I can give your droplet a second eye. Otherwise, I am not sure. My droplet was down for 8 days before I could get a solution.

I was able to successfully get the server up and running. I got few errors while "yum reinstall kernel" but you can ignore them and wait until the command finishes processing. Lastly, exit from chroot and enter into an interactive shell and poweroff your droplet. Thanks mate,

same issue when i updgraded my 16.04.4

how to solve this for ubuntu . I tried so many things : none of which is working !

i have tried :

sudo apt_get autoremove , updating initramfs .

the error i get in chroot is :

error encountered while processing these linux-image-..-

Have another answer? Share your knowledge.