Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit 7f058d6

Browse files
committed
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.
1 parent 3f195c7 commit 7f058d6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

build_library/disk_util

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ def FormatFat(part, device):
423423
cmd = ['mkfs.vfat']
424424
if 'fs_label' in part:
425425
cmd += ['-n', part['fs_label']]
426+
if part['type'] == 'efi':
427+
# ESP is FAT32 irrespective of size
428+
cmd += ['-F', '32']
426429
Sudo(cmd + [device, vfat_blocks], stdout_null=True)
427430

428431

0 commit comments

Comments
 (0)