I'm trying to add dropbear to my initramfs so I can unlock the encrypted disk through a remote SSH session (as described here). I'm running Fedora 16 which apparently uses dracut to generate the initramfs image. Can anyone explain (or provide a link) how to add dropbear to initramfs using this setup?
I've been trying to learn more about dracut, but I'm finding that there's not a ton of information out there. Here is my current understanding, if anyone can comment on this:
- I need to create a new dracut module which installs a pre-mount hook into the initramfs image.
- The pre-mount hook will start the dropbear server, before any attempt is made to unlock/mount the LUKS filesystem (which presumably occurs during the "mount" phase).
- With dropbear started, I should be able to SSH to the server and provide the passphrase to unlock it, as describe in the other post.
- I also need to add a pre-pivot hook that will stop the dropbear server before the boot process chroots to the final root partition.