kexec based bootloaders/fast rebooting: Boon or Bane
2020-12-01, 21:15–21:30, Main Stage

There is already no shortage of boot loaders for Linux, but Linux Kernel based bootloading via kexec has become popular as it provides the following distinct advantages:
• Reuse kernel drivers, • Provides userspace, simplifying development, • Platform independence, and • Well tested.

Boot loaders like GRUB provide several advanced features but they need to replicate functionalities similar to OS, which creates an ever increasing maintenance burden.

Kexec lets you boot your Linux kernel into another kernel without going through the hardware reset and reinitialization performed by system BIOS/firmware:
- Improves boot reliability by replacing lightly-tested firmware drivers with hardened Linux drivers.
- Hardware reset and reinitialization performed by firmware takes minutes, being able to skip it reduces downtime.
- Proven approach for several years – many kexec based bootloaders are already available [1]
[1]. linuxboot: https://www.linuxboot.org, petitboot: https://github.com/open-power/petitboot

However there is scope for improvement [2] - several Linux drivers don't yet implement .shutdown() callback, which means that kexec boot'ed kernel may panic. Let's discuss these to-dos needed to improve the kexec based bootloaders.
[2]. 10a663a1b151 ("ata: ahci: Add shutdown to freeze hardware resources of ahci"), 428c491332bc ("net: ena: Add PCI shutdown handler to allow safe kexec").


Related Projects

LinuxBoot, tianocore

I work with Red Hat and am I a part of the RH kernel team. I have been hacking on bootloaders and kernel since past 13 years. I contribute to Linux, EFI/u-boot bootloader code base and also to user-space utilities like kexec-tools and crash-utility. I also co-maintain crash-utility tool upstream. Bringing up a Silicon (i.e. running the first SW on it) after hardware tapeout is my passion and I have interest in pre-silicon emulator and simulator design methodologies as well.