Skip to content

Commit

Permalink
overlay: Ignition tweaks to work with composefs
Browse files Browse the repository at this point in the history
This is to enable ostree+composefs:
ostreedev/ostree#2867

When we care about the *physical* backing filesystem, we need to
look at /sysroot/sysroot (which in the real root is `/sysroot`)
because now `/sysroot` (aka `/` in the real root) is a composefs
(really an `overlayfs` with a transient loop-mounted erofs), which
is distinct from the physical root.

Co-authored-by: Colin Walters <[email protected]>
  • Loading branch information
alexlarsson and cgwalters committed Jun 2, 2023
1 parent 0673c81 commit eadd4c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ rm -vrf ${initramfs_firstboot_network_dir}
root=$(karg root)
if [ -z "${root}" ]; then
rdcore rootmap /sysroot --boot-mount ${bootmnt}
echo "Prepared rootmap"
fi

# This does a few things:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ 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)
# /sysroot is the mounted deploy root, /sysroot/sysroot is the physical root filesystem
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 eadd4c8

Please sign in to comment.