Hi,
Espanish wrote:That said, what the hell were they thinking? The legacy Grub was easy to configure (huge mess in /boot/grub/ now) and to install (so far I failed to install Grub2 on a loopback device, following the Wiki instructions). Is the goal of Grub2 to be a UEFI-compliant bootloader? How does it justify how bloated and overengineered it is?
For BIOS systems; traditionally you'd have an MBR that loads the OS's boot sector (in the OS's partition). When there are multiple OSs installed, you'd use a boot manager to allow the user to select which OS they want, which "chain loads" the selected OS's boot loader. The part the selects which OS to boot and the OS's boot loader are 2 completely different and separate things. This allows the user to install any boot manager they like, and any OSs they like - any mixture of OSs and boot managers should work.
The original GRUB developers completely failed to understand the benefits of "separation of concerns" and screwed this up. They built many different boot loaders right into the boot manager (e.g. for Linux, for FreeBSD, etc; plus multi-boot). It was a poorly designed from the very beginning.
Part of the reason multi-boot exists is because they were hoping to convince a lot of OSs to abandon their existing/native boot code and switch to multi-boot, and avoid the need many different boot loaders in GRUB. This didn't happen. For example, even after the GRUB developers added multi-boot support to the Linux kernel, none of the Linux kernel developers wanted it and Linux continued to use its own/native boot protocol.
Then UEFI came along. For UEFI it's the same - when multiple OSs are installed, you're supposed to have a UEFI application that lets the user choose which OS to boot, and that application would start the OS's own UEFI boot loader. GRUB legacy was designed for BIOS only and couldn't work on UEFI. They started GRUB2 in an attempt to screw up "separation of concerns" on UEFI too. While doing that they also attempted to add support for non-80x86 systems (e.g. MIPS, ARM, Itanium, etc).
Their utter failure to understand the benefits of "separation of concerns", combined with many more very different "concerns" (including different boot devices, different "boot protocols" needed by different OSs, different firmware types, different CPUs/architectures, etc) led to "
second system effect". To help cope with such a ridiculous mess, they switched to a modular approach. This mostly only made things worse (optional modules meant a whole lot more mess for installation and configuration, plus additional risk of breakage - e.g. when a module one OS needs wasn't installed by another OS).
Note: The increase in complexity also led to OSs (e.g. Ubuntu) that attempt to hide the complexity of GRUB2's configuration under their own layer of scripts, etc; where if you update the OS its scripts "auto-re-generate" GRUB2's configuration for the user. This means if you have 2 or more OSs installed, they can "fight" and trash each other's GRUB2 configuration (a side effect caused by failing to separate the different OS's concerns).
For multi-boot itself, it was similar. The original version was only designed for BIOS and didn't work so well on UEFI or other systems; so they started "multi-boot 2". However, due to lack of interest (and because few OSs cared about multi-boot) this took an extremely long time. This also means that there are people using older versions of GRUB2 on their computers with old/incompatible versions of multi-boot2.
Espanish wrote:I would like to know what you people have to say about Grub2 and if your kernels are Multiboot2-compliant.
For my OSs; I design my own "transition state" standard that describes the state the computer has to be in when the boot loader transfers control to the OS (which information needs to be where, what state CPUs should be in, etc). Then I create a different boot loader for each different case (e.g. one for BIOS hard disk, one for BIOS network boot, one for UEFI, etc). Multi-boot is just one of those different cases - e.g. I'll have a piece of code that is started by multi-boot, that sets everything up to comply with the OS's "transition state" standard, and then passes control to the OS like any other boot loader would. However; because my own "transition state" standard is designed for my OS and includes special features that multi-boot doesn't support; the OS's multi-boot support is something my OS's user guides would warn potential end users against using (e.g. a "not officially supported" hack).
Cheers,
Brendan