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

grub/kernel/buildsys: Enable Boot Configuration usage #1980

Merged
merged 6 commits into from
Apr 11, 2022

Commits on Mar 29, 2022

  1. grub: Set private variable via search

    We currently carry a few patches to enable `search` by partition label
    and uuid, but don't include the `search` module.  This commit adds the
    module to enable this functionality in our grub config.
    
    This commit also adds an additional command to our grub configs.  The
    command uses the `search` module to set the `private` variable to the
    location of the `BOTTLEROCKET-PRIVATE` partition.  The `private`
    variable will be used to populate the grub menuentry that points to the
    bootconfig file.
    zmrow committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    1b1596d View commit details
    Browse the repository at this point in the history
  2. kernel-5.10: Add CONFIG_BOOT_CONFIG

    Adds `CONFIG_BOOT_CONFIG` to the kernel 5.10 config which enables the
    use of the "Boot config" mechanism.  This allows a user to pass a
    configuration file attached to the end of the initrd which is used to
    extend the kernel command line at runtime.
    zmrow committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    a4c9014 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2022

  1. buildsys: Add grub-features property to variant config

    This change adds a `grub-features` property to the supported configuration
    that can be set in a variant's `Cargo.toml`.  This property is meant to gate
    certain features of grub and it's config to variants that support it.  Since
    grub isn't updated during OS update, it's important to ensure that variants
    which are known to support a certain grub feature receive the proper grub
    config.
    
    Currently, the only supported parameter is `set-private-var`.  This
    parameter means the variant has a grub config that understands how to search
    for and find the BOTTLEROCKET_PRIVATE partition, and set the corresponding
    `$private` variable.
    zmrow committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    a29eb82 View commit details
    Browse the repository at this point in the history
  2. rpm2img: Conditionally add bootconfig parameters to grub menuentry

    This change conditionally adds the `bootconfig` parameter to the kernel
    command line if `set-private-var` is added to a variants
    `grub-features`.  The `bootconfig` parameter signals the kernel to look
    for the Boot Configuration at the end of the specified initrd.  This
    change also adds the corresponding initrd entry to the grub menuentry
    which points at the bootconfig file on the `BOTTLEROCKET-PRIVATE`
    partition.  Bottlerocket technically doesn't use an initrd, so this
    initrd will only contain Boot Configuration data.  If the file doesn't
    contain Boot Config data, the kernel logs a message but does not fail to
    boot.
    
    An empty `bootconfig.data` file is created and added to the
    `BOTTLEROCKET_PRIVATE` partition to keep grub from pausing and printing
    an error that the file doesn't exist.
    zmrow committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    14f1dd8 View commit details
    Browse the repository at this point in the history
  3. rpm2img: Reorganize kernel/init command line parameters

    This change organizes the kernel and init command line parameters and
    moves the init parameters to the section after the "--" where they
    belong.
    zmrow committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    9fe1715 View commit details
    Browse the repository at this point in the history
  4. variants: Add set-private-var to grub-features for metal variants

    This change adds the `set-private-var` parameter to new `grub-features`
    section of the variant config for all metal variants.
    zmrow committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    b256df1 View commit details
    Browse the repository at this point in the history