Chainloading SeaBIOS from a GRUB payload - librecore-org/librecore GitHub Wiki

Some GNU/Linux installers won't boot properly from a GRUB payload. To work around that, you can add a SeaBIOS ELF and add a menu option to the GRUB payload that chainloads SeaBIOS.

First compile your ROM with GRUB as you normally do, but don't add etc/grub.cfg to the cbfs yet.

Once your ROM is compiled, compile a SeaBIOS image:

cd payloads/external/SeaBIOS/seabios
make menuconfig
 --> CONFIG_COREBOOT=y
 --> CONFIG_VGA_COREBOOT=y

make

Copy the resulting out/bios.bin.elf and out/vgabios.bin to a working directory, along with your previously compiled ROM.

Add bios.bin.elf as elf/seabios.elf to the cbfs:

cbfstool coreboot.rom add -f bios.bin.elf -n elf/seabios.elf -t raw

Add vgabios.bin as vgaroms/vgabios.bin to the cbfs:

cbfstool coreboot.rom add -f vgabios.bin -n vgaroms/vgabios.bin -t raw

Add this option to your grub.cfg:

menuentry 'Chainload SeaBIOS  [b]' --hotkey='b' {
        chainloader (cbfsdisk)/elf/seabios.elf
}

And add the grub.cfg to the cbfs:

cbfstool coreboot.rom add -f grub.cfg -n etc/grub.cfg -t raw