'''[http://grub.enbug.org/ GRUB2]''' is a modular, multiboot-capable bootloader for many operating systems.

+

'''[https://www.gnu.org/software/grub/grub.html GRUB2]''' is a modular, multiboot-capable bootloader for many operating systems that can be used as a payload for coreboot.

−

GRUB2 is an ideal payload for coreboot. It's modular, extensible, supports booting off filesystems, and it has a scriptable shell. Our goal is to replace the common coreboot payload [[FILO]] with a coreboot-capable version of GRUB2.

== Status ==

== Status ==

−

As of the time of this writing, the official GRUB2 can not be loaded in coreboot v2 without a small patch. It works fine with coreboot v3.

+

* The mainline version of GRUB2 has a [http://grub.enbug.org/CoreBoot wiki page on the coreboot port] (Update: no longer available)

−

+

* Additional information about our former GRUB2 effort (which was part of Google Summer of Code 2007) can be found in the history of this page. Don't expect any link there to work.

−

* A significant amount of work has been put into GRUB2 in our [[Monotone Repository|monotone repository]], which also provides snapshots.

+

* As an alternative, you could consider using [[FILO]]. Both FILO and GRUB2 have various advantages and disadvantages. Which of the two is better suited depends on your requirements.

−

* The mainline version of GRUB2 has a [http://grub.enbug.org/CoreBoot wiki page on the coreboot port].

+

* Yet another alternative is to not put GRUB into the BIOS ROM, but have it run from your disk as you would with a vendor BIOS. For that, you can use [[SeaBIOS]] as payload, which will then be able to run either GRUB1 or GRUB2 from your disk.

−

+

−

== How to build GRUB2 as a payload ==

+

−

+

−

It's recommended to use a recent snapshot of the '''allpatches''' branch in the [[Monotone Repository|GRUB2 monotone repository]]

+

−

(you can also just download http://coreboot.org/viewmtn/branch/head/tar/org.coreboot.grub2.allpatches - which resolves to the latest revision on that branch; the top level directory in the resulting tarball represents the revision ID, which is a SHA-1 value over revision data, and thus varies wildly).

* Mainstream GRUB2's grub-mkimage needs to put the program headers right after the ELF header ([http://www.mail-archive.com/grub-devel@gnu.org/msg03547.html Fix available]).

+

−

* USB stack integration (in progress).

+

−

* See more information in the "[http://tracker.coreboot.org/trac/coreboot/milestone/Port%20GRUB2%20to%20coreboot Porting GRUB2 to coreboot]" milestone in the coreboot issue tracker.

+

−

+

−

== History ==

+

−

+

−

[[User:PatrickGeorgi|Patrick Georgi]] has been working on GRUB2 for coreboot during the Google Summer of Code 2007. He made an [http://coreboot.org/~oxygene/lbgrub2-20070820-1.tar.bz2 original code submission] on August 20th 2007. Please read [http://coreboot.org/~oxygene/lbgrub2-instructions.txt GRUB2 on coreboot instructions] for information on how to use it.

+

−

+

−

This work was subsequently rejected by the GRUB project, and was eventually re-implemented by Robert Millan, one of the GRUB project members. The re-implementation lacks a couple of fundamental features. From this new base, more work was done.

Status

Additional information about our former GRUB2 effort (which was part of Google Summer of Code 2007) can be found in the history of this page. Don't expect any link there to work.

As an alternative, you could consider using FILO. Both FILO and GRUB2 have various advantages and disadvantages. Which of the two is better suited depends on your requirements.

Yet another alternative is to not put GRUB into the BIOS ROM, but have it run from your disk as you would with a vendor BIOS. For that, you can use SeaBIOS as payload, which will then be able to run either GRUB1 or GRUB2 from your disk.