bsherman / ublue-custom

Custom Fedora immutable desktop images with unfiltered Flathub, distrobox, automatic updates, and drivers (nvidia and xbox)
Apache License 2.0
12 stars 1 forks source link

conditional initramfs for tpm setup #27

Open bsherman opened 3 months ago

bsherman commented 3 months ago

per @KyleGospo ..

TPM unlock script works great, I just modified it to use initramfs-etc instead of enabling the full thing

so, I thought we should make it conditional on a pre-built initramfs vs default...

He suggested removing this chunk with something simpler...

## Update initramfs to respect tpm2 unlock
rpm-ostree initramfs |grep tpm2 > /dev/null
if [ 0 -eq $? ]; then
  echo "TPM2 already present in rpm-ostree initramfs config."
  rpm-ostree initramfs
  echo
  echo "Re-running initramfs to pickup changes above."
fi
rpm-ostree initramfs --enable --arg=--force-add --arg=tpm2-tss

@m2giles comments that no modifications to initramfs are needed in this script assuming the initramfs was pre-built with tpm2 included.

So the script needs conditionally check this.

bsherman commented 3 months ago

After this script works conditionally, add as a new recipe to ujust in https://github.com/ublue-os/config