From 4a45eef497075283554ba123ae7cf6edc762b083 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 8 Apr 2019 15:14:24 -0400 Subject: [PATCH] fix bug on buster --- README | 3 ++- fai/config/hooks/partition.DEFAULT | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README b/README index 5cc07de..97cf483 100644 --- a/README +++ b/README @@ -116,7 +116,8 @@ fresize # resize swap or boot partitions in a host # Replacing a raid 10 disk - +# i expect better results with newer kernel and btrfs progs than the default stretch +fai-server buster pxe-server -S HOST fai diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index b10a3e0..9ab73b2 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -396,8 +396,15 @@ if $partition; then # This is just a bit more robust, and it could work for booting # into ipxe which can't persist data, if we ever got that working. mkfs.ext2 `grub_extdev` + # when we move to newer than trisquel 8, we can remove + # --type luks1. We can also check on cryptsetup --help | less /compil + # to see about the other settings. Default in debian 9 is luks2. + # You can convert from luks2 to luks 1 by adding a temporary key: + # cryptsetup luksAddKey --pbkdf pbkdf2 + # then remove the new format keys with cryptsetup luksRemoveKey + # then cryptsetup convert DEV --type luks1, then readd old keys and remove temp. yes YES | cryptsetup luksFormat `rootdev` $luks_dir/host-$HOSTNAME \ - -c aes-cbc-essiv:sha256 -s 256 || [[ $? == 141 ]] + --type luks1 -c aes-cbc-essiv:sha256 -s 256 || [[ $? == 141 ]] yes "$lukspw" | \ cryptsetup luksAddKey --key-file $luks_dir/host-$HOSTNAME \ `rootdev` || [[ $? == 141 ]] -- 2.30.2