You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
646 B
15 lines
646 B
#!/bin/bash
|
|
set -e
|
|
|
|
cp -vf ./passphrase-from-tpm.sh /usr/sbin/ || exit 1
|
|
cp -vf ./update-luks-tpm.sh /usr/sbin || exit 1
|
|
cp -vf ./update-kernel.sh /usr/sbin || exit 1
|
|
cp -vf ./create-luks-tpm.sh /usr/sbin || exit 1
|
|
|
|
cp -vf ./tpm2-hook.sh /etc/initramfs-tools/hooks/ || exit 2
|
|
awk -i inplace '/luks/{print $0 ",discard,initramfs,keyscript=/usr/sbin/passphrase-from-tpm.sh"}' /etc/crypttab
|
|
|
|
/usr/sbin/create-luks-tpm.sh
|
|
/usr/sbin/update-kernel.sh
|
|
efibootmgr --create --disk $DISK --part 1 --label "ubuntu unified" --loader "\EFI\BOOT\Linux\Linux.efi" --verbose
|
|
echo "Installed successfully! Please reboot and execute update-luks-tpm.sh afterwards"
|
|
|