[systemd-devel] How to compile systemd v219
Mantas Mikulėnas
grawity at gmail.com
Tue Nov 26 06:04:00 UTC 2019
On Tue, Nov 26, 2019 at 4:36 AM 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?
>
IMHO you should give up on that idea and just configure a keyfile (e.g.
using the rd.luks.key= boot option). It's a more supported method and the
key information is easy to extract in both cases.
>
> 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
>
Did you build from tthe Fedora RPM or manually from systemd source? Debug
info is usually removed during packaging using `strip`.
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191126/67ab16de/attachment.html>
More information about the systemd-devel
mailing list