disk_util: use FAT32 on ESP

mkfs.vfat was defaulting to FAT16 based on the size of the partition.
The UEFI spec (2.7 errata A, section 13.3) implies that only FAT32 is
necessarily supported on the ESP, and we've received a report of
hardware that doesn't recognize FAT16.
This commit is contained in:
Benjamin Gilbert 2017-11-13 11:25:04 -08:00
parent 3f195c7ce1
commit 7f058d61a1

View File

@ -423,6 +423,9 @@ def FormatFat(part, device):
cmd = ['mkfs.vfat'] cmd = ['mkfs.vfat']
if 'fs_label' in part: if 'fs_label' in part:
cmd += ['-n', part['fs_label']] cmd += ['-n', part['fs_label']]
if part['type'] == 'efi':
# ESP is FAT32 irrespective of size
cmd += ['-F', '32']
Sudo(cmd + [device, vfat_blocks], stdout_null=True) Sudo(cmd + [device, vfat_blocks], stdout_null=True)