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

Evaluate the @root volume name also for btrfs #2324

Merged
merged 12 commits into from
Jul 31, 2023

Commits on Jul 26, 2023

  1. Evaluate the @root volume name also for btrfs

    In a volume setup the special volume declaration
    <volume name="@root=identifier"/> was only evaluated for the
    LVM volume manager. In case of btrfs a hardcoded root volume
    name '@' was used. This commit allows to specify a custom
    name for the root volume for btrfs as well and also allows
    to specify that there should be no such root volume.
    Example:
    
        <volume name="@root=@"/>
    
    Name the root volume '@'. If not specified this stays as
    the default to stay compatible
    
        <volume name="@root=/"/>
    
    Indicate no root volume is wanted. All subvolumes resides
    below root (/)
    
        <volume name="@root=foo"/>
    
    Name the root volume 'foo'
    
    This is related to Issue #2316 and a first patch to
    address the requested changes
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    12d6918 View commit details
    Browse the repository at this point in the history
  2. Add btrfs_create_toplevel_subvolume attribute

    Allow to explicitly select if a toplevel subvolume should
    be created or not. To avoid a behavior change, kiwi will
    create a toplevel based btrfs structure if this attribute
    is not specified. However, a deprecation message to inform
    about future behavior change will be printed. This is
    related to Issue #2316
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    1844e80 View commit details
    Browse the repository at this point in the history
  3. Add parent attribute to volume setup

    For the btrfs volume management, allow to put a volume into a specific
    parent volume. If not specified the volume is below the default volume
    This Fixes #2316
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    cc2ba15 View commit details
    Browse the repository at this point in the history
  4. Use btrfs for fedora/test-image-live-disk test

    Change the Virtual profile to build a btrfs based image
    for testing respective btrfs layouts
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    1c49815 View commit details
    Browse the repository at this point in the history
  5. Fixed apply_attributes_on_volume

    Make the function call more robust in terms of path separation
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    8b39909 View commit details
    Browse the repository at this point in the history
  6. Use bootpartition for Fedora integration test

    When using btrfs with the proposed layout for testing the
    delivered grub bios module for the Fedora system used to build
    the integration test (FC37) is not capable to find the grub
    config file. A manual call for configfile in the grub shell
    fixes this with the existing kiwi created grub early-boot
    script. However, it is expected that the delivered grub image
    works and kiwi only creates its own one if no distro delivered
    grub image was found. To make the integration test functional
    for both BIOS and EFI the simple solution is to use an extra
    not btrfs based boot partition. This still allows to test
    the desired btrfs layout in terms of volumes and sub-volumes
    and does not break on any of the boot methods.
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    6d40c6f View commit details
    Browse the repository at this point in the history
  7. Fix fallback secure boot setup

    Don't copy the same file. This case happens when rebuilding
    an image using --allow-existing-root when the fallback setup
    has done its job already in the first run
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    f97b47e View commit details
    Browse the repository at this point in the history
  8. Take subvol mount option for root into account

    If the rootfs is btrfs based make sure the fstab entry for
    it takes the name of the root subvolume into account
    schaefi committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    f8f1c00 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. add btrfs_set_default_volume attribute

    By default kiwi runs btrfs set-default on the volume that is
    considered the default volume according to the btrfs settings
    and defaults. btrfs_set_default_volume="false" allows
    to deactivate this action. Along with the change also the
    misleading name of the btrfs_create_toplevel_subvolume has
    been changed to root_is_subvolume
    schaefi committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    a31ef6a View commit details
    Browse the repository at this point in the history
  2. update Fedora integration test

    The setting of a default volume is unwanted here
    schaefi committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    48149ce View commit details
    Browse the repository at this point in the history
  3. Make sure btrfs root volume is used when needed

    With the possibility to switch off setting the default volume
    an issue at other parts in the kiwi code which mounted the
    btrfs based system were uncovered. Without any default volume
    set it's required to transport the root volume if different
    from / and pass the respective subvol= option to the mount.
    This commit fixes it at the places where kiwi trusted btrfs
    to have a correct default volume set
    schaefi committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    dd110f6 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2023

  1. Pass rootflags if no default volume is set

    In case of btrfs and if btrfs_set_default_volume is explicitly
    switched off, we create the correct rootflags= kernel cmdline
    entry to tell the system about the root volume for booting
    schaefi committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    fcf6b6e View commit details
    Browse the repository at this point in the history