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

Label BOTTLEROCKET-DATA at runtime #2807

Merged
merged 3 commits into from
Mar 8, 2023

Commits on Mar 8, 2023

  1. release, rpm2img, partyplanner: label BOTTLEROCKET-DATA during firstboot

    Changes partitioning to always keep a data partition on the os image.
    We grow and label data partition at runtime. We will still create a
    separate data partiion on the second volume/disk for "split" partition
    layouts.
    
    We add two new services that run as part of 'local-fs.target' and
    before 'local.mount' and 'repart-local.service':
      * 'label-data-a.service'
      * 'label-data-b.service'
    
    'label-data-a' and 'label-data-b' will "compete" and both try to
    label 'BOTTLEROCKET-DATA' first with the partition they're each waiting
    for.
    
    'label-data-a' waits for the data partition that resides on the OS disk
    image. Once that device is ready, we call 'systemd-repart' to relabel it
    as 'BOTTLEROCKET-DATA' and grow it as much as possible.
    
    'label-data-b' calls 'systemd-repart' to label the data partition on
    the data image as 'BOTTLEROCKET-DATA' and grow the partition to fill the
    remainder of the disk.
    
    All of this lets the host to boot if data partition on the data image
    doesn't exist and the root filesystem disk has leftover extra space to
    accommodate a reasonably-sized back-up data partition.
    etungsten committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    6a370b6 View commit details
    Browse the repository at this point in the history
  2. signpost: mark if boot has succeeded before, add subcommand for checking

    'mark-successful-boot' now also updates BOTTLEROCKET_PRIVATE's GPT table
    attribute to indicate whether boot has ever succeeded before.
    
    Add a new 'has-boot-ever-succeeded' subcommand for checking if boot has
    ever succeeded before
    etungsten committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    b13cab0 View commit details
    Browse the repository at this point in the history
  3. release,os: ensure data partition label/resize services only run once

    This adds additional safeguards to prevent a different data partition
    from being labeled and resized if the host has ever booted successfully
    in the past with an original data partition.
    etungsten committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    1ccd37c View commit details
    Browse the repository at this point in the history