Fixing the «Kernel Panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)» Error After Upgrading Ubuntu
Regenerate initramfs for the New Kernel
To fix the issue, you need to regenerate the initramfs for the new kernel version. Run the following command in the terminal:
sudo update-initramfs -u -k <version>
Replace <version>
with the actual kernel version string for the kernel that you were unable to boot into. For example, it might look something like 4.15.0-36-generic
.
You can find the kernel version by running uname -r
if needed.
Update GRUB
Once the initramfs has been successfully generated, update the GRUB bootloader by running:
sudo update-grub
This command ensures that GRUB recognizes the updated kernel and its corresponding initramfs.