Skip to contentSkip to conversation

grub2 vs. kexec

DISCUSSION Michael Reichenbach 3 participants 3 messages Mar 25, 2009 – Mar 28, 2009

lore
Share & tools
lore
#0 lore raw

With great interrest I was reading http://grub.enbug.org/GSoC/Ideas2009
the new ideas sound really innovative.

I see two possible approaches to implement such features. Either
- doing it the GRUB2 way or
- loading a linux kernel (which supports already all the stuff), loading the needed drivers (bluetooth for menu, wlan and tcp/ip for network booting) and use kexec to boot the the new kernel

I mean you are going to implement almost a complete operating system again for booting another operating system. At the same time there is already a complete operating system (linux) which is also able to boot another operating system (kexec).

What is the advantage of the GRUB2 way?

-mr

#1 lore raw

Quoting Michael Reichenbach <[email protected]>:

Quoted 9 lines

With great interrest I was reading http://grub.enbug.org/GSoC/Ideas2009
the new ideas sound really innovative.

I see two possible approaches to implement such features. Either
- doing it the GRUB2 way or
- loading a linux kernel (which supports already all the stuff), loading the needed drivers (bluetooth for menu, wlan and tcp/ip for network booting) and use kexec to boot the the new kernel

Quoted 6 lines

I mean you are going to implement almost a complete operating system again for booting another operating system. At the same time there is already a complete operating system (linux) which is also able to boot another operating system (kexec).

What is the advantage of the GRUB2 way?

The advantage of the GRUB2 way is that GRUB2 exists already. I'm not aware of a Linux based bootloader. It's not just a kernel. You'll need a minimal loader for the kernel, some userspace for the menus, scripts for modifying connfiguation files.

A Linux based bootloader could compete against GRUB2 for certain tasks. Perhaps it would be bigger and slower, but with more features.
I'm not sure Linux kernel developers would be enthusiastic about
kexec support for Multiboot and FreeBSD kernels, but maybe it can be done in userspace.

If you want a Linux based bootloader, make one.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
In reply to Michael Reichenbach
Quoted 9 lines · Michael Reichenbach

With great interrest I was reading http://grub.enbug.org/GSoC/Ideas2009
the new ideas sound really innovative.

I see two possible approaches to implement such features. Either
- doing it the GRUB2 way or
- loading a linux kernel (which supports already all the stuff), loading the needed drivers (bluetooth for menu, wlan and tcp/ip for network booting) and use kexec to boot the the new kernel

Quoted 6 lines

I mean you are going to implement almost a complete operating system again for booting another operating system. At the same time there is already a complete operating system (linux) which is also able to boot another operating system (kexec).

What is the advantage of the GRUB2 way?

Actually, it's the other way around. GRUB is designed from scratch to be a bootloader. It can have many features, but that's not the important. When it comes to a bootloader, other things, such as being small/fast and having a reliable installation system are.

We do realize GRUB is not an OS kernel, and it doesn't intend to be anything more than a temporary stage that can load kernels (Marco once joked about adding context switching and a scheduler, but it was just a joke ;-)).

OTOH, this "kexec" idea strikes me as Linux trying to be a bootloader instead of a kernel [1]. Sure, it can be a bootloader if someone implements the missing things (a GUI, an installation system, etc), but it can't fit the purpose that well, since every single line of its code is designed with another idea in
mind: "once we're running, we stay there".

This just means they aim at different things. Which is good because in the end, the parts complement each other.

[1] It's funny, it reminds me of EFI in the exact opposite situation :-)

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."