kiwi-el8/kiwi/bootloader/config/custom.py
Marcus Schäfer 54454d1b8f
Add UKI support for the grub bootloader
In addition to systemd_boot also add support for UKI creation
when grub is used. This includes the creation of a UKI image
via dracut in the same way as it's done for systemd_boot.
In addition an earlyboot grub script chainloads the UKI and
bypasses any written grub configuration. In Theory this should
also allow to use the shim loader for chainloading an UKI.
However I haven't done testing in this direction and I also
expect security issues with this approach because loading
any non signed data by shim is not expected to work. A new
profile named grub_uki_verity_erofs has been added to the
integration test that experiments with UKIs
2025-05-19 19:21:56 +02:00

67 lines
2.1 KiB
Python

# Copyright (c) 2024 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi.
#
# kiwi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi. If not, see <http://www.gnu.org/licenses/>
#
from typing import Dict
# project
from kiwi.system.identifier import SystemIdentifier
from kiwi.bootloader.config.base import BootLoaderConfigBase
class BootLoaderConfigCustom(BootLoaderConfigBase):
"""
**custom bootloader configuration.**
"""
def setup_disk_boot_images(
self, boot_uuid, efi_uuid=None, lookup_path=None
) -> None:
raise NotImplementedError
def setup_disk_image_config(
self, boot_uuid: str = '', root_uuid: str = '', hypervisor: str = '',
kernel: str = '', initrd: str = '', boot_options: Dict[str, str] = {}
) -> None:
raise NotImplementedError
def setup_install_boot_images(
self, mbrid: SystemIdentifier, lookup_path: str = ''
) -> None:
raise NotImplementedError
def setup_install_image_config(
self, mbrid: SystemIdentifier, hypervisor: str = '',
kernel: str = '', initrd: str = ''
) -> None:
raise NotImplementedError
def setup_live_boot_images(
self, mbrid: SystemIdentifier, lookup_path: str = ''
) -> None:
raise NotImplementedError
def setup_live_image_config(
self, mbrid: SystemIdentifier, hypervisor: str = '',
kernel: str = '', initrd: str = ''
) -> None:
raise NotImplementedError
def setup_sysconfig_bootloader(self) -> None:
raise NotImplementedError
def write(self) -> None:
raise NotImplementedError