Fix booting from encrypted root filesystem with systemd

systemd needs to be built with cryptsetup for it to work
This commit is contained in:
Nick Booker 2023-03-26 17:55:40 +01:00
parent b2ea9b360d
commit f5e0fd5b51

View File

@ -401,6 +401,14 @@ EOF
try emerge --verbose sys-fs/cryptsetup
fi
if [[ $SYSTEMD == "true" && $USED_LUKS == "true" ]] ; then
einfo "Enabling cryptsetup USE flag"
echo 'USE="cryptsetup"' >> /etc/portage/make.conf \
|| die "Could not append to /etc/portage/make.conf"
einfo "Remerging @world with cryptsetup"
try emerge --verbose --changed-use --deep @world
fi
# Install btrfs-progs if we used btrfs
if [[ $USED_BTRFS == "true" ]]; then
einfo "Installing btrfs-progs"