i am on fedora 38 and since the update to 6.2.12 i get an
kernel panic - not syncing: VFS: unable to mount root fs on unknown-block (0,0)
as last message when i turn quiet boot off.
the update makes a wrong entry in grub.cfg
instead of
echo ‘Loading Linux 6.2.11-300.fc38.x86_64 …’
linux /vmlinuz-6.2.11-300.fc38.x86_64 root=UUID=c167f698-04a3-42e4-892a-f26da74e7425 ro rootflags=subvol=root rhgb quiet
echo ‘Loading initial ramdisk …’
initrd /initramfs-6.2.11-300.fc38.x86_64.img
the entry says
echo ‘Loading Linux 6.2.13-300.fc38.x86_64 …’
linux /vmlinuz-6.2.13-300.fc38.x86_64 root=/dev/nvme0n1p9 ro rootflags=subvol=root rhgb quiet
i solved this with editing grub.cfg to the right root directory and adding the initrd line with the name of the new kernel. same happened now with update to 6.2.13. older kernel updates worked just fine.
is there a way to resolve this like forever without the need to edit grub.cfg everytime after an kernel update? thanks in advance
What is the content of /etc/kernel/cmdline and /etc/default/grub as well as /proc/cmdline?
Please post each of those so we can identify what is happening and why.
Also post the content of /boot/efi/EFI/fedora/grub.cfg
Obviously editing grub.cfg is not the way to go, and if you never edited it before why would you assume it was needed every time.?
The fix is to find out why the kernel command line is incorrect and fix the source so the system properly builds the grub.cfg file when a kernel is updated.
/boot/grub2/grub.cfg is the grub file that gets edited and recreated by the system with every kernel upgrade. Info from other files is used to build the file so editing it may work but gets overwritten with the next kernel update.
The only thing I note different from yours on my F38 system is /proc/cmdline.
With both kernel 6.2.12 and 6.2.13 I see the differences shown above when compared to what you posted.
It would seem that possibly something is not quite right in the (grub file ??) that generates the /proc/cmdline file itself since it seems yours may be incorrect in performance.
While it may not be necessary it certainly should not hurt to do the following; dnf reinstall 'grub2-*' 'shim*' followed by grub2-mkconfig -o /boot/grub2/grub.cfg and dracut -f
After that try booting again and see if anything is different.
The above commands will reinstall all the grub files then regenerate the grub.cfg file and the initramfs file.
After booting this way see if the /proc/cmdline file is changed.