Let's install btrfs tools instead. Since btrfs supports snapshot and multi-subvolume. It's more handy to use when installing many versions of OS.
Refer to ~/lkp-tests/bin/rsync-rootfs
if has_cmd mkfs.btrfs; then
mkfs.btrfs -f $rootfs_partition
mount $rootfs_partition $ROOTFS_DIR
else
has_cmd mkfs.ext4 && {
mkfs.ext4 -F $rootfs_partition
if/else不对称, 导致多了一层缩进。
Thanks, Fengguang
mount $rootfs_partition $ROOTFS_DIR
}
} mkdir -p $ROOTFS_DIR/tmp CACHE_DIR=$ROOTFS_DIR/tmpfi
-- 2.23.0