Fedora 41: 6.12.10 Kernel Panic

I’m new to Linux and I updated my system to 6.12.10 however when i boot into this version, I get the message: “KERNEL PANIC! Please reboot your computer. VFS: Unable to mount root fs on unknown-block(0,0)” What should I do to fix this? I’m currently dualbooting on a Dell XPS 15 9530.

Can you still boot into the older kernel that was working before the kernel update?

If so you could probably run sudo dnf remove kernel*6.12.10* and after that completes reinstall the newer kernel with sudo dnf upgrade --refresh. Wait at least 5 minutes after the upgrade completes before rebooting.

Yes I can still boot into older kernel, 6.12.9. I tried removing 6.12.10 and upgrading again, but it shows this error:

Adding boot menu entry for UEFI Firmware Settings …

error: …/grub-core/script/lexer.c:352:syntax error.
error: …/grub-core/script/lexer.c:352:Incorrect command.
error: …/grub-core/script/lexer.c:352:syntax error.
Syntax error at line 211
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/etc/grub2.cfg.new file attached.
dracut[W]: If you need to use bluetooth, please include it explicitly.
dracut[W]: If you need to use bluetooth, please include it explicitly.

This sounds like something still failed to properly complete with the installation.
Please show us the result of the following
cat /etc/default/grub
sudo cat /boot/loader/entries/*
ls -l /boot
dnf list --installed kernel\*
inxi -Fzxx

The errors related to the grub.cfg file make me wonder. Have you by chance made changes to anything grub related? Either by editing the /etc/default/grub file or one of the scripts within the /etc/grub.d/ directory (or by installing grub-customizer or maybe some grub themes)

How old is your system install? What filesystem does your root filesystem have?

1. cat /etc/default/grub
GRUB_TIMEOUT=“10”
GRUB_DISTRIBUTOR=“$(sed ‘s, release .*$,g’ /etc/system-release)”
GRUB_DEFAULT=“saved”
GRUB_DISABLE_SUBMENU=“true”
GRUB_TERMINAL_OUTPUT=“console”
GRUB_CMDLINE_LINUX=“rhgb quiet”
GRUB_DISABLE_RECOVERY=“true”
GRUB_ENABLE_BLSCFG=“false”

2. sudo cat /boot/loader/entries/*
title Fedora Linux (0-rescue-4ad1f52fd13a4b26b5119278cff979ed) 41 (Workstation Edition)
version 0-rescue-4ad1f52fd13a4b26b5119278cff979ed
linux /vmlinuz-0-rescue-4ad1f52fd13a4b26b5119278cff979ed
initrd /initramfs-0-rescue-4ad1f52fd13a4b26b5119278cff979ed.img
options root=UUID=e22f6ef7-cbef-478c-84de-3da2d771b7c4 ro rootflags=subvol=root rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

title Fedora Linux (6.11.4-301.fc41.x86_64) 41 (Workstation Edition)
version 6.11.4-301.fc41.x86_64
linux /vmlinuz-6.11.4-301.fc41.x86_64
initrd /initramfs-6.11.4-301.fc41.x86_64.img $tuned_initrd
options root=UUID=e22f6ef7-cbef-478c-84de-3da2d771b7c4 ro rootflags=subvol=root rhgb quiet $tuned_params
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

title Fedora Linux (6.12.10-200.fc41.x86_64) 41 (Workstation Edition)
version 6.12.10-200.fc41.x86_64
linux /vmlinuz-6.12.10-200.fc41.x86_64
initrd /initramfs-6.12.10-200.fc41.x86_64.img $tuned_initrd
options root=UUID=e22f6ef7-cbef-478c-84de-3da2d771b7c4 ro rootflags=subvol=root rhgb quiet $tuned_params
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

title Fedora Linux (6.12.9-200.fc41.x86_64) 41 (Workstation Edition)
version 6.12.9-200.fc41.x86_64
linux /vmlinuz-6.12.9-200.fc41.x86_64
initrd /initramfs-6.12.9-200.fc41.x86_64.img $tuned_initrd
options root=UUID=e22f6ef7-cbef-478c-84de-3da2d771b7c4 ro rootflags=subvol=root rhgb quiet $tuned_params
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

3. ls -l /boot
total 363110
-rw-r–r–. 1 root root 277997 Oct 19 20:00 config-6.11.4-301.fc41.x86_64
-rw-r–r–. 1 root root 279758 Jan 16 19:00 config-6.12.10-200.fc41.x86_64
-rw-r–r–. 1 root root 279756 Jan 8 19:00 config-6.12.9-200.fc41.x86_64
drwx------. 5 root root 2048 Dec 31 1969 efi
drwx------. 4 root root 4096 Jan 26 19:41 grub2
-rw-------. 1 root root 173377952 Jan 21 23:20 initramfs-0-rescue-4ad1f52fd13a4b26b5119278cff979ed.img
-rw-------. 1 root root 31979843 Jan 26 15:58 initramfs-6.11.4-301.fc41.x86_64.img
-rw-------. 1 root root 33655980 Jan 26 22:23 initramfs-6.12.10-200.fc41.x86_64.img
-rw-------. 1 root root 33627295 Jan 25 15:37 initramfs-6.12.9-200.fc41.x86_64.img
drwxr-xr-x. 3 root root 4096 Jan 21 23:19 loader
drwx------. 2 root root 16384 Jan 21 23:15 lost+found
-rw-r–r–. 1 root root 182584 Oct 24 10:56 symvers-6.11.4-301.fc41.x86_64.xz
-rw-r–r–. 1 root root 183068 Jan 26 22:23 symvers-6.12.10-200.fc41.x86_64.xz
-rw-r–r–. 1 root root 183188 Jan 22 00:05 symvers-6.12.9-200.fc41.x86_64.xz
-rw-r–r–. 1 root root 9968458 Oct 19 20:00 System.map-6.11.4-301.fc41.x86_64
-rw-r–r–. 1 root root 10925847 Jan 16 19:00 System.map-6.12.10-200.fc41.x86_64
-rw-r–r–. 1 root root 10934595 Jan 8 19:00 System.map-6.12.9-200.fc41.x86_64
-rwxr-xr-x. 1 root root 16296296 Jan 21 23:20 vmlinuz-0-rescue-4ad1f52fd13a4b26b5119278cff979ed
-rwxr-xr-x. 1 root root 16296296 Oct 19 20:00 vmlinuz-6.11.4-301.fc41.x86_64
-rwxr-xr-x. 1 root root 16660840 Jan 16 19:00 vmlinuz-6.12.10-200.fc41.x86_64
-rwxr-xr-x. 1 root root 16656744 Jan 8 19:00 vmlinuz-6.12.9-200.fc41.x86_64

4. dnf list --installed kernel*
Installed packages
kernel.x86_64 6.11.4-301.fc41 anaconda
kernel.x86_64 6.12.9-200.fc41
kernel.x86_64 6.12.10-200.fc41 updates
kernel-core.x86_64 6.11.4-301.fc41 anaconda
kernel-core.x86_64 6.12.9-200.fc41
kernel-core.x86_64 6.12.10-200.fc41 updates
kernel-modules.x86_64 6.11.4-301.fc41 anaconda
kernel-modules.x86_64 6.12.9-200.fc41
kernel-modules.x86_64 6.12.10-200.fc41 updates
kernel-modules-core.x86_64 6.11.4-301.fc41 anaconda
kernel-modules-core.x86_64 6.12.9-200.fc41
kernel-modules-core.x86_64 6.12.10-200.fc41 updates
kernel-modules-extra.x86_64 6.11.4-301.fc41 anaconda
kernel-modules-extra.x86_64 6.12.9-200.fc41
kernel-modules-extra.x86_64 6.12.10-200.fc41 updates

5. inxi -Fzxx
CPU:
Info: 10-core (6-mt/4-st) model: 13th Gen Intel Core i7-13620H bits: 64
type: MST AMCP arch: Raptor Lake rev: 2 cache: L1: 864 KiB L2: 9.5 MiB
L3: 24 MiB
Speed (MHz): avg: 936 min/max: 400/2400:1800 cores: 1: 936 2: 936 3: 936
4: 936 5: 936 6: 936 7: 936 8: 936 9: 936 10: 936 11: 936 12: 936 13: 936
14: 936 15: 936 16: 936 bogomips: 93388
Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
arch_capabilities arch_lbr arch_perfmon art avx avx2 avx_vnni bmi1 bmi2
bts clflush clflushopt clwb cmov constant_tsc cpuid cpuid_fault cx16 cx8
de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
flush_l1d fma fpu fsgsbase fsrm fxsr gfni hfi ht hwp hwp_act_window
hwp_epp hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ibt ida intel_pt
invpcid lahf_lm lm mca mce md_clear mmx monitor movbe movdir64b movdiri
msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pclmulqdq pdcm pdpe1gb
pebs pge pku pln pni popcnt pse pse36 pts rdpid rdrand rdseed rdtscp
rep_good sdbg sep serialize sha_ni smap smep smx split_lock_detect ss
ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc
tsc_adjust tsc_deadline_timer tsc_known_freq umip user_shstk vaes vme vmx
vnmi vpclmulqdq vpid waitpkg x2apic xgetbv1 xsave xsavec xsaveopt xsaves
xtopology xtpr

I do have grub customizer installed.

KERNEL PANIC! Please reboot your computer. VFS: Unable to mount root fs on unknown-block(0,0)

This is a tell tail sign of a missing, bad, or mismatched initramfs.

1. cat /etc/default/grub
GRUB_ENABLE_BLSCFG=“false”

This should be true. When false it means /boot/loader/entries/ is not used, and grub.cfg is used exclusively. I suspect there’s dual boot confusion, and that’s difficult to troubleshoot without extensive knowledge of how both distros boot. And in this case, Fedora will have non-standard behavior (for Fedora) since BLS boot is disabled here. I don’t know to what degree this is tested these days.

Thanks to Chris for noting the line about BLSCFG in /etc/default/grub.

I suggest that you edit that file and change it to read GRUB_ENABLE_BLSCFG=true (which is the default for fedora) then run sudo grub2-mkconfig -o /boot/grub2/grub.cfg to generate a new grub.cfg file and reboot to see if there is a change.

It is my understanding that grub-customizer changed that line in the /etc/default/grub file (along with other changes). For many grub-customizer may work but for others it causes problems.

Also, for readability and ease of understanding: When posting data that you copy and paste from the screen please use the preformatted text tags that are available on the toolbar with teh </> button (paste the text then highlight it before clicking the button) so what we see it exactly the same format as what you see on screen. This can also be done manually by putting ``` on the line just before the text and on the line immediately following the text. Compare what shows in your post above (2. sudo cat /boot/loader/entries/*) with the way it shows on your screen. Lines are wrapped and difficult to read that way.

Well without knowing more about the OP’s setup, any changes might break boot entirely.

e.g. if Secure Boot is disabled, it’s plausible Distro B’s GRUB is being used to boot both Distro A and B. And since every distro’s GRUB is in effect a fork of upstream GRUB, the Distro B GRUB may have no idea what BLS is. Upstream GRUB doesn’t support BLS.

We need to know what other OS you are booting.

The other OS is Windows 11

Secure boot is disabled for me

secureboot works with fedora ubuntu and opensuse u should use secureboot.

Your comment is immaterial to the present issue. Having it disabled is good for this discussion and would only be a distraction from the problem.

This is what it tells me after the change to true and doing the 2nd command.

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
error: ../grub-core/script/lexer.c:352:syntax error.
error: ../grub-core/script/lexer.c:352:Incorrect command.
error: ../grub-core/script/lexer.c:352:syntax error.
Syntax error at line 222
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub2/grub.cfg.new file attached.

Let’s try reinstalling grub:

# rm /boot/efi/EFI/fedora/grub.cfg
# rm /boot/grub2/grub.cfg
# dnf reinstall shim-* grub2-efi-* grub2-common

This does not solve the problem

This is awesome!

Now might be the proper time to let you know that Fedora will boot with Secure Boot enabled. Don’t you have to enable it to boot into Windows 11, anyway?

I just realized I made a major typo :confused: It did Not work.

Searching for lexer.c:352:syntax error yields quite a few results. OP is not the only one with this problem.

We need to see:

# ls -l /boot/loader/entries
# cat /boot/loader/entries/        ##any entry
# cat /etc/kernel/cmdline
# cat /proc/cmdline

Possibly something is malformed on the kernel command line and we just need to narrow down what it is and where it's coming from.