[systemd-devel] How to compile systemd v219

Lennart Poettering lennart at poettering.net
Tue Nov 26 08:15:54 UTC 2019


On Di, 26.11.19 10:36, Ankele zhang (ankelezhang at gmail.com) wrote:

> On CentOS7.6(3.10.0-957.el7.x86_64), I encrypt my root disk and I have to
> enter my passphrase while booting my CentOS before mount root disk. Now, I
> want to hardcode the passphrase into the program, what should I do?
>
> I have tried to recompile `systemd` source V219 but I don not really
> understand how to compile it correctly. So I test on
> Fedora31(5.3.7-301.fc31.x86_64), compile `systemd` V243 and replace the
> executable binary in initramfs-$(uname -r).img with the compiled
> systemd-cryptsetup file. But it does not work.

Make sure to compile centos 7 systemd with a centos 7
compiler/linker, on centos 7. "yum builddep" can help you install all
dependencies you need.

That said, for your usecase, just use a keyfile, no need to recompile.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list