Re:Dropbear SSH, a lightweight alternative to OpenSSH
by gh2k on Wednesday August 15, 2018 @05:49AM
(#17764798)
There's also an example script on the Gentoo wiki that might serve as a good starting point:
https://wiki.gentoo.org/wiki/Custom_Initramfs/Examples#Simpl...
Basicaly when linux boot from initrd it starts "/init" executable and chroots to your system (ok, it is using pivot_root and it is slightly more complex), but idea it is same as manually mounting filesystems and doing chroot then starting executable /bin/init