Skip to content

Latest commit

 

History

History
51 lines (47 loc) · 1.74 KB

boot-process.md

File metadata and controls

51 lines (47 loc) · 1.74 KB

Boot process

The boot partition is an EFI System Partition. It contains EFI-bootable Unified Kernel Image (UKI) which combines into one EFI-bootable file containing:

This means we don't need traditional additional bootloader like Grub. The commandline instructs which checkout to use.

flowchart TD
    subgraph "Firmware"
        boot(Device boot) --> uefiboot
    uefiboot[Firmware bootloader
    UEFI]
    end
    subgraph "ESP"
        osbootloader(run:
    /EFI/BOOT/BOOTx64.efi
    UKI as EFI app)
        efistub(EFI Stub
    - outer interface: EFI
    - inner interface: Linux loader
    - passes embedded resources to Linux kernel)
        bootLinux(Boot Linux kernel)
        Initrd2[Initrd
    - mount root partition to /sysroot
    - mount checkout as / overlay based on cmdline]
    end
    subgraph "UKI (single-file)"
        kernel[Kernel + EFI stub] --> Resources(Embedded resources)
        Initrd(Initrd
        - 'early userspace'
        - knows how to find & mount root partition) --> Resources
        Cmdline --> Resources
    end
    uefiboot -->|Find ESP| osbootloader
    osbootloader --> efistub
    efistub --> bootLinux
    bootLinux --> Initrd2
    Initrd -.- Initrd2
    Initrd2 --> userspaceboot[Userspace boot]
    Resources -. contained in .-> osbootloader
Loading