Skip to main content

find_kernel

Function find_kernel 

Source
pub(crate) fn find_kernel(
    root: &Dir,
    uki_addon_opts: Option<&UkiAddonOpts>,
) -> Result<Option<KernelInternal>>
Expand description

Find the kernel in a container image root directory.

This function first attempts to find a UKI in /boot/EFI/Linux/*.efi. If that doesn’t exist, it falls back to looking for a traditional kernel layout with /usr/lib/modules/<version>/vmlinuz. Modern aboot payloads are detected in /boot/aboot-<version>.img and cannot coexist with either.

Returns None if no kernel is found.