From f5e0fd5b51c4b0995227c8a7d529ac63b7ce56b1 Mon Sep 17 00:00:00 2001 From: Nick Booker Date: Sun, 26 Mar 2023 17:55:40 +0100 Subject: [PATCH] Fix booting from encrypted root filesystem with systemd systemd needs to be built with cryptsetup for it to work --- scripts/main.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/main.sh b/scripts/main.sh index 7fd4e9c..12ba361 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -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"