Open jeandestouches opened 2 years ago
Now this is super bizarre. I will see what I can do to roll out a cpio archive with node. The gen_init_cpio from kernel sources would be best, but it requires to run on host. We could build it statically in sysroot, and currently crosscompilation is not supported so we can be sure that anything sysroot can run/build, can be executed on host.
Will ping you later today here with fixes to test.
Following my issue related to missing nodes when initramfs is embedded into kernel. I tried on my laptop, it is easier with a display. My laptop (like my headless system) uses LUKS with askpass to unlock drive as usual. Both are running kernel 5.10.74.
I added "sshd sshd_wait=10 sshd_port=43222 binit_net_if=eth0 binit_net_addr=192.168.1.14/24' to replicate what it is used on my headless system.
So, I tried with initramfs embedded into kernel and then, with initramfs passed to the bootloader. (grub) Both examples uses freshly built better-initramfs (with the commit that removed mknod calls) so dev/ is empty in sourceroot.
With initramfs embedded into kernel :
As you can see, 'mkdir -m 700 -p /dev' is missing and it tries to create nodes after (???)
If the initramfs is not embedded then it works fine :
As you can see, "Executed: 'mkdir -m 700 -p /dev'' is present this time, and I can unlock the drive by typing my password on the laptop or connecting remotely via ssh, unlock & resume-boot works fine.
For now, I solved it using your "old" function to generate the nodes in /usr/src/better-initramfs/dev before building the kernel in the embedded scenario.
I guess, console would be enough here but whatever.