Re: Dracut fails to boot root-fs

Michael <[email protected]> Sun, 12 Apr 2026 13:01:19 +0100
Newsgroups gmane.linux.gentoo.user
Message-ID <2038968.PYKUYFuaPT@rogueboard>
On Sunday, 12 April 2026 11:43:04 British Summer Time Carsten Hauck 
wrote:
> On 11/04/26 at 12:49, Michael wrote:
> >On Saturday, 11 April 2026 00:49:56 British Summer Time Carsten Hauck
> >wrote:

[snip ...]
> >> It states:
> >> dracut Warning: Could not boot.
> >> dracut Warning: /dev/disk/by-uuid/73afXXX does not exist
> >
> >Did you install 'sys-fs/cryptsetup' before creating the initramfs
> >with dracut?
> >
> >What modules have you added in /etc/dracut.conf?
> 
> Hi Michael, thanks for the answer.
> Yes, cryptsetup is installed and it obviously works. After dropping to
> the shell I can mount and access /dev/mapper/cryptroot without any
> further actions requiered.

It works manually, but not from within your initramfs.  The wiki 
mentions you should install cryptsetup once you chroot into the new 
system and *before* you run dracut.

I wonder if dracut is missing some module, e.g. crypt, dm (and crypt-gpg 
if you use gpg encryption for the luks key) which would allow it to run 
cryptsetup and create /dev/mapper/cryptroot.


> The modules I expect to need are all included by default, so at the
> moment I have no further modules added. I wonder if udev should scan
> the decrypted LUKS-device again?
> 
> >> I can mount and access the root filesystem (/dev/mapper/cryptroot)
> >> without problem but even after mounting it on /sysroot and exiting
> >> the shell it fails to boot and drops me right back into the shell.
> >> 
> >> dracut:/# blkid
> >> /dev/nvme0n1p3: UUID="66b9XXX" TYPE="swap" PARTUUID="7f17XXX"
> >> /dev/nvme0n1p1: UUID="C900XXX" BLOCK_SIZE="512" TYPE="vfat"
> >> PARTUUID="9f76XXX"
> >> /dev/nvme0n1p4: UUID="332dXXX" TYPE="crypto_LUKS"
> >> PARTUUID="52a0XXX"
> >> /dev/nvme0n1p2: LABEL:"boot" UUID="aef0XXX" BLOCK_SIZE="4096"
> >> TYPE="ext2" PARTUUID="c457XXX"
> >> /dev/mapper/cryptroot: LABEL="root" UUID"73afXXX" BLOCK_SIZE="512"
> >> TYPE="xfs"
> >> 
> >> dracut:/# cat /proc/cmdline
> >> BOOT_IMAGE=/vmlinuz-6.18.18-gentoo-dist root=UUID=73afXXX ro
> >> rd.lang=de rd.vconsole.keymap=de-latin1
> >> rd.luks.name=332dXXX=cryptroot
> >> 
> >> I tried to modifie the GRUB commandline to access the root
> >> filesystem
> >> by LABEL or by /dev/mapper/cryptroot with the same effect.

I tend to stick to rd.luks.uuid and once it works as intended I add 
LABEL if desired.  'lsblk -o name,LABEL,uuid /dev/nvme0n1' will show 
what IDs you can use.
signature.asc (application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE-----

iQJPBAABCAA5FiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmnbiY8bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJELHqqvbClWcZcosP/iBFCKIVURKVo/k/OTrK
+mfJrgHjE9gngF2JhogihCWf9hiRycII1d6DP8mKriz2M97/D27uNwf8MfqDEyYx
oNuyb45mWNY7sVIOnNCxlwQwXQnj2igGbTA5om15UINzR8Ds1Pq7CY4Zk75zMDgW
7dge5pAEppP823pic/8TiN9CnZfeabcr07YupdsVabOMkHVgAHCwkln2Mz7EILwg
jd4hRFkc4FKzeXB4COivxadiu1rWbdk+8lgbVAR1SvzWfr1oavG9QXSxyGkR9Cle
p4b/my5d5ez3ub4CqTrpV2//2QHKd/FkrhQ6eKPaEnURwuQxYMS2cvlibSTqvKUC
39SVYxjSkzKBOe4Xy3sgsYX+yHAcysAt5kt9vuCooOUyLO4PzMxL9uOMiGtDDTyH
Shjp5t5az3/ZE0lSF+sxeKZJjD6m4fCUP/cNrt1Uo+O/fqw9I5HWDyILqKeX1AW0
h1Su115NKmeBcVFkppf6apGDNb39GSmWbuw8zOF+xCADNvjKYo2jMv6xuEFWNkIj
x/Ha4C9UhNSNH8SP6hMKDPveMZNZm1afluoYZvkVZJQoU2E9eLwbYUN+sz5/7j/8
kPQ5hShl2rS5WzsUOAN4S+7CD5qelNmbMIL4TAkFA7q1CXgk/Chzkw4DB3bnvRI0
5j9FyasDN8cbSUrB+x/NArWx
=uzUM
-----END PGP SIGNATURE-----