Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions not-supported/tpm2-unlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ debug_mode
root_check

# Check if already installed
if is_this_installed clevis-luks || is_this_installed clevis-tpm2 || is_this_installed clevis-initramfs
if is_this_installed clevis-luks || is_this_installed clevis-tpm2 || is_this_installed clevis-initramfs || is_this_installed clevis-dracut
then
msg_box "It seems like clevis-luks is already installed. We are trying to do the configuration again."
else
Expand Down Expand Up @@ -71,21 +71,21 @@ then
fi

# Install needed tools
apt-get install clevis-tpm2 clevis-luks clevis-initramfs -y
apt-get install clevis-tpm2 clevis-luks clevis-initramfs clevis-dracut -y

# Execute the script
print_text_in_color "$ICyan" "Setting up automatic unlocking via TPM2..."
if ! echo "$PASSWORD" | clevis luks bind -k - -d "/dev/${ENCRYPTED_DEVICE[*]}" tpm2 '{"pcr_bank":"sha256","pcr_ids":"7"}'
then
msg_box "Something has failed while trying to configure clevis luks.
We will now uninstall all needed packets again, so that you are able to start over."
apt-get purge clevis-tpm2 clevis-luks clevis-initramfs -y
apt-get purge clevis-tpm2 clevis-luks clevis-initramfs clevis-dracut -y
apt-get autoremove -y
msg_box "All installed packets were successfully removed."
exit 1
fi
print_text_in_color "$ICyan" "Updating initramfs..."
if ! update-initramfs -u -k 'all'
if ! dracut -f
Comment thread
pq2 marked this conversation as resolved.
then
msg_box "Errors during initramfs update"
exit 1
Expand Down