EfiState#

class efiboot.EfiState(bootcurrent, bootnext, bootorder, timeout, labels, active)#

A view of the EFI variables.

Parameters
  • bootcurrent (Optional[int]) – The ID of the currently booted entry, if known.

  • bootnext (Optional[int]) – The ID of the boot entry to use for the next reboot, if known.

  • bootorder (List[int]) – The current boot order as a list of IDs. This may not contain all boot entries, and may be the empty list if not known.

  • timeout (Optional[int]) – The boot timeout, if known.

  • labels (Dict[int, str]) – A mapping from boot ID to label. Some boot entries may be lacking labels.

  • active (Set[int]) – The boot entries that are marked as active, if known.

Methods

__init__

entries

Returns an iterator over boot entry IDs.

find

Find all boot entries with the given label.

Attributes

bootcurrent

The most recently booted entry.

bootnext

Boot entry to be used on the next reboot.

bootorder

The boot order.

timeout

The timeout set on the EFI boot process.

labels

The boot entry labels.

active

The active boot entries.