Fixed cryptsetup error out

This commit is contained in:
Price Hiller 2021-11-25 04:29:24 -06:00
parent 5b8975f6c8
commit f8344e5cf5

View File

@ -243,9 +243,9 @@ install() {
sfdisk --delete "${install_path}" >/dev/null
log "info" "Wiped partitions on $(important "${install_disk}")"
log "info" "Securely erasing remaining data on $(important "${install_disk}")"
echo YES | cryptsetup open --type plain -d /dev/urandom "${install_path}" to_be_wiped > /dev/null
# echo YES | cryptsetup open --type plain -d /dev/urandom "${install_path}" to_be_wiped > /dev/null
# dd bs=1M if=/dev/zero of=/dev/mapper/to_be_wiped status=progress 2> /dev/null
cryptsetup close to_be_wiped
# cryptsetup close to_be_wiped
log "info" "Writing new partitions to $(important "${install_disk}")"
(echo n
echo
@ -259,8 +259,8 @@ install() {
echo 8300
echo w) | gdisk "${install_path}"
log "info" "Wrote partitions"
log "info" "Encrypting $(important "${install_disk}")"
echo YES | cryptsetup -y -v luksFormat "${install_path}"
log "info" "Encrypting $(important "${install_disk}"), if you are prompted type $(important "YES")"
cryptsetup -y -v luksFormat "${install_path}"
log "info" "Requesting opening of $(important "${install_disk}")"
cryptsetup open "${install_path}" cryptroot
log "info" "Creating file systems..."