Inspired by the work of HackBGRT EFI application.
This module is for GRUB2
(x86 32 or 64 bits) and allow to modify the EFI BGRT at grub level.
The BGRT
stands for Boot Graphic Resource Table and holds the boot logo you see when booting in UEFI.
This logo cannot be directly modified as it is builtin in the EFI firmware, unless you flash a new one.
However the ACPI table describing the logo could still be changed (not permanently) in an EFI application.
GRUB2
, and its modules, are EFI applications and so can change the content of the BGRT
table for a one-time-boot.
This is what this GRUB2 module do.
Local installation:
$ make && sudo make install
grubver
variable designates the matching grub version and is 2.04
by default.
platform
indicates the cpu platform architecture: x86_64
(default) or i386
.
DESTDIR
variable is respected at installation.
A PKGBUILD
is also provided for Arch-based distributions.
insmod hackbgrt
hackbgrt (hd0,gpt1) image=/relative/path/to/bmp|keep|remove[,x=123|center|keep,y=456|center|keep][,weight=1] [image=...]*
Where:
(hd0,gpt1)
is yourESP
(EFI System Partition) as seen by GRUB2.image
variable could take a 24-bit BMP splash path file, or the valuekeep
, or the valueremove
.x
andy
variables could be used to position the image. You can use an absolute position, orcenter
value orkeep
value.weight
variable is use to add a weight (probability) to your image. Only useful if you use multipleimage
variables.
The Splash file should be relative to the ESP partition and should start with a slash.