<div dir="ltr"><div dir="ltr">On Tue, Nov 26, 2019 at 4:36 AM Ankele zhang <<a href="mailto:ankelezhang@gmail.com">ankelezhang@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><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></blockquote><div><br></div><div>Did you build from tthe Fedora RPM or manually from systemd source? Debug info is usually removed during packaging using `strip`.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>