NP_complete Tux's lil' helper
Joined: 21 Mar 2009 Posts: 133
|
Posted: Sun Oct 06, 2024 6:41 am Post subject: EFI stub+disk encryption: is initramfs really needed? |
|
|
I am following this guide to set up disk encryption, and I would like to boot from an EFI stub.
1. My main question is whether initramfs is really necessary here? As I am thinking this through, I could, simply, put the kernel (with a name ending in .efi) into the ESP partition which will be mounted by the BIOS. The kernel would have all the requisites built in and can therefore decrypt the LUKS volume and mount the btrs root file system. After this, we are basically done. Is there a gap in my logic?
2. As a closely related question, do I need a separate /boot partition containing initramfs, as described in the linked article? Assuming that I do need such a partition, how would the boot sequence proceed? First, the kernel stub is read by the BIOS, then /boot is mounted and initramfs loaded into memory to give the kernel the ability to decrypt and mount the root file system. Do we need to go back and forth between the kernel and initramfs like that?
Many thanks. |
|