Step 6 – generating the initramfs image and bootloader setup
Firstly, please note that this discussion is highly biased toward the x86[_64] architecture, perhaps the most common one in use. Nevertheless, the concepts learned here can be directly applied to other architectures (like ARM), though the precise commands may vary. Typically, unlike on the x86, and at least for ARM-based Linux, there’s no direct command to generate the initramfs image; it has to be done manually, “by hand.” Embedded builder projects like Yocto and Buildroot do provide ways to automate this.
For the typical x86 desktop or server kernel build procedure, this step is internally divided into two distinct parts:
- Generating the
initramfs
(formerly calledinitrd
) image - GRUB setup for the new kernel image
The reason it’s encapsulated in a single step here is that, on the x86 architecture, convenience scripts perform both tasks, giving the appearance...