GRUB2: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== features == | == features == | ||
=== Security === | === Security === | ||
==== LUKS disks openning ==== | |||
=== Other features === | === Other features === | ||
==== SeaBIOS launching ==== | ==== SeaBIOS launching ==== |
Revision as of 19:03, 13 March 2013
GRUB2 is a modular, multiboot-capable bootloader for many operating systems that can be used as a payload for coreboot.
features
Security
LUKS disks openning
Other features
SeaBIOS launching
grub is capable of launching seabios like that: Add Seabios to the memdisk:
tar uvf ../memdisk.tar ../../seabios/out/bios.bin.elf --transform 's#.*#/bios.bin.elf#'
Then add that to grub.cfg:
menuentry 'SeaBios' { set root='memdisk' echo 'Loading SeaBios ...' chainloader /bios.bin.elf }
Status
- The mainline version of GRUB2 has a 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.
- 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.
Compiling GRUB2 for being use as a payload
See Talk:GRUB2 and here for more details.
Compiling
bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub cd grub ./autogen.sh ./configure --with-platform=coreboot make
creating the grub payload (with a memdisk)
cd grub-core tar cvf ../memdisk.tar serial.mod terminal.mod normal.mod echo.mod ahci.mod all_video.mod ata.mod boot.mod cat.mod chain.mod configfile.mod crypto.mod elf.mod ext2.mod extcmd.mod fshelp.mod help.mod linux.mod memdisk.mod minicmd.mod multiboot2.mod pata.mod part_msdos.mod gettext.mod --transform 's#^#/boot/grub/i386-coreboot/#' tar uvf ../memdisk.tar grub.cfg --transform 's#^#/boot/grub/#' ../grub-mkimage -d . -O i386-coreboot -o ../../grub2.elf memdisk tar ehci ohci uhci at_keyboard usb_keyboard -m ../memdisk.tar ls -l -h ../../grub2.elf
creating the grub payload (without a memdisk)
cd grub-core modules="serial terminal normal echo ahci all_video ata boot cat chain configfile crypto elf ext2 extcmd fshelp help linux memdisk minicmd multiboot2 pata part_msdos gettext" ../grub-mkimage -d . -O i386-coreboot -o ../../grub2.elf memdisk tar ehci ohci uhci at_keyboard usb_keyboard ${modules} ls -l -h ../../grub2.elf
creating the grub payload (with a memdisk for the config file)
cd grub-core tar cvf ../memdisk.tar grub.cfg --transform 's#^#/boot/grub/#' modules="serial terminal normal echo ahci all_video ata boot cat chain configfile crypto elf ext2 extcmd fshelp help linux memdisk minicmd multiboot2 pata part_msdos gettext" ../grub-mkimage -d . -O i386-coreboot -o ../../grub2.elf memdisk tar ehci ohci uhci at_keyboard usb_keyboard ${modules} -m ../memdisk.tar ls -l -h ../../grub2.elf
With all modules(possible with last grub from bzr) And a memdisk for grub.cfg
cd grub-core tar cvf ../memdisk.tar grub.cfg --transform 's#^#/boot/grub/#' memdisk="$(ls *.mod | sed 's#.mod$##g')" ../grub-mkimage -d . -O i386-coreboot -o ../../grub2.elf ${modules} -m ../memdisk.tar ls -l -h ../../grub2.elf
combining with coreboot
build/cbfstool build/coreboot.rom add-payload -n img/grub2 -f grub2.elf -t raw build/cbfstool build/coreboot.rom print
That way it will be possible to run grub2 as a payload after SeaBIOS: The advantage is that it's less risky. At runtime press F12 and you'll have the grub2 option.