LTS Kernel - failed to mount /sysroot

I did sudo dracut-rebuild while using the ZEN kernel. Rebooted into LTS and still had the Failed to mount /sysroot error message.

I then logged into LTS Fallback and did sudo dracut-rebuild, rebooted back into LTS and all was fine.

NO IDEA why it worked in LTS Fallback and not ZEN.

I have no idea as well :sweat_smile:

Not just from another kernel, I tried from stable it still not working. Only from lts fallback then only it works.

3 Likes

dracut seems related but issuer is the Kernel i bet still as of other kernels do not have the same issue.
And some people including me on different machines can boot again on LTS latest dracut latest LTS package.

Also is this all unencrypted installs and mixed grub and systemd-boot?

1 Like

I just did a new installation on an Intel cpu / intel graphics device.
After the hot fix, Calamares did not offer to install linux-lts.

I then booted into the new system, and installed linux-lts and linux-lts-headers.
Install went fine.

Rebooted, and selected linux-lts and it failed to boot with the “failed to mount /sysroot”.

Pudge

mine is unencrypted and grub

grub?

No. During the install I picked the defaults. So systemd-boot

Pudge

This whole LTS kernel Failed to mount /sysroot error so incredibly odd. Grub, Systemd, encrypted, not encrypted, ext4, btrfs…

What’s even more strange is that while in LTS Fallback I did sudo dracut-rebuild and I’m no longer seeing the Failed to mount /sysroot error message. No issues logging into LTS anymore.

Bootlog: https://0x0.st/8yKi.txt

does it shows like that?
Grub:
sudo lsinitrd /boot/initramfs-linux-lts.img | grep ext4
systemd-boot:
locate the initrd inside /efi/"UUUID"/6.12.28-1-lts/initrd
and use:
sudo lsinitrd /efi/"UUUID"/6.12.28-1-lts/initrd | grep ext4
replace “UUID” with the machineid of your path …

So seems somehow dracut is missing to build in add_dracutmodules+=" kernel-modules "
what includes ext4
In case it will only look like so:

[root@endos 6.12.28-1-lts]# lsinitrd initrd | grep ext4
-rwxr-xr-x   4 root     root       356568 Mar 25 09:48 usr/bin/fsck.ext4

not including ext4 modules..

i am not sure but i had similar thing like it was not including modules one time but the next

I am on grub, ext4, mkinitcpio and LTS… no issues here. I am too afraid to change things till I get a new PC lol.

Mine is Luks encrypted, BTRFS and systemd-boot. (And I got the error with lts)

systemd-boot, dracut & ext4 here. LTS is my emergency kernel, I run zen. Exactly the same error and the weird resolution of rebuilding from LTS fallback works.

systemd-boot:
locate the initrd inside /efi/"UUUID"/6.12.28-1-lts/initrd
and use:
sudo lsinitrd /efi/"UUUID"/6.12.28-1-lts/initrd | grep btrfs
replace “UUID” with the machineid of your path …

can you check?

interesting so 2 in with this bermuda trick..

But what we need to have in mind is that on rebuild it will read from any existing initrd images.. and salso the oiutput from lsinitrd is not showing everything:

Because lsinitrd lists userspace tools and explicit dracut modules, but not always kernel modules embedded in the image unless they were included via specific dracut modules like kernel-modules or drivers.

and in addition:

dracut uses information from the currently running system, such as loaded modules and current hardware config unless you explicitly tell it to

That makes it a bit less confusing.

Only open question is still why LTS initrd is build without that modules for the filesystem.

this:

ext4 might be built as a module (not y, but m in CONFIG_EXT4_FS=m) — in that case, if the initramfs lacks the .ko file, you can’t mount /sysroot.

CONFIG_EXT4_FS=m
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y

seems i found the issue?

CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
1 Like

This is the result:
btrfs
-rw-r–r-- 1 root root 21 May 10 21:12 etc/cmdline.d/00-btrfs.conf
-rwxr-xr-x 1 root root 1360088 Mar 27 07:58 usr/bin/btrfs
lrwxrwxrwx 1 root root 5 May 10 21:12 usr/bin/btrfsck → btrfs
-rwxr-xr-x 1 root root 728368 Mar 27 07:58 usr/bin/btrfstune
-rwxr-xr-x 1 root root 1185 Mar 27 07:58 usr/bin/fsck.btrfs
drwxr-xr-x 1 root root 0 May 10 21:12 usr/lib/modules/6.12.28-1-lts/kernel/fs/btrfs
-rw-r–r-- 1 root root 881849 May 9 11:29 usr/lib/modules/6.12.28-1-lts/kernel/fs/btrfs/btrfs.ko.zst
-rw-r–r-- 1 root root 387 Mar 27 07:58 usr/lib/udev/rules.d/64-btrfs-dm.rules
-rw-r–r-- 1 root root 616 Apr 18 23:42 usr/lib/udev/rules.d/64-btrfs.rules

(And if it matters, this is AFTER I have run dracut-rebuild from the fallback kernel)

and it boots now?