Empty crypttab in initramfs

Support for security such as Firewalls and securing linux
Post Reply
Pascal666
Posts: 16
Joined: 2013/08/29 15:41:00
Location: Chicagoland

Empty crypttab in initramfs

Post by Pascal666 » 2015/11/13 02:19:17

I enabled crypt in dracut.conf using 'add_dracutmodules+="crypt"' so now my initramfs includes cryptsetup, but crypt leaves me with an empty crypttab. I tried adding 'install_items+="/etc/crypttab"' to dracut.conf but that appears to happen before crypt writes the empty file. I ended up adding "cp /etc/crypttab $initdir/etc/crypttab" near the bottom of /usr/lib/dracut/modules.d/90crypt/module-setup.sh to get a good initramfs. The parts of the scripts in 90crypt that deal with crypttab are a bit above my head. Any idea how I can tell it to include my actual crypttab instead of an empty one?

Pascal666
Posts: 16
Joined: 2013/08/29 15:41:00
Location: Chicagoland

Re: Empty crypttab in initramfs

Post by Pascal666 » 2015/11/22 21:02:01

I ended up using the "add_device" directive in "/etc/dracut.conf" like so:

add_device+=" /dev/mapper/luks-89afb2bb-c8ac-4dd3-a565-b3f594c4acfb /dev/mapper/luks-9bf2b62c-f792-48e0-9549-b10aacd1707a"

Post Reply