On Fri, 9 Dec 2022 at 16:40, Henning Schild wrote: > > It all looks like we want to revert the systemd-growfs patch and go > back to using plain tools for each partition type. So i looked at this > again and will likely propose another round, keeping the author but > changing it quite a bit. > > Am Fri, 22 Oct 2021 15:50:47 -0400 > schrieb Joe MacDonald : > > > resize2fs fails if the build sets the root filesystem for an image to > > btrfs though the partition is expanded properly. Since the rest of the > > script works as intended, simply checking the last partition type with > > lsblk and adding `btrfs resize` instead of `resize2fs` in the > > appropriate circumstance allows everything to function as expected. > > It it not about "rootfs" it is about the last partition. This is the code you need to integrate btrfs filesystem case $(lsblk -fno FSTYPE "${LAST_PART}") in ext4) resize2fs "${LAST_PART}" ;; btrfs) mkdir -p /tmp/btrfs mount "${LAST_PART}" /tmp/btrfs btrfs filesystem resize max /tmp/btrfs umount /tmp/btrfs && rmdir /tmp/btrfs ;; esac In attachment the patch against the current next branch. It has been sent by elastic mail but went in moderation, as usual. Best regards, R-