Ensure to write the correct crypttab file…

And disable Luks by default.
This commit is contained in:
gardouille 2020-10-21 09:51:12 +02:00
parent 637d61b44f
commit 2216fdba5d
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ manage_btrfs=1
## If the script should create extra volume (eg. backup, virt, Proxmox,…)
manage_extra_lv=0
## If the script should cipher data with LUKS
manage_luks=0
manage_luks=1
## You need to set a new passphrase after the installation or at least change this one
luks_passphrase="generic key"
luks_key_file="/tmp/luks.keyfile.temp"
@ -222,7 +222,7 @@ mountpoint -q /target/run/udev || mount --bind -- /run/udev /target/run/u
## Luks {{{
luks_part_uuid=$(blkid | grep "${hdd}2.*TYPE=\"crypto_LUKS\"" | sed 's/.*UUID="\(.*\)" TYPE.*/\1/')
### Ensure crypttab file contains the LUKS informations
printf '%b\n' "${luks_pv_name} UUID=${luks_part_uuid} none luks,discard" >> /etc/crypttab
printf '%b\n' "${luks_pv_name} UUID=${luks_part_uuid} none luks,discard" >> /target/etc/crypttab
### Regenerate initramfs
update-initramfs -k all -u