You are not logged in.

#1 2022-07-31 12:49:40

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

[solved] Failed to mount /sysroot after update of kernel

He there,

since a while I hold back an update of the kernel beyond Linux 5.15.34-1-lts
as I get a non bootable system after that. The messages I get are something along those lines here:

[FAILED] Failed to mount /sysroot.
See 'sysctl status sysroot.mount' for details.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Reload Configuration from the Real Root.

I do not get why that is particularly as nothing in my setup changed. It is just that update of the kernel that breaks things.
I am using efistub and efibootmgr (no bootloader) to organize my booting on a Dell Latitude 7410 Laptop machine.

That is my disc setup:

nvme0n1     259:0    0 476,9G  0 disk
├─nvme0n1p1 259:1    0   511M  0 part /boot
├─nvme0n1p2 259:2    0 472,4G  0 part /
└─nvme0n1p3 259:3    0     4G  0 part [SWAP]

And that is how I generated the boot entry

# Create a new boot entry
# /dev/nvme0n1p2: UUID="07e42dd7-1287-4648-b519-d3443d3a191a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="77c3fb10-874c-4098-a458-97e3aa43d152"

efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux-lts --unicode "root=PARTUUID=77c3fb10-874c-4098-a458-97e3aa43d152 rw initrd=\intel-ucode.img initrd=\initramfs-linux-lts.img quiet loglevel=3" --verbose

From the failed boot I also cannot go into the emergency shell as it states that the root account is locked.
That does not change even after I reenable the account with passwd root. 

Any help on sorting things out here would be appreciated.

Last edited by ctpfaff (2022-07-31 15:08:00)

Offline

#2 2022-07-31 12:51:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Failed to mount /sysroot after update of kernel

Does the initramfs get rebuilt when you update?

Online

#3 2022-07-31 12:53:50

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

That is a good question. And I guess it does. To make sure however I did that manually calling

sudo mkinitcpio -P

Offline

#4 2022-07-31 12:58:00

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

But just tried it again and the logs say yes it does the update of the initramfs:

depmod 5.15.55-2-lts
(4/6) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts.img

Offline

#5 2022-07-31 13:25:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Failed to mount /sysroot after update of kernel

And that's the initramfs you're loading? What bootloader?

The root account *in the initramfs* is locked, so it has to be enabled there, not the normal root account. See https://bugs.archlinux.org/task/70408

Online

#6 2022-07-31 13:28:06

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

Scimmia wrote:

And that's the initramfs you're loading? What bootloader?

I am using EFISTUB with efibootmgr, no bootloader. And yeah that is the initramfs I am loading. I did not change any configuration (I also updated the initial post with some more information about my setup). The system breaks simply by updating the kernel. Rolling back the update and the system boots again.

Scimmia wrote:

The root account *in the initramfs* is locked, so it has to be enabled there, not the normal root account. See https://bugs.archlinux.org/task/70408

Ah... great thanks for pointing this out.

Last edited by ctpfaff (2022-07-31 13:49:48)

Offline

#7 2022-07-31 14:21:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Failed to mount /sysroot after update of kernel

What does efibootmgr show? You might need efibootmgr -v, depending on what version you have.

Online

#8 2022-07-31 14:38:48

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

Yeah that I also just checked and I was surprised a bit as the output has changed a lot since I checked it the last time.
I remember it showed the parameters more or less in plain text. Now everything seems to be numerically
encoded.

 efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0003
Boot0000* Arch Linux    HD(1,GPT,2240967c-6574-4717-a429-66f1856978d8,0x800,0xff801)/File(\vmlinuz-linux-lts)72006f006f0074003d00500041005200540055005500490044003d00370037006300330066006200310030002d0038003700340063002d0034003000390038002d0061003400350038002d00390037006500330061006100340033006400310035003200200072007700200069006e0069007400720064003d005c0069006e00740065006c002d00750063006f00640065002e0069006d006700200069006e0069007400720064003d005c0069006e0069007400720061006d00660073002d006c0069006e00750078002e0069006d00670020007100750069006500740020006c006f0067006c006500760065006c003d003300
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 01 f8 0f 00 00 00 00 00 7c 96 40 22 74 65 17 47 a4 29 66 f1 85 69 78 d8 02 02 / 04 04 2a 00 5c 00 76 00 6d 00 6c 00 69 00 6e 00 75 00 7a 00 2d 00 6c 00 69 00 6e 00 75 00 78 00 2d 00 6c 00 74 00 73
00 00 00 / 7f ff 04 00
    data: 72 00 6f 00 6f 00 74 00 3d 00 50 00 41 00 52 00 54 00 55 00 55 00 49 00 44 00 3d 00 37 00 37 00 63 00 33 00 66 00 62 00 31 00 30 00 2d 00 38 00 37 00 34 00 63 00 2d 00 34 00 30 00 39 00 38 00 2d 00 61 00 34 00 35 00 38 00 2d 00 39 00 37 00 65 00 33 00 61 00 61 00 34 00 33 00 64 00 31 00 35 00 32 00 20 00 72 00 77 00 20 00 69 00 6e 00 69 00 74 00 72 00 64 00 3d 00 5c 00 69 00 6e 00 74 00 65 00 6c 00 2d 00 75 00 63 00 6f 00 64 00 65 00 2e 00 69 00 6d 00 67 00 20 00 69 00 6e 00 69 00 74 00 72 00 64 00 3d 00 5c 00 69 00 6e 00 69 00 74 00 72 00 61 00 6d 00 66 00 73 00 2d 00 6c 00 69 00 6e 00 75 00 78 00 2e 00 69 00 6d 00 67 00 20 00 71 00 75 00 69 00 65 00 74 00 20 00 6c 00 6f 00 67 00 6c 00 65 00 76 00 65 00 6c 00 3d 00 33 00
Boot0001* Linux Firmware Updater        HD(1,GPT,2240967c-6574-4717-a429-66f1856978d8,0x800,0xff801)/File(\EFI\arch\fwupdx64.efi)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 01 f8 0f 00 00 00 00 00 7c 96 40 22 74 65 17 47 a4 29 66 f1 85 69 78 d8 02 02 / 04 04 32 00 5c 00 45 00 46 00 49 00 5c 00 61 00 72 00 63 00 68 00 5c 00 66 00 77 00 75 00 70 00 64 00 78 00 36 00 34
00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00

Last edited by ctpfaff (2022-07-31 14:40:31)

Offline

#9 2022-07-31 14:50:26

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Failed to mount /sysroot after update of kernel

Maybe -u will do it?

Online

#10 2022-07-31 14:59:19

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

Yeah great:

 efibootmgr -uv
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0003
Boot0000* Arch Linux    HD(1,GPT,2240967c-6574-4717-a429-66f1856978d8,0x800,0xff801)/File(\vmlinuz-linux-lts)root=PARTUUID=77c3fb10-874c-4098-a458-97e3aa43d152 rw initrd=\intel-ucode.img initrd=\initramfs-linux.img quiet loglevel=3
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 01 f8 0f 00 00 00 00 00 7c 96 40 22 74 65 17 47 a4 29 66 f1 85 69 78 d8 02 02 / 04 04 2a 00 5c 00 76 00 6d 00 6c 00 69 00 6e 00 75 00 7a 00 2d 00 6c 00 69 00 6e 00 75 00 78 00 2d 00 6c 00 74 00 73
00 00 00 / 7f ff 04 00
    data: 72 00 6f 00 6f 00 74 00 3d 00 50 00 41 00 52 00 54 00 55 00 55 00 49 00 44 00 3d 00 37 00 37 00 63 00 33 00 66 00 62 00 31 00 30 00 2d 00 38 00 37 00 34 00 63 00 2d 00 34 00 30 00 39 00 38 00 2d 00 61 00 34 00 35 00 38 00 2d 00 39 00 37 00 65 00 33 00 61 00 61 00 34 00 33 00 64 00 31 00 35 00 32 00 20 00 72 00 77 00 20 00 69 00 6e 00 69 00 74 00 72 00 64 00 3d 00 5c 00 69 00 6e 00 74 00 65 00 6c 00 2d 00 75 00 63 00 6f 00 64 00 65 00 2e 00 69 00 6d 00 67 00 20 00 69 00 6e 00 69 00 74 00 72 00 64 00 3d 00 5c 00 69 00 6e 00 69 00 74 00 72 00 61 00 6d 00 66 00 73 00 2d 00 6c 00 69 00 6e 00 75 00 78 00 2e 00 69 00 6d 00 67 00 20 00 71 00 75 00 69 00 65 00 74 00 20 00 6c 00 6f 00 67 00 6c 00 65 00 76 00 65 00 6c 00 3d 00 33 00
Boot0001* Linux Firmware Updater        HD(1,GPT,2240967c-6574-4717-a429-66f1856978d8,0x800,0xff801)/File(\EFI\arch\fwupdx64.efi)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 01 f8 0f 00 00 00 00 00 7c 96 40 22 74 65 17 47 a4 29 66 f1 85 69 78 d8 02 02 / 04 04 32 00 5c 00 45 00 46 00 49 00 5c 00 61 00 72 00 63 00 68 00 5c 00 66 00 77 00 75 00 70 00 64 00 78 00 36 00 34
00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00

Offline

#11 2022-07-31 15:01:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Failed to mount /sysroot after update of kernel

Bingo. initramfs-linux.img is for the linux kernel, not linux-lts.

Online

#12 2022-07-31 15:03:11

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

ok I think I see the problem here. The initrd is set to the one of initramfs-linux while it should point to initramfs-linux-lts.img... Trying this

Last edited by ctpfaff (2022-07-31 15:08:43)

Offline

#13 2022-07-31 15:07:35

ctpfaff
Member
Registered: 2017-08-29
Posts: 27

Re: [solved] Failed to mount /sysroot after update of kernel

Thanks for helping me out there. Now it boots with Linux 5.15.55-2-lts

Offline

Board footer

Powered by FluxBB