From 2a2097016aa29f13e7827f7928cf4135bd7c4ea8 Mon Sep 17 00:00:00 2001 From: Leandro Lisboa Penz Date: Wed, 12 Feb 2020 21:45:53 +0000 Subject: [PATCH] Use mkdosfs -I to be able to write to /dev/loop* From mkdosfs' manual: "It is typical for fixed disk devices to be partitioned so, by default, you are not permitted to create a filesystem across the entire device. mkfs.fat will complain and tell you that it refuses to work." On some systems, mkdosfs identifies the loop device is an entire disk. The -I flag makes mkdosfs work properly on such systems. --- export-image/prerun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 8bbc566..21652f6 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -50,7 +50,7 @@ for FEATURE in metadata_csum 64bit; do ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES" fi done -mkdosfs -n boot -F 32 -v "$BOOT_DEV" > /dev/null +mkdosfs -I -n boot -F 32 -v "$BOOT_DEV" > /dev/null mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4