Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysroot: Support boot counting for boot entries #3310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 30, 2024

  1. sysroot: Support boot counting for boot entries

    Add support for boot counting for bootloader entries [1].
    The boot counting data is stored in the name of the boot loader entry.
    A boot loader entry file name may contain a plus (+) followed by a number.
    This may optionally be followed by a minus (-) followed by a second number.
    The dot (.) and file name suffix (conf or efi) must immediately follow.
    
    All "pending" entries (in the middle of boot counting) are automatically
    removed during creation of new boot entries for new deployments.
    
    The feature is enabled via sysroot configuration:
    [sysroot]
    boot_counting=3
    
    Testing:
    $ ostree admin deploy 91fc19319be9e79d07159303dff125f40f10e5c25614630dcbed23d95e36f907
    Copying /etc changes: 2 modified, 3 removed, 4 added
    bootfs is sufficient for calculated new size: 0 bytes
    Transaction complete; bootconfig swap: yes; bootversion: boot.0.1, deployment count change: 1
    
    $ ls /boot/loader/entries
    ostree-1+3.conf  ostree-2+3.conf
    
    [1] https://uapi-group.org/specifications/specs/boot_loader_specification/#boot-counting
    Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
    igoropaniuk committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    57e988e View commit details
    Browse the repository at this point in the history