disk_util: Add -I for mkfs.vfat

When loop device partition nodes aren't cleaned up, building images
will fail with:

mkfs.vfat: Partitions or virtual mappings on device '/dev/loop0', not making filesystem (use -I to override)

Just add the flag unconditionally to work around it.
This commit is contained in:
David Michael 2019-02-10 02:44:01 +00:00
parent 62665ebcea
commit 4bd4cd5a8e

View File

@ -420,7 +420,7 @@ def FormatFat(part, device):
vfat_block_size = 1024 vfat_block_size = 1024
vfat_blocks = part['bytes'] // vfat_block_size vfat_blocks = part['bytes'] // vfat_block_size
cmd = ['mkfs.vfat'] cmd = ['mkfs.vfat', '-I']
if 'fs_label' in part: if 'fs_label' in part:
cmd += ['-n', part['fs_label']] cmd += ['-n', part['fs_label']]
if part['type'] == 'efi': if part['type'] == 'efi':