[systemd-devel] How to compile systemd v219

Ankele zhang ankelezhang at gmail.com
Tue Nov 26 02:36:35 UTC 2019


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.

and I execute `file new_systemd-cryptsetup` and execute `file
old_systemd-cryptsetup`, I got some difference between them.
# file systemd-cryptsetup
> systemd-cryptsetup: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=9935897aeaf65a746e86f8af2c2a960c4a316acc, for GNU/Linux
3.2.0, with debug_info, not stripped
# file systemd-cryptsetup.bak
> systemd-cryptsetup.bak: ELF 64-bit LSB pie executable, x86-64, version 1
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=fe13d068d10950b02945537972a4f5b687f41cc0, for GNU/Linux
3.2.0, stripped
[image: image.png]

I'm dying to know how to compile correctly, thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191126/bde8f940/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 37887 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191126/bde8f940/attachment-0001.png>


More information about the systemd-devel mailing list