kiwi.bootloader.install Package

Submodules

kiwi.bootloader.install.base Module

class kiwi.bootloader.install.base.BootLoaderInstallBase(xml_state, root_dir, device_provider, custom_args=None)[source]

Bases: object

Base class for bootloader installation on device

Parameters:
  • root_dir (string) – root directory path name

  • device_provider (object) – instance of DeviceProvider

  • custom_args (dict) – custom arguments dictionary

install()[source]

Install bootloader on self.device

Implementation in specialized bootloader install class required

install_required()[source]

Check if bootloader needs to be installed

Implementation in specialized bootloader install class required

post_init(custom_args)[source]

Post initialization method

Store custom arguments by default

Parameters:

custom_args (dict) – custom bootloader arguments

secure_boot_install()[source]

Run shim-install in self.device for secure boots

Implementation in specialized bootloader install class required

kiwi.bootloader.install.grub2 Module

class kiwi.bootloader.install.grub2.BootLoaderInstallGrub2(xml_state, root_dir, device_provider, custom_args=None)[source]

Bases: BootLoaderInstallBase

grub2 bootloader installation

install()[source]

Install bootloader on disk device

install_required()[source]

Check if grub2 has to be installed

Take architecture and firmware setup into account to check if bootloader code in a boot record is required

Returns:

True or False

Return type:

bool

post_init(custom_args)[source]

grub2 post initialization method

Parameters:

custom_args (dict) –

Contains custom grub2 bootloader arguments

{
    'target_removable': bool,
    'system_volumes': list_of_volumes,
    'system_root_volume': root volume name if required
    'firmware': FirmWare_instance,
    'efi_device': string,
    'boot_device': string,
    'root_device': string
}

secure_boot_install()[source]

Run shim-install in self.device for secure boots

Implementation in specialized bootloader install class required

set_disk_password(password: str)[source]

kiwi.bootloader.install.systemd_boot Module

class kiwi.bootloader.install.systemd_boot.BootLoaderInstallSystemdBoot(xml_state, root_dir, device_provider, custom_args=None)[source]

Bases: BootLoaderInstallBase

systemd-boot bootloader installation

install_required()[source]

Check if systemd-boot needs to install boot code

systemd-boot supports EFI boot only and does not need to install boot code since it’s expected that the firmware can read from the EFI partition

Returns:

True or False

Return type:

bool

post_init(custom_args: Dict)[source]

systemd-boot post initialization method

Parameters:

custom_args (dict) – Contains custom systemd-boot bootloader arguments

secure_boot_install()[source]

Run shim installation for secure boot setup

For systemd-boot this is currently skipped since details for secure boot are not yet clear

kiwi.bootloader.install.zipl Module

class kiwi.bootloader.install.zipl.BootLoaderInstallZipl(xml_state, root_dir, device_provider, custom_args=None)[source]

Bases: BootLoaderInstallBase

zipl bootloader installation

install_required() bool[source]

Check if zipl needs to install boot code

zipl requires boot code installation, but it is done as part of the BLS implementation in bootloader/config/zipl.py Thus this method always returns: False

Returns:

False

Return type:

bool

post_init(custom_args: Dict)[source]

zipl post initialization method

Parameters:

custom_args (dict) – unused

secure_boot_install()[source]

Run shim installation for secure boot setup

For zipl this is skipped since details for secure boot are not yet clear.

Module Contents

class kiwi.bootloader.install.BootLoaderInstall[source]

Bases: object

BootLoaderInstall Factory

Parameters:
  • name (string) – bootloader name

  • root_dir (string) – root directory path name

  • device_provider (object) – instance of DeviceProvider

  • custom_args (dict) – custom arguments dictionary

static new(name: str, xml_state: XMLState, root_dir: str, device_provider: object, custom_args: Dict | None = None)[source]