summaryrefslogtreecommitdiffstats
path: root/src/utils/uefi.py
Commit message (Collapse)AuthorAgeFilesLines
* utils: improve uefi detection mechanismAlejandro Sirgo Rica2024-03-081-2/+12
| | | | | | | Checking the existence /sys/firmware/efi as it might appear sometimes in BIOS installs if the BIOS configuration is not proper. Checking for the EFI partition is the safest method to veryfy the install type.
* uefi: update EFIBOOTMGR_BIN to use /opt/opengnsys/sbin/efibootmgrv1.3.2-6OpenGnSys Support Team2024-03-051-1/+1
| | | | debian package with json support provides the binary through this path, update it.
* uefi: define EFIBOOTMGR_BIN to ease changing the efibootmgr binaryAlejandro Sirgo Rica2024-03-041-9/+11
| | | | | | The json functionality proposed upstream might be merged one day in efibootmgr so deploying a fork would not be needed anymore. This change aims to ease the migration once that day comes.
* utils: add uefi.pyJose M. Guisado2024-03-041-0/+97
Add UEFI related utilities inside a new utility module: uefi.py _check_efibootmgr_json ====================== Check if the system efibootmgr executable supports JSON output. This is a private function used only by other functions from uefi.py. is_uefi_supported ================= Check if the system supports UEFI firmware. run_efibootmgr_json =================== Runs efibootmgr with json output support. Return the JSON output as a Python dict. efibootmgr_create_bootentry =========================== Create nvram boot entry. This bootentry is usually later set to boot next just once via "BootNext" nvram variable. efibootmgr_delete_bootentry =========================== Delete a nvram boot entry. Used to avoid duplicates when booting the same disk and partition from a given client. efibootmgr_bootnext =================== Set nvram "BootNext" variable to a given boot entry so after client reboot, PXE is not executed and the given boot entry takes precedence. Add dependency with efibootmgr version >= 18, and efibootmgr JSON output which is currently out of tree from util-linux repo.