You are not logged in.
I'm presented with the following output against an awful blue background:
usb ... new USB device found, idVendor=xxx, idProduct=xxx, bcdDevice=xxx
usb ... new USB device Strings: Mfr... Product... SerialNumber...
tsc: Refined TSC clocksource calibration: Clockrate
clocksource: tsc: ... mask: .... max_cycles: ..., max_idle_ns: ... ns
clocksource: Switched to clocksource tsc
usb ...: new high-speed USB device number 4 using ehci-pci
usb ...: New USB device found, idVendor=..., SerialNumber=...
usb ...: New USB device strings: Mfr=..., Product=..., SerialNumber=...
usb ...: Product: ...
usb ...: Manufacturer: ...
ata1.00: ATA-9 ..., ..., max UDMA/133
ata1.00: xxx sectors, multi 8: LBA48 NCQ (depth 32), AA
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA XXX 18D8 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] xxx 512-byte logical blocks: (512GB/477 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3A 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
sdb: sdb1
scsi 2:0:0:0: Direct-Access ATA XXXX PQ: 0 ANSI: 5
sd 2:0:0:0 [sdb] XXXX 512-byte logical blocks: (32.0GB/29.8 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
scsi 3:0:0:0: CD-ROM XXXX DVD+-RW SNXXXX XXXX PQ: 0 ANSI: 5
sdb: sdb1
sd 2:0:0:0: [sdb] Attached SCSI disk
sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI Disk
/dev/root: Can't open blockdev
fbcon: Taking over console
VFS: Cannot open root device "/dev/mapper/root" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0800 XXXX sda
driver: sd
0801 XXXX sda1 <PART-UUID>
0802 XXXX sda2 <PART-UUID>
0803 XXXX sda3 <PART-UUID>
0810 XXXX sdb
driver: sd
0811 XXXX sdb1 <PART-UUID>
List of all bdev filesystems:
fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not Tainted 6.12.7-arch1-1 ...
Hardware Name......
Call Trace: ....
Please forgive my rough transcription of the output I am presented with. I summarized non-crucial stuff to provide a touch of context as opposed to omitting it altogether.
I pretty much followed this setup to a T: https://wiki.archlinux.org/title/Dm-cry … _partition. My setup involves a boot partition, a swap partition, and an encrypted root partition. The root partition was encrypted with a simple:
# cryptsetup -v luksFormat /dev/sda3
and a filesystem was written after unlocking it. This works fine, I can chroot back into it via liveUSB.
My mkinitcpio hooks look like:
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
I even tried putting keyboard before autodetect, as well as adding back in keymap and consolefont, no dice.
I'm using rEFInd to boot, and I have the following config option:
"Boot with standard options" "rd.luks.name=<UUID>=root root=/dev/mapper/root rw"
I've tried with and without specifying a few other options, such as specifying an initramfs file and microcode, etc. eg:
"Boot with standard options" "rd.luks.name=<UUID>=root root=/dev/mapper/root rw initramfs=intel-ucode.img initramfs=initramfs-%v.img
The only difference that makes is that if I include the second initramfs option, I'll get an error specific to it not being found - it doesn't seem to process the `%v` properly despite documentation saying to use it.
The UUID specified in my kernel parameters (eg `rd.luks.name=...`) is the UUID (not PART-UUID) of the block device, and not the decrypted /dev/mapper/root UUID.
The observed behavior is as follows: I boot my computer, the bootloader loads just fine, immediately upon trying to boot, my screen is filled with this blue background with the above error text. The computer is fully unresponsive to anything other than holding down the power button. Ctrl+alt+del doesn't reboot or have any effect, and of course TTYs don't exist yet.
The expected behavior: I am prompted for a decryption password for my root volume.
As mentioned above: My setup involves a boot partition, a swap partition, and an encrypted root partition. This works fine, I can chroot back into it via liveUSB.
I'm almost 100% confident my encrypted partition itself is not the culprit. I think it's some weird kernel related problem? But I can't seem to find any help whatsoever online. It can't be the fstab as I'm not getting to that point yet, but even so it looks correct (root partition points to the decrypted /dev/mapper/root device as it should). I've re-created my initramfs about a dozen times, so it's not that the hooks aren't present in the actual image(s). I set the locale to `en_US.UTF-8` and ran `locale-gen`. I set lang to `LANG=en_US.UTF-8`. I set the keymap to `KEYMAP=en` (avoids hook build error, which I think would be superficial but I ruled it out anyways). I don't know what else to do.
I should also add that sdb in my logs above is some OEM installed cache/RAID type drive. I don't need it, and Linux isn't touching it. I don't think it's related at all to my problems, but I sure as heck can't find any other ideas of things to try so I figured I'd mention it.
I should also highlight that it prints out PART-UUIDs in the error logs as opposed to UUIDs, and I am specifying UUIDs for the kernel parameter option. I've tried using PART-UUIDs, but it of course doesn't work.
I've setup extremely similar root encryption on several other devices before, and I've never experienced this problem. I really don't know what else to try at this point. I've checked that my kernel parameters are correctly spelled >5 times, and that the UUID is correct. Could someone point me in the right direction? I feel like I skipped some step somewhere but I cannot for the life of me figure out what that step would be. Thanks.
Offline
There's no such thing as an "initramfs=" kernel parameter. It's "initrd=".
The %v in /boot/refind_linux.conf requires that the extra_kernel_version_strings option is set in refind.conf for it to work with Arch's kernels. The note in https://wiki.archlinux.org/title/rEFInd … _by_rEFInd explains it. Though if you only have one kernel installed, you shouldn't even need to specify initrd in /boot/refind_linux.conf for rEFInd to autodetect the default initramfs image.
Did the initramfs image get generated without errors? Post the output of:
# lsinitcpio -a /boot/initramfs-linux.img
Offline
There's no such thing as an "initramfs=" kernel parameter. It's "initrd=".
Apologies, that was a transcription error. I was using initrd when I tried, but as mentioned above I get the same problem with a full omission of that argument.
Did the initramfs image get generated without errors? Post the output of: # lsinitcpio -a /boot/initramfs-linux.img
Yes, it did. There's no errors other than the standard erroneous, "possibly missing firmware for xxx" messages. I'll try to get a full output posted later today or tomorrow.
Offline
Use the command blkid to get the UUID of the LUKS superblock. I do it with a script so I don't get confused:
if [ "$encrypt" -eq 1 ]; then
params="cryptdevice=UUID=$(blkid -s UUID -o value "$luks_part"):cryptlvm root=/dev/vg1/root"
sed -i "/GRUB_CMDLINE_LINUX=/ s|\"\"|\"$params\"|" /etc/default/grub
fi
Last edited by macromal (2025-01-04 00:27:23)
Offline
Use the command blkid to get the UUID of the LUKS superblock. I do it with a script so I don't get confused:
if [ "$encrypt" -eq 1 ]; then params="cryptdevice=UUID=$(blkid -s UUID -o value "$luks_part"):cryptlvm root=/dev/vg1/root" sed -i "/GRUB_CMDLINE_LINUX=/ s|\"\"|\"$params\"|" /etc/default/grub fi
To answer your pre-edit question: GPT with UEFI. I don't think that is related though since I wouldn't be reaching my bootloader if I had problems with that part of my config.
To address the rest of your comment, I have verified that my UUID is correct already. That GRUB script would need to be modified to rEFInd. Even if it was ready for rEFInd, given that I'd be typing it by hand I'm also more likely to make a mistake in that transcription than I would be to just re-type the UUID directly. I have appended the output of lsblk into my rEFInd config file and copied the UUID directly even to be safe.
Did the initramfs image get generated without errors? Post the output of:
# lsinitcpio -a /boot/initramfs-linux.img
Here's the exact mkinitcpio.conf:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(usbhid xhci_hcd)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=()
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No RAID, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect modconf block filesystems fsck)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev modconf block filesystems fsck)
#
## This setup assembles a mdadm array with an encrypted root file system.
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
## This setup loads an lvm2 volume group.
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
## This will create a systemd based initramfs which loads an encrypted root filesystem.
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
HOOKS=(base systemd keyboard autodetect microcode modconf kms keymap consolefont sd-vconsole block sd-encrypt filesystems fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"
And here's the requested command output:
# lsinitcpio -a /boot/initramfs-linux.img:
==> Image: /boot/initramfs-linux.img
==> Created with mkinitcpio 39.2
==> Kernel: 6.12.8-arch1-1
==> Early CPIO: 52.75 MiB
==> Size: 10.36 MiB
==> Compressed with: zstd
-> Uncompressed size: 25.69 MiB (.403 ratio)
-> Estimated decompression time: 0.070s
==> Included modules (408):
842 cec hid-accutouch hid-megaworld hid-vrc2 nouveau sl811-hcd
842_compress chacha-x86_64 hid-alps hid-mf hid-waltop nvme sm3
842_decompress chacha20poly1305 hid-apple hid-microsoft hid-wiimote nvme-auth sm3-avx-x86_64
adc-keys chacha_generic hid-appleir hid-monterey hid-winwing nvme-core sm3_generic
adiantum chcr hid-asus hid-multitouch hid-xiaomi ohci-platform sm4
adp5520-keys cmac hid-aureal hid-nintendo hid-xinmo opencores-kbd sm4-aesni-avx-x86_64
adp5588-keys crc16 hid-axff hid-nti hid-zpff oxu210hp-hcd sm4-aesni-avx2-x86_64
adp5589-keys crc32-pclmul hid-belkin hid-ntrig hid-zydacron padlock-aes sm4_generic
aegis128 crc32_generic hid-betopff hid-nvidia-shield hv_vmbus padlock-sha snd
aegis128-aesni crc32c-intel hid-bigbenff hid-ortek hyperv-keyboard parkbd snd-rawmidi
aes_ti crc32c_generic hid-cherry hid-penmount i2c-algo-bit parport snd-seq-device
aesni-intel crc8 hid-chicony hid-petalynx i8042 pcbc soundcore
af_alg crct10dif-pclmul hid-cmedia hid-picolcd i915 pcips2 sparse-keymap
algif_aead cros_ec_keyb hid-corsair hid-pl iaa_crypto pcmcia sr_mod
algif_hash cryptd hid-cougar hid-plantronics idxd pcmcia_core ssb
algif_rng crypto_engine hid-cp2112 hid-playstation idxd_bus pcrypt ssb-hcd
algif_skcipher crypto_null hid-creative-sb0540 hid-primax industrialio pinephone-keyboard stowaway
altera_ps2 crypto_safexcel hid-cypress hid-prodikeys intel-gtt pkcs8_key_parser streebog_generic
amlogic-gxl-crypto crypto_simd hid-dr hid-pxrc intel_qat platform_profile sunkbd
ansi_cprng crypto_user hid-elan hid-razer iqs62x poly1305-x86_64 tca6416-keypad
applespi ct82c710 hid-elecom hid-redragon iqs62x-keys poly1305_generic tca8418_keypad
arc_ps2 cts hid-elo hid-retrode isp116x-hcd polyval-clmulni tcrypt
aria-aesni-avx-x86_64 curve25519-generic hid-emsff hid-rmi jbd2 polyval-generic tee
aria-aesni-avx2-x86_64 curve25519-x86_64 hid-evision hid-roccat keywrap pps_core tls
aria-gfni-avx512-x86_64 cxgb4 hid-ezkey hid-roccat-arvo lcd ps2-gpio tm2-touchkey
aria_generic cypress-sf hid-ft260 hid-roccat-common led-class-multicolor ps2mult trusted
asn1_encoder deflate hid-gaff hid-roccat-isku libarc4 ptp ttm
asus-wmi des3_ede-x86_64 hid-gembird hid-roccat-kone libchacha qat_420xx twl4030_keypad
async_memcpy des_generic hid-generic hid-roccat-koneplus libchacha20poly1305 qat_4xxx twofish-avx-x86_64
async_pq dlink-dir685-touchkeys hid-gfrm hid-roccat-konepure libcurve25519 qat_c3xxx twofish-x86_64
async_raid6_recov dm-bufio hid-glorious hid-roccat-kovaplus libcurve25519-generic qat_c3xxxvf twofish-x86_64-3way
async_tx dm-crypt hid-goodix-spi hid-roccat-lua libdes qat_c62x twofish_common
async_xor dm-integrity hid-google-hammer hid-roccat-pyra libpoly1305 qat_c62xvf twofish_generic
atkbd dm-mod hid-google-stadiaff hid-roccat-ryos libps2 qat_dh895xcc uas
atmel-ecc drm_buddy hid-gt683r hid-roccat-savu lkkbd qat_dh895xccvf usb-storage
atmel-i2c drm_display_helper hid-gyration hid-saitek lm8323 qt1050 usbhid
atmel-sha204a drm_exec hid-holtek-kbd hid-samsung lm8333 qt1070 userio
authenc drm_gpuvm hid-holtek-mouse hid-semitek lrw qt2160 video
authencesn drm_ttm_helper hid-holtekff hid-sensor-custom lz4 r8a66597-hcd virtio_blk
bcma echainiv hid-hyperv hid-sensor-hub lz4_compress raid6_pq virtio_crypto
bcma-hcd ecrdsa_generic hid-icade hid-sigmamicro lz4hc raid6test virtio_scsi
blake2b_generic ehci-fsl hid-ite hid-sjoy lz4hc_compress rfkill vivaldi-fmap
blowfish-x86_64 ehci-platform hid-jabra hid-sony matrix-keymap rmd160 vmac
blowfish_common encrypted-keys hid-kensington hid-speedlink matrix_keypad rmi_core wmi
blowfish_generic essiv hid-keytouch hid-steam max3421-hcd rpmb-core wp512
camellia-aesni-avx-x86_64 ext4 hid-kye hid-steelseries max7359_keypad rtsx_usb xcbc
camellia-aesni-avx2 fcrypt hid-lcpower hid-sunplus mbcache rtsx_usb_sdmmc xctr
camellia-x86_64 ff-memless hid-led hid-thrustmaster md4 samsung-keypad xen-hcd
camellia_generic fsl-mph-dr-of hid-lenovo hid-tivo michael_mic seqiv xhci-pci-renesas
cast5-avx-x86_64 gcm hid-letsketch hid-tmff mmc_block serio xhci-plat-hcd
cast5_generic geniv hid-lg-g15 hid-topre mmc_core serio_raw xor
cast6-avx-x86_64 gf128mul hid-logitech hid-topseed mpr121_touchkey serpent-avx-x86_64 xtkbd
cast6_generic ghash-clmulni-intel hid-logitech-dj hid-twinhan mtk-pmic-keys serpent-avx2 xts
cast_common ghash-generic hid-logitech-hidpp hid-u2fzero mxm-wmi serpent-sse2-x86_64 xxhash_generic
cbc gpio_keys hid-macally hid-uclogic n5pf serpent_generic
ccm gpio_keys_polled hid-magicmouse hid-udraw-ps3 newtonkbd serport
ccp gpu-sched hid-maltron hid-viewsonic nhpoly1305 sha1-ssse3
ccp-crypto hctr2 hid-mcp2200 hid-vivaldi nhpoly1305-avx2 sha256-ssse3
cdrom hid-a4tech hid-mcp2221 hid-vivaldi-common nhpoly1305-sse2 sha512-ssse3
==> Included binaries (20):
blkid fsck mkswap sulogin systemd-tmpfiles
busybox journalctl modprobe switch_root systemd-tty-ask-password-agent
dmsetup kmod mount systemctl udevadm
e2fsck loadkeys setfont systemd-cryptsetup umount
==> Hook run order:
keymap
Offline
In rEFInd, when you press F2 (twice) to edit the cmdline, does it show an initrd parameter there?
Offline
Try using the blkid command instead of lsblk to get the UUID of the LUKS superblock. The piece of script is irrelevant.
Offline
In rEFInd, when you press F2 (twice) to edit the cmdline, does it show an initrd parameter there?
Yes, but removing it makes no difference.
Try using the blkid command instead of lsblk to get the UUID of the LUKS superblock. The piece of script is irrelevant.
It's the same UUID.
I'd like to highlight again that the error presented in the blue screen output lists PART-UUIDs of my block devices rather than UUIDs. I can't find an rd.luks valid option for using PART-UUIDs over UUIDs, and attempts to use PART-UUIDs where UUIDs go, or use rd.luks.PARTUUID=... are of course not working.
Intentionally misspelling my UUID with the correct rd.luks.name=... syntax gives the same behavior as I currently have. It's like that argument/parameter isn't being read at all. The only time I'll see a relevant error to arguments I've passed in there are when I've got something like
rootflags=x-systemd.device-timeout=0
in there. It'll complain about x-systemd not being found as mentioned above.
Last edited by Formal-Aardvark2205 (2025-01-04 17:08:29)
Offline
nl6720 wrote:In rEFInd, when you press F2 (twice) to edit the cmdline, does it show an initrd parameter there?
Yes, but removing it makes no difference.
I was asking to make sure rEFInd successfully appends the initrd parameter (it needs to be there).
Currently your kernel isn't using the initramfs image at all. I can only guess that the initrd parameter is specified incorrectly.
Offline
I was asking to make sure rEFInd successfully appends the initrd parameter (it needs to be there).
That's just not true, unless I'm completely misunderstanding what you're saying. It sounds like you're saying you HAVE to specify an initrd parameter. https://wiki.archlinux.org/title/REFInd … linux.conf
"If you do not specify an initrd= parameter, rEFInd will automatically add it by searching for common RAM disk filenames in the same directory as the kernel."
I have never used initrd parameters on any installation prior, and I have never had issues with this including on several other nearly identical DMCrypt/LUKs encrypted root setups. I even just changed the "esp/EFI/refind/refind.conf extra_kernel_version_strings" option to ensure nothing has changed upstream which would require this now, given the warning on the Wiki (which I would think is erroneous for single kernel setups). Obviously rEFInd needs to find the file, but the argument does not need to be present in the config given standard names for the default Arch kernel. I've never had to so much as change refind.conf options to have this work out of the box.
Unless something changed upstream with rEFInd to change this and the Wiki is lagging behind, but I would assume this would have broken one of my other systems by this point. I'll try any suggestions of options to change though, seeing as something somewhere clearly isn't behaving as it should.
Last edited by Formal-Aardvark2205 (2025-01-07 02:04:34)
Offline
You misunderstood. The wiki is correct, you don't have to manually specify the initrd parameter for the default initramfs since rEFInd will add it itself. But the initrd parameter must still be passed to the kernel. By looking at the kernel cmdline (using the F2 key in rEFInd menu) you'll see if rEFInd has added a correct initrd parameter (the automatically added initrd will be shown in that line).
Offline
Ah, I see what you mean! It defaults to:
initrd=\initramfs-linux.img
I guess when I was manually editing that line to remove that via the bootloader's interface at boot time via F2, it's different from editing the config file directly in behavior. That's very unintuitive.
For one reason or another, removing the backslash from that parameter works now! I didn't change much in the config, really I think the only option I ever changed was the above extra_kernel_version_strings per wiki and I did upgrade the kernel at one point. Why is it defaulting to a backslash here, and/or why doesn't a backslash work if it's the default (for this system)? I have a separate boot partition for my ESP and refind should be aware of that given that it successfully installs to it, so why does it try to find it in the root partition as such? Very strange.
Thank you for your help! I really appreciate it.
Offline
Why is it defaulting to a backslash here, and/or why doesn't a backslash work if it's the default (for this system)? I have a separate boot partition for my ESP and refind should be aware of that given that it successfully installs to it, so why does it try to find it in the root partition as such? Very strange.
If you're mounting the ESP to /boot then initramfs-linux.img is at the root of the ESP (where vmlinuz-linux resides). See the warning about initrd path in https://wiki.archlinux.org/title/rEFInd … linux.conf.
I have no idea why initrd=initramfs-linux.img works for you and initrd=\initramfs-linux.img doesn't. I could be some UEFI bug.
Offline