Skip to content

Commit

Permalink
Ignition tweaks to work with composefs
Browse files Browse the repository at this point in the history
I'm currently working on composefs use in ostree:
 ostreedev/ostree#2640

I'm running into issues with ignition when testing it.
Several places look at /sysroot and try to find the backing
filesystem for it. This works because /sysroot is typically a
bind-mount of some deploy directory in the real sysroot.
However, in the composefs case, /sysroot is a composefs mount
and doesn't have a real backing block device.

This change switches these cases to look at /sysroot/sysroot instead.
This is the actual real sysroot after ostree-prepare-root did its
work (and before pivot-rooting into it).
  • Loading branch information
alexlarsson committed Apr 27, 2023
1 parent 650d2c9 commit 1f28c2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rm -vrf ${initramfs_firstboot_network_dir}
# append rootmap kargs to the BLS configs.
root=$(karg root)
if [ -z "${root}" ]; then
rdcore rootmap /sysroot --boot-mount ${bootmnt}
rdcore rootmap /sysroot/sysroot --boot-mount ${bootmnt}
fi

# This does a few things:
Expand All @@ -42,4 +42,4 @@ fi
# 3. it create a .root_uuid stamp file on the bootfs or fails if one exists
# 4. it adds GRUB bootuuid.cfg dropins so that GRUB selects the boot filesystem
# by UUID
rdcore bind-boot /sysroot ${bootmnt}
rdcore bind-boot /sysroot/sysroot ${bootmnt}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
# See also ignition-ostree-check-rootfs-size.service
# https://github.com/coreos/fedora-coreos-tracker/issues/586#issuecomment-777220000

srcdev=$(findmnt -nvr -o SOURCE /sysroot | tail -n1)
srcdev=$(findmnt -nvr -o SOURCE /sysroot/sysroot | tail -n1)
size=$(lsblk --nodeps --noheadings --bytes -o SIZE "${srcdev}")

MINIMUM_GB=8
Expand Down

0 comments on commit 1f28c2d

Please sign in to comment.