EfibootmgrController#

class efiboot.backends.efibootmgr.EfibootmgrController(disk_path, partition, edd, edd_device, force_gpt)#

An EfiController for Unix.

The current implementation delegates to the efibootmgr CLI.

Parameters
  • disk_path (Path) – Path to the disk containing the EFI System Partition, e.g. /dev/sda.

  • partition (int) – The partition number of the EFI System Partition.

  • edd (int) – The EDD version (1 or 3; -1 for autodetect).

  • edd_device (int) – The EDD 1.0 device number, usually 0x80.

  • force_gpt (bool) – If true, treat disks with invalid PMBR as GPT.

Methods

__init__

activate

Activate a boot entry.

create

Create a new boot entry on the EFI.

deactivate

Deactivate a boot entry.

delete

Delete a boot entry.

from_config

Create a controller from a config file.

get_state

Read the EFI variables.

is_compatible_with_host

True if this controller class is compatible with the host system.

set_bootnext

Set the bootnext field.

set_bootorder

Set the boot order.

set_timeout

Set the boot timeout.

unset_bootnext

Unset the bootnext field.

unset_bootorder

Unset the boot order.

unset_timeout

Unset the boot timeout.

Attributes

disk_path

Disk containing the ESP.

partition

The ESP partition number.

edd

EDD version (1 or 3, -1 for autodetect).

edd_device

EDD 1.0 device number, usually 0x80.

force_gpt

Treat disks with invalid PMBR as GPT.