diff --git a/shim-install b/shim-install index 445f561..85d412b 100644 --- a/shim-install +++ b/shim-install @@ -17,6 +17,7 @@ source_dir="${datadir}/efi/${arch}" efibootmgr="/usr/sbin/efibootmgr" grub_probe="/usr/sbin/grub2-probe" grub_mkrelpath="/usr/bin/grub2-mkrelpath" +no_grub_install=no grub_install="/usr/sbin/grub2-install" grub_install_target= self="`basename $0`" @@ -127,6 +128,7 @@ usage () { echo "--config-file=FILE use FILE as config file, default is $grub_cfg." echo "--clean remove all installed files and configs." echo "--suse-enable-tpm install grub.efi with TPM support." + echo "--no-grub-install Do not run grub2-install." echo echo "INSTALL_DEVICE must be system device filename." } @@ -206,6 +208,9 @@ do --clean) clean=yes ;; + --no-grub-install) + no_grub_install=yes ;; + -*) echo "Unrecognized option \`$option'" 1>&2 usage @@ -352,6 +357,39 @@ if test "$update_boot" = "yes"; then fi +prepare_cryptodisk () { + uuid="$1" + + if [ "x$GRUB_CRYPTODISK_PASSWORD" != x ]; then + echo "cryptomount -u $uuid -p \"$GRUB_CRYPTODISK_PASSWORD\"" + return + fi + + if [ "x$GRUB_TPM2_SEALED_KEY" = x ]; then + echo "cryptomount -u $uuid" + return + fi + + tpm_pcr_bank="${GRUB_TPM2_PCR_BANK:-sha256}" + tpm_pcr_list="${GRUB_TPM2_PCR_LIST:-0,2,4,7,9}" + tpm_sealed_key="${GRUB_TPM2_SEALED_KEY}" + + declare -g TPM_PCR_SNAPSHOT_TAKEN + + if [ -z "$TPM_PCR_SNAPSHOT_TAKEN" ]; then + TPM_PCR_SNAPSHOT_TAKEN=1 + echo "tpm_record_pcrs 0-9" + fi + + cat < "${efidir}/grub.cfg" diff --git a/shim.changes b/shim.changes index bde494a..2b1a637 100644 --- a/shim.changes +++ b/shim.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Dec 9 08:38:14 UTC 2022 - Joey Lee + +- Modified shim-install, add the following Olaf Kirch's patches to support + full disk encryption: (jsc#PED-922) + a5c57340740c Introduce --no-grub-install option + 5c2c3addc51f Handle different cases of controlling cryptomount volumes during first stage boot + 26c6bd5df7ae Have grub take a snapshot of "relevant" TPM PCRs + ------------------------------------------------------------------- Wed Nov 23 07:28:57 UTC 2022 - Joey Lee