<div dir="ltr"><div><br></div>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?<div><br></div><div>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.</div><div><br></div><div>and I execute `file new_systemd-cryptsetup` and execute `file old_systemd-cryptsetup`, I got some difference between them.</div><div># file systemd-cryptsetup<br>> 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<br></div><div># file systemd-cryptsetup.bak</div><div>> 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</div><div><div><img src="cid:ii_k3f8un920" alt="image.png" width="562" height="50" style="margin-right: 0px;"><br></div></div><div><br></div><div>I'm dying to know how to compile correctly, thank you very much.</div></div>