dropbear-initramfs not working

November 14, 2024, 11:24

sagely_ozymandias42

I've followed the various guides and installed dropbear-initramfs, created the authorized_keys file under /etc/dropear/initramfs/authorized_keys with both the ed25519 and in case it doesn't work with dropbear like some posts said an id_rsa key. I also added my ip config via ip=ip::gateway:netmask:hostname:if:off to /boot/firmware/cmdline.txt as well as systemd.unit=rescue.target to boot into the initrd on next boot. ofc I also did update-initramfs -k all -u What works: The Pi responds to ping. No SSH server is running. (nmap'd it and no open ports) note: I also use the pi as nas and run into issues with it hanging itself in the boot process when the nas drives aren't commented out in fstab so this was one reason to want ssh as to not have to pull the plug and the sdcard just to change 1 or 2 lines in fstab from another device, plug it back in and have it boot successfully. note2: root is locked but this should not be an issue with pubkey auth. I'm at wits end.

sagely_ozymandias42

so I might have found the issue. With it being that RaspiOS 12 is very confusing.. while it generates initrd files it never uses them. Which means I need to force them to be used via the initrd= parameter in cmdline.txt

oops.se

If you have rotating disks connected you need to add an delay so the disks are up and synced before mounted.

oops.se

And what guides? General description = General answers

sagely_ozymandias42

doesn't matter. they all say the same anyway. install dropbear-initramfs, configure it, re-generate initrd, adapt kernel boot line to include networking. I got it to work btw. Had to change root=PARTUUID=xxxxxx to root=/dev/ram0 and force it to use the initrd via initrd=initramfs8 Of course this also breaks it from booting even with dropbear then working from the initrd. It only serves to confirm my suspsicion that raspi OS does not use the initrd at all. No idea why it even exists...