<div dir="ltr"><div>Yes, I think now I understand that mkosi will build default initrd image without tpm2-tss libraries. Perhaps because the package names are different for each distro. <br><br></div><div>I need to build the initrd image separately at first, then use it to build OS image with --initrd flag.</div><div><br></div><div>Thanks.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 6, 2023 at 8:02 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mi, 06.12.23 18:28, Renjaya Raga Zenta (<a href="mailto:ragazenta@gmail.com" target="_blank">ragazenta@gmail.com</a>) wrote:<br>
<br>
> Hi,<br>
><br>
> I am exploring OS image building with mkosi. It works great until I add TPM<br>
> 2.0 in qemu.<br>
><br>
> I found that the systemd-pcrphase-initrd.service failed. There are 3<br>
> pcrphase service:<br>
><br>
> 1. systemd-pcrphase-initrd.service (failed)<br>
> 2. systemd-pcrphase.service (ok)<br>
> 3. systemd-pcrphase-sysinit.service (ok)<br>
<br>
So the latter two run from the host fs, the first one from the initrd fs.<br>
<br>
> Related journal log:<br>
> systemd[1]: Failed to start systemd-pcrphase-initrd.service - TPM2 PCR<br>
> Barrier (initrd).<br>
> ...<br>
> systemd-pcrphase[130]: Failed to load TPM2 libraries: Operation not<br>
> supported<br>
> ...<br>
<br>
It appears you are lacking the tpm2-tss libraries in your initrd image.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:monospace,monospace">Renjaya Raga Zenta</span></div><div><span style="font-family:monospace,monospace">Mobile:<br>+62 811 572 4400</span><br></div></div></div></div></div></div></div>