You are not logged in.

#1 2023-12-01 21:37:34

mensinda
Member
Registered: 2017-02-04
Posts: 5

[SOLVED] Unable to boot other kernel (Failed to mount * on real root)

My nvme boot drive is not detected when I try to boot with a different linux kernel. The main linux kernel (6.6.3-arch1-1) is not affected, but for all other kernels I have tried (linux-fsync-nobara-bin and linux-lts) the boot fails with:

ERROR: Failed to mount `UUID=321c6233-a243-47bc-b2e9-fc0362028497` on real root
You are now being dropped into an emergency shell.
sh: can't access tty; job turned off

For the linux-fsync-nobara-bin image, the keyboard is at least working. However, for linux-lts the keyboard is broken and I am unable to type anything.


I do have the SSD not beeing detected problem sporadically when there is a linux kernel update, but in this case the fallback image is still working and `mkinitcpio -P` is then enough to fix the problem. This doesn't happen every kernel update though, and it didn't happen for a while now...

However, using the fallback doesn't work for my current problem. I have also tried booting from the arch install image and running `mkinitcpio -P` in the arch-chroot from there, but this didn't change anything.


I am using a stock /etc/mkinitcpio.conf with

MODULES+=(amdgpu nvme vmd)

in a drop-in file in /etc/mkinitcpio.conf.d

I am using rEFInd and the boot command line is:

root=UUID=321c6233-a243-47bc-b2e9-fc0362028497 rw audit=0 loglevel=3 initrd=/boot/amd-ucode.img initrd=/boot/initramfs-linux.img

Hardware:

Motherboard: Mag B550 TOMAHAWK MS-7C91

SSD:

❯ doas smartctl -i /dev/nvme0
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.3-arch1-1] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Samsung SSD 980 PRO 500GB
Serial Number:                      S5GYNG0NB64563Y
Firmware Version:                   5B2QGXA7
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 500,107,862,016 [500 GB]
Unallocated NVM Capacity:           0
Controller ID:                      6
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          500,107,862,016 [500 GB]
Namespace 1 Utilization:            298,673,983,488 [298 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            002538 bb01526132
Local Time is:                      Fri Dec  1 21:09:07 2023 CET

dmesg of a successful boot: https://pastebin.com/cQVfCNv0
dmesg of a failed boot: https://pastebin.com/Wzr8R2Yi

Last edited by mensinda (2023-12-02 11:22:35)

Offline

#2 2023-12-01 22:44:29

seth
Member
Registered: 2012-09-03
Posts: 48,540

Re: [SOLVED] Unable to boot other kernel (Failed to mount * on real root)

On the failed boot, does "lsmod" indicate that nvme is loaded and/or can you "modprobe -v nvme"?

Offline

#3 2023-12-02 00:33:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,321

Re: [SOLVED] Unable to boot other kernel (Failed to mount * on real root)

You need to load the initramfs specific to the kernel you're booting. rEFInd is notorious for picking the wrong one if you're relying on autodetection.

Offline

#4 2023-12-02 11:19:29

mensinda
Member
Registered: 2017-02-04
Posts: 5

Re: [SOLVED] Unable to boot other kernel (Failed to mount * on real root)

Scimmia wrote:

You need to load the initramfs specific to the kernel you're booting. rEFInd is notorious for picking the wrong one if you're relying on autodetection.

Thanks, that was the issue! I had the initrd initramfs-linux.img image hardcoded instead of using initramfs-%v.img in my /boot/refind_linux.conf

Offline

Board footer

Powered by FluxBB