There are many possible causes but honestly i would just chroot and reinstall the kernel. If that doesn't work install an older kernel. If that fails then i would dig into it a bit more but chroot is fast and easy so it's always worth a try.
Yes it would, it would've installed on / partition under the folder /boot. Then when starting through grub it will use the /boot partition with the old initramfs and when fstab is invoked it will unmount this partition. Though it shouldn't cause a kernelpanic just not being able to load any kernelmodules...
Grub. In response to everyone, the Internet says this is because my initramfs is missing. No one has said this, is it right? How could that happen?
Edit: So I just saw this and remembered that although I do have an AMD cpu, intel-ucode was installed, and seeing that, I removed it because I thought it was a mistake. Could that be the issue? How do I fix it?
Do you know your boot partition? If you do, you can try to manually boot from grub terminal.
You can check which partition has the kernel and initrd by using
ls (hd0, partition_number)
Then write the following commads
root=/dev/sda<partition_number>
initrd (hd0, partition_number)/initrd.img
boot
Suppose your boot partition is number 1. Then the commands will go
I had this problem because a problem in the /lib64 folder that made the initramfs fail. Just chroot reinstall the kernel and try to find the problem. I am sure that the Intel ucode is not the problem
As already stated, there can be several reasons. You really need to give more information to solve this (if any of the tips already given didn't work).
Only thing we know from the error message, is that the Kernel can not mount root. This could be cause by (by no means conclusive list): 1) boot loader misconfiguration, 2) missing initramfs (providing initramfs has modules your kernel needs to mount root), 3) corrupted filesystem on root or 4) broken hard disk (or other hw)
I'd try to boot manually from grub, but to do that you need to be familiar with it's command line syntax - it is impossible to give universal step-by-step instructions.
Use some live-linux (usb-bootable arch will do fine), check with parted that your hds and partitons are still there, run fsck, and THEN chroot and re-install kernel. Check grub configuration before reboot, there's a chance it misdetects something.
Clearly grub can find and boot your kernel, since you're making it this far.
I'm guessing your initramfs isn't set up correctly, since it should be responsible for mounting your root filesystem rather than the kernel doing so directly.
Boot from an Arch ISO, mount your rootfs and boot partitions, arch-chroot into your install, rebuild your initramfs with mkinitcpio -P, and refresh your grub config with grub-mkconfig -o /boot/grub/grub.cfg.
Yeah, on the current Arch kernel config, basically all filesystems are modules, including ext4 and FAT. This guarantees an "unable to mount root" panic without an initramfs.
Okay, I solve my issues, for me the /boot partition is mounting as read-only which I don't understand because I clearly have rw in my fstab, so I boot in a usb recovery with arch in it, mounted the /boot manually and rebuild the initramfs. I dual boot with Windows so probably different from OP's problem.
Fun fact: I googled the error and the second result was a blog post I wrote 2 months ago when I had more or less the same issue.....
Looks like you're using wrong rootfs for the kernel you're loading. Look for the rootfs corresponding to your kernel or boot with a different kernel if you have one.
also try fixing the filesystem with fsck -fy from eg. a live usb, it helps if it can’t mount file systems because they are corrupted.
At least that’s the first thing i do when i get such an error....
Try setting the root parameter in GRUB to the device node (e.g. /dev/sda1) instead of the UUID and see if that'll let you boot. I've had GRUB configure an incorrect UUID before (which caused the same KP you're hitting), and I compile my own kernels.
26 comments
There are many possible causes but honestly i would just chroot and reinstall the kernel. If that doesn't work install an older kernel. If that fails then i would dig into it a bit more but chroot is fast and easy so it's always worth a try.
This! Improper grub config takes forever to fix.
Was /boot mounted when you installed the kernel?
If /boot wasn't mounted then no new kernel would have been installed
Yes it would, it would've installed on / partition under the folder /boot. Then when starting through grub it will use the /boot partition with the old initramfs and when fstab is invoked it will unmount this partition. Though it shouldn't cause a kernelpanic just not being able to load any kernelmodules...
Which bootloader are you using?
Grub. In response to everyone, the Internet says this is because my initramfs is missing. No one has said this, is it right? How could that happen?
Edit: So I just saw this and remembered that although I do have an AMD cpu, intel-ucode was installed, and seeing that, I removed it because I thought it was a mistake. Could that be the issue? How do I fix it?
Rebuild your initramfs https://access.redhat.com/solutions/1958 https://www.thegeekdiary.com/centos-rhel-6-how-to-rebuild-initial-ramdisk-image/
After rebuilding issue: update-grub update-grub2
It would be wise to uninstall any previous kernels and then rebuild and reinstall
Do you know your boot partition? If you do, you can try to manually boot from grub terminal. You can check which partition has the kernel and initrd by using ls (hd0, partition_number) Then write the following commads
root=/dev/sda<partition_number>
initrd (hd0, partition_number)/initrd.img
boot
Suppose your boot partition is number 1. Then the commands will go
root=/dev/sda1
initrd (hd0, 1)/initrd.img
boot
I had this problem because a problem in the /lib64 folder that made the initramfs fail. Just chroot reinstall the kernel and try to find the problem. I am sure that the Intel ucode is not the problem
As already stated, there can be several reasons. You really need to give more information to solve this (if any of the tips already given didn't work).
Only thing we know from the error message, is that the Kernel can not mount root. This could be cause by (by no means conclusive list): 1) boot loader misconfiguration, 2) missing initramfs (providing initramfs has modules your kernel needs to mount root), 3) corrupted filesystem on root or 4) broken hard disk (or other hw)
I'd try to boot manually from grub, but to do that you need to be familiar with it's command line syntax - it is impossible to give universal step-by-step instructions.
Use some live-linux (usb-bootable arch will do fine), check with parted that your hds and partitons are still there, run fsck, and THEN chroot and re-install kernel. Check grub configuration before reboot, there's a chance it misdetects something.
What does your grub config boot line say?
Clearly grub can find and boot your kernel, since you're making it this far.
I'm guessing your initramfs isn't set up correctly, since it should be responsible for mounting your root filesystem rather than the kernel doing so directly.
Boot from an Arch ISO, mount your rootfs and boot partitions,
arch-chrootinto your install, rebuild your initramfs withmkinitcpio -P, and refresh your grub config withgrub-mkconfig -o /boot/grub/grub.cfg.I've got a similar kernel panic when I accidentally deleted my initcpio file in /boot. This seems likely
Yeah, on the current Arch kernel config, basically all filesystems are modules, including ext4 and FAT. This guarantees an "unable to mount root" panic without an initramfs.
Worked perfectly, thanks for getting me through my first major issue with arch!
Yikes. There's a ton of possibilities for why it did that. I would try to boot using the LTS kernel and fall back to an older version.
Hi, I'm having the same problem after updating to latest kernel.
I'm using systemd-boot and the logs it's giving me are less helpful:
Okay, I solve my issues, for me the /boot partition is mounting as read-only which I don't understand because I clearly have rw in my fstab, so I boot in a usb recovery with arch in it, mounted the /boot manually and rebuild the initramfs. I dual boot with Windows so probably different from OP's problem.
Fun fact: I googled the error and the second result was a blog post I wrote 2 months ago when I had more or less the same issue.....
Thanks and I hope this help someone out there.
I'll respond here if I solve it.
Looks like you're using wrong rootfs for the kernel you're loading. Look for the rootfs corresponding to your kernel or boot with a different kernel if you have one.
also try fixing the filesystem with fsck -fy from eg. a live usb, it helps if it can’t mount file systems because they are corrupted. At least that’s the first thing i do when i get such an error....
Correct me if I’m wrong but it might help
Try setting the
rootparameter in GRUB to the device node (e.g./dev/sda1) instead of the UUID and see if that'll let you boot. I've had GRUB configure an incorrect UUID before (which caused the same KP you're hitting), and I compile my own kernels.Deleted before we saved it.