<div dir="ltr"><div><div>Hi,<br><br></div>I am exploring OS image building with mkosi. It works great until I add TPM 2.0 in qemu.<br><br></div><div>I found that the systemd-pcrphase-initrd.service failed. There are 3 pcrphase service:</div><div><br></div><div>1. systemd-pcrphase-initrd.service (failed)</div><div>2. systemd-pcrphase.service (ok)</div><div>3. systemd-pcrphase-sysinit.service (ok)</div><div><br></div><div>Related journal log:</div><div>systemd[1]: Failed to start systemd-pcrphase-initrd.service - TPM2 PCR Barrier (initrd).</div><div>...</div><div>systemd-pcrphase[130]: Failed to load TPM2 libraries: Operation not supported</div><div>...<br></div><div><div><div><div><br></div><div>My mkosi.conf:<br><br></div><div>[Distribution]<br>Distribution=debian<br>Repositories=contrib,non-free,non-free-firmware<br>Release=bookworm<br><br>[Output]<br>Format=disk<br>ImageId=test<br>ImageVersion=0.1.0<br><br>[Content]<br>Bootable=yes<br>Locale=en_US.UTF-8<br>LocaleMessages=en_US.UTF-8<br>Keymap=us<br>Timezone=Asia/Jakarta<br>Hostname=test<br><br>KernelCommandLine=<br>  console=ttyS0 <br>        console=tty1<br>  loglevel=4<br><br>Packages=<br>       amd64-microcode<br>       apt<br>   apt-transport-https<br>   bash-completion<br>       ca-certificates<br>       coreutils<br>     curl<br>  dbus-broker<br>   debian-archive-keyring<br>        dosfstools<br>    e2fsprogs<br>     efibootmgr<br>    file<br>  gdisk<br> intel-microcode<br>       jq<br>    less</div><div>libtss2-dev<br></div><div> linux-image-amd64<br>     locales<br>       man-db<br>        openssh-client<br>        parted<br>        systemd<br>       systemd-boot<br>  systemd-resolved<br>      systemd-sysv<br>  systemd-timesyncd<br>     tzdata<br>        udev<br>  usbutils<br>      zstd<br><br>[Validation]<br>SecureBoot=yes</div><div><br></div><div>Bookworm still uses systemd 252, is that related? Previously without the libtss2-dev package installed, all 3 services above failed. So perhaps the initrd doesn't have libtss2-dev installed. How to include it then?<br><br></div><div>Thanks<br></div></div></div></div></div>