1

I would like to have my encrypted root partition mapped to the device mapper name system, i.e. it should eventually appear under /dev/mapper/system. My operating system is Fedora 24 Workstation Linux and it boots with Grub2 on an UEFI enabled computer.

The kernel already correctly identifies the encrypted root partition by UUID having had Fedora configured it with the kernel parameter rd.luks.uuid=luks-144255e7-7a9a-4957-ad6e-d4a2a71c861a during installation.

With the kernel parameter rd.luks.uuid configured as above the encrypted root partition gets mapped by the same device mapper name as the kernel parameter value, i.e. appears under /dev/mapper/luks-144255e7-7a9a-4957-ad6e-d4a2a71c861a.

After reading the manpage of systemd-cryptsetup-generator I think its kernel parameter rd.luks.name is the appropriate one to choose another device mapper name; other than what would be configured with rd.luks.uuid alone.

Unfortunately Grub2 neither seems to consider rd.luks.name=luks-144255e7-7a9a-4957-ad6e-d4a2a71c861a=system nor rd.luks.name=144255e7-7a9a-4957-ad6e-d4a2a71c861a=system (without the luks- prefix).

Have you got an idea how to get the encrypted root partition mapped under /dev/mapper/system?

1

From man systemd-cryptsetup-generator:

rd.luks.name= is honored only by initial RAM disk (initrd) while luks.name= is honored by both the main system and the initrd.

So perhaps using luks.name=144255e7-7a9a-4957-ad6e-d4a2a71c861a=system instead of rd.luks.name=... will make your name system even after boot.

If that doesn't work (I don't understand exactly what that line of the documentation is trying to say or whether rd. will make a difference), you could try putting the name in /etc/crypttab. Again from man systemd-cryptsetup-generator:

If /etc/crypttab contains entries with the same UUID, then the name, keyfile and options specified there will be used. Otherwise, the device will have the name "luks-UUID".

For example, have the line

system UUID=144255e7-7a9a-4957-ad6e-d4a2a71c861a

It might be necessary to name the file /etc/crypttab.initramfs instead of just /etc/crypttab to ensure that it is visible early enough (before the partition is opened).

When making any of these changes, be sure to change the root= kernel parameter from /dev/mapper/luks-144255e7-7a9a-4957-ad6e-d4a2a71c861a to /dev/mapper/system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.