Zack's Kernel News
Extending Boot Support
Chao Peng said:
"Multiboot specification is an open standard that provides kernels with a uniform way to be booted by multiboot-compliant bootloaders (like grub).
This patch is trying to make [the] Linux ELF kernel image to be a multiboot-compliant OS so that it can be loaded by a multiboot-compliant bootloader. The benefit is eliminating the maintenance for realmode and decompression code and especially when the kernel is loaded in a virtual machine, the reducing for these code can greatly cut down the boot time."
Unfortunately, he said, the specification wasn't completely clear about how to handle 64-bit kernels. Also, in spite of the grub program supporting the ELF64 format, it was currently unable to read the memory address required to load the program.
But H. Peter Anvin put his foot down in a one-line email, saying, "As has been shown many times before, this is a really bad idea. Unless there is a real-life use case where this matters enormously, this is nacked with extreme prejudice."
As an alternative, Luis R. Rodriguez remarked, "something to consider, provided the issues with multiboot get resolved: If you want to boot Xen, you actually use the multiboot protocol, the last PVH boot patches had borrowed ideas from Multiboot to add an entry to Linux, only it was Xen'ified. What would be Multiboot 2 seemed flexible enough to allow all sorts of custom semantics and information stacked into a boot image. The last thought I had over this topic (before giving up) was – if we're going to add yet-another-entry (TM) why not add extend Multiboot 2 protocol with the semantics we need to boot any virtual environment and then add Multiboot 2 support entry on Linux? We could redirect any custom boot mechanism then to just use that given its flexibility."
H. Peter clarified his objection, saying, "Multiboot has a fundamentally broken assumption, which is to do certain work for the kernel in the bootloader. This is fundamentally a bad idea, because you always want to do things in the latest step possible during the boot process, being the most upgradeable, and have the interface as narrow as possible. Therefore, using Multiboot is actively a negative step. It is declared an 'Open Standard' but anything can be such declared; it really is a claim that 'everything should work like Grub'."
Daniel Kiper, creator of Multiboot2, took umbrage to H. Peter's criticism, and replied, "I can agree that they are not perfect (especially Multiboot proto is very inflexible). However, both protos try to standardize boot process. I think it is nice because right now almost every (new) kernel has [its] own boot protocol (some even support more then one, sic!). And it is [an]enormous task to support all of them in one boot loader. So, I think that [the] Multiboot protocols family (IMO, Multiboot2 is preferred today) are [a] good idea. Are they not perfect? Yes, but I do not think that proliferation of tons of incompatible boot protocols, each specific for one kernel, is better. So, if you think that we can fix something in Multiboot2 please tell us. If you think that it is unfixable, please tell us too. We can think about Multiboot3 too (ehhh… maybe this is not the best idea). Anyway, it would be nice if one day we have one common boot protocol for (almost) everybody."
The discussion looked like it might get violent, but instead it trailed off inconclusively. It seems clear that support for ELF64 is one of those features where you think you're just implementing a cool feature, but actually you're stepping into a lake of boiling lava. It seems that the underlying issues of boot protocols need to find some resolution, before developers will be able to comfortably add certain new boot-time features.
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.