From 2669d0ce637ffd1b6112bbb328368cf4f07debc3 Mon Sep 17 00:00:00 2001 From: Anthony ARNAUD Date: Tue, 16 Jan 2024 16:54:50 -0500 Subject: [PATCH] fix: efi fat32 compatibility with nvme 4KBn sector size For Advanced Format 4K Native drives (4-KB-per-sector) drives, the minimum size is 260 MB, due to a limitation of the FAT32 file format Signed-off-by: Anthony ARNAUD --- internal/pkg/partition/constants.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/pkg/partition/constants.go b/internal/pkg/partition/constants.go index 5345371819..b40a9caebc 100644 --- a/internal/pkg/partition/constants.go +++ b/internal/pkg/partition/constants.go @@ -30,7 +30,9 @@ const ( const ( MiB = 1024 * 1024 - EFISize = 100 * MiB + // The actual minimum size is 65595 × 4 KB(NVME sector size) + // = 268677120 bytes = 256.23046875 MB. + EFISize = 260 * MiB BIOSGrubSize = 1 * MiB BootSize = 1000 * MiB // EFIUKISize is the size of the EFI partition when UKI is enabled.