3 ms·
A similar option is to boot a kernel using the built-in EFI stub (CONFIG_EFI_STUB=y), embed the initramfs if you use one (CONFIG_INITRAMFS_SOURCE), and set the
by throwaway4857 5y ago
A similar option is to boot a kernel using the built-in EFI stub (CONFIG_EFI_STUB=y), embed the initramfs if you use one (CONFIG_INITRAMFS_SOURCE), and set the default command line with CONFIG_CMDLINE if configuring it via UEFI is too unpleasant. I boot like this.
Advantage: less complex than adding another layer (and dependency) with the gummiboot stub.
Disadvantage: relinking the kernel is more expensive than rebundling with objcopy, if you change initramfs with the same kernel often.
Disadvantage: it's not an option if you use a distribution kernel binary instead of building your own.
- elFarto 5y agoI actually wrote a UEFI boot loader a few weeks ago that loads the kernel, initramfs and command line directly from a file on the root fs. It uses the efifs project to let it load directly off of an ext4 file system. It's nice to use compared with grub, just edit a file and reboot. I've struggled to understand exactly how the fedora boot system is configured, and which command I need to run or file to edit to get it reconfigured.
- zamadatix 5y agoThe extra step of running the command to generate the final output file has saved my ass many times since it checks for errors as well. Other than that command it's the same process isn't it? Edit /etc/default/grub, run command to validate and apply, reboot?
- zokier 5y agoThis method is also documented at kernel.org: https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html#what-is-initramfs https://www.kernel.org/doc/html/latest/filesystems/ramfs-roo... https://www.kernel.org/doc/html/latest/driver-api/early-userspace/early_userspace_support.html https://www.kernel.org/doc/html/latest/driver-api/early-user...