increase ESP partition for compatibility#129
Open
tsunghanliu wants to merge 1 commit intocanonical:classicfrom
Open
increase ESP partition for compatibility#129tsunghanliu wants to merge 1 commit intocanonical:classicfrom
tsunghanliu wants to merge 1 commit intocanonical:classicfrom
Conversation
Member
There was a problem hiding this comment.
To allow upgrades of gadget in older images, you could do:
min-size: 256M
size: 260M
This will specify a valid range of sizes for upgrades, but new images will use the size field.
Author
There was a problem hiding this comment.
Thanks Alfonso! I've updated the commit.
When the ESP partition is 256MB and the disk is using 4K sector size, mkfs.fat will prompt: > WARNING: Number of clusters for 32 bit FAT is less than suggested minimum. 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.bin` to 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 Signed-off-by: Robert Liu <robert.liu@canonical.com>
481e251 to
65d4894
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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