Skip to content

Commit b3ea7ea

Browse files
Save changes at: 1773426239
1 parent 5c4b0c5 commit b3ea7ea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

base.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ function partitioning() {
132132
# mkfs.ext4 -L ROOT "${ROOT}" &> /dev/null
133133

134134
# Encrypt disk
135-
136-
cryptsetup luksFormat --type luks2 --batch-mode "$ROOT"
137-
cryptsetup open "$ROOT" cryptroot
135+
printf "%s" "$PASSWORD" | cryptsetup luksFormat --type luks2 --batch-mode --key-file - "$ROOT"
136+
printf "%s" "$PASSWORD" | cryptsetup open --key-file - "$ROOT" cryptroot
138137
udevadm settle
139138
mkfs.ext4 -L ROOT "/dev/mapper/cryptroot" &> /dev/null
140139

0 commit comments

Comments
 (0)