I have an initramfs script that moves the root filesystem to btrfs subvolume on first boot. This breaks the expand-last-partition.sh script for the oddest reason:
line 4: findmnt / -o source -n
normally this line outputs something like: /dev/name,
but when on a btrfs subvolume, it outputs: /dev/name[@subvol]
This leads to the error: "Boot device equals root device - no partitioning found"
not exactly sure why, as I didn't dissect every line. I found that changing the command in line 4 to: findmnt / -o sources -n
fixed the problem... I tried this after I noticed running findmnt / --output-all, the device name alone was listed under SOURCES, where SOURCE had the subvol appended.
maybe we could add a sed expression to trim past the device name? i.e.
findmnt / -o source -n | sed 's, [\[.*]*,,'
thoughts?
thanks,
Stephen