increase ESP partition for compatibility #129
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the ESP partition is 256MB and the disk is using 4K sector size, mkfs.fat will prompt:
Based on the implementation, the data area (i.e., without FAT32 header, reserved sectors and alignments/offset) should be larger than 65525 sectors. Therefore, 256MB is not enough for disks using 4K sector size.
Use
truncate -s $((65696*4096)) part.bin; mkfs.fat -F 32 -S 4096 -v part.binto verify if the sector number is enough. By giving different FAT settings, the necessary size might by changed.For better compatibility and increasing 4MB doesn't consume a lot of disk space, it'd be good to have a bigger ESP partition.
Reference:
[1] mkfs.fat - https://github.com/dosfstools/dosfstools/blob/master/src/mkfs.fat.c
[2] https://superuser.com/questions/1702331/what-is-the-minimum-size-of-a-4k-native-partition-when-formatted-with-fat32