site  contact  subhomenews

Set Limine default in UEFI

July 13, 2026 — BarryK

Reviewing Limine Installer, this code adds the new installation of Limine to the UEFI (/usr/local/limine-installer/limine-installer, line 572+:

    DRVdest="$(echo -n "${ESPdest}" | sed -e 's%[0-9]*$%%' -e 's%p$%%')" #ex: sdb
efibootmgr -c -d /dev/${DRVdest} -p ${ESPdest/*[a-z]/} -L limine -l "\EFI\limine/"${EFIname}".EFI" 2>/tmp/limine-installer/efibootmgr-install-error.log

...where "-c" is the short form of "--create", "-d" is the drive, "-p" is partitition number, "-L" is the label, and "-l" is path the to Limine .efi file.

According to online documentation, this new entry should become the default at next bootup. However, I seem to recall, from testing sometime ago, that might not have been the case, so have added extra code to ensure it is first in the boot order:

     ENTRY="$(efibootmgr 2>/dev/null | grep ' limine' | grep -o '000[0-9A-Z]')"
BO1="$(efibootmgr 2>/dev/null | grep '^BootOrder:' | cut -f 2 -d ' ' | tr ',' '\n' | grep -v "${ENTRY}")"
BO2="${ENTRY}${CR}${BO1}"
BO3="$(echo -n "${BO2}" | tr '\n' ',')" #ex: 0005,0000,0001
efibootmgr --bootorder ${BO3}

I have started to think about a graphical installer for EasyOS, and Limine Installer will be part of it. So, checking the code in Limine Installer, that it looks sane.    

Tags: easy