EFI bootloader, GRUB on Mac and others

EFI

Mac as most modern systems uses EFI.

Boot settings consist of two parts:

  1. efibootmgr - allows configuring UEFI NVME (chip), specifying which loader to load from the EFI partition (Efi System Partition, ESP) first, and paths to .efi bootloader files on EFI partition, for every "EFI entry".
  2. EFI system partition (ESP) - contains bootloaders for each system installed on Mac.
GRUB

Grub menu entries can be configured automatically by running os-prober - it will populate grub settings automatically. After we've configured GRUB entries (/etc/grub.d/*) and GRUB general settings (/etc/default/grub), we can run

grub2-mkconfig          # generate /boot/grub2/grub.cfg
sudo grub-install       # copy grub stuff to EFI partition
How to boot Linux from GRUB's console

do ls command, to find out where grub files are located (say, /grub, or somewhere else). Then:

set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod linux
insmod normal
normal

Creating custom font

# copying the font to one of the themes
sudo grub-mkfont -s 28 -o /boot/grub/fonts/unicodemonobig.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
sudo cp /boot/grub/fonts/unicodemonobig.pf2 /boot/grub/themes/StylishDark_mx/

Now adjust the contents of /boot/grub/themes/StylishDark_mx/theme.txt so it uses the new font, instead of the original one, and run Grub Customizer to apply it.

Saving changes

I use grubcustomizer app to write settings to EFI and adjust them graphically, instead of dealing with config files.

← Back to Articles