Check ESP size in bytes not sectors - #953
Open
ryonakano wants to merge 7 commits into
Open
Conversation
vjr
approved these changes
Sep 7, 2026
vjr
left a comment
Member
There was a problem hiding this comment.
I'm unable to test at the moment but code does LGTM so this can be merged.
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.
Fixes #448
Fixes #620
Fixes #952
(partly fixes these issues in the scope of GUI)
Closes #621
Closes #911
(continuation of these PRs)
Changes Summary
This PR fixes an ESP partition in 256 MiB is warned as "EFI partition is too small" when 4k sector size. Note that this PR does NOT fix installation fails with that partition setup / sector size; see "Notes" below.
Before
There is an alert icon in the partition bar and hovering on it shows "EFI partition is too small" tooltip.
After
The alert icon is not shown.
How to Test This
debuild -us -ucon your host computeropenssh-serveron the VMio.elementary.installer-session_8.1.3_all.debandio.elementary.installer_8.1.3_amd64.deb) to the VMsudo apt install ./*.debChanges Per File
We already store sector size in
InstallerDaemon.Diskso what we need to do is to pass it to where we compare ESP size inPartitioningView.set_mount ().InstallerDaemon.Mountto keep consistency withInstaller.MountPartitioningView524288= 256 MiB in sectors, but this assumes 512 sector size256 * 1024 * 1024= 256 MiB in bytes, sector size independentInstallerDaemon.DisktoPartitionMenu(step 1)Installer.MountInstaller.MounttoInstallerDaemon.Mountto keep consistency withInstaller.Mountget_partition_size_in_sectors ()returns 65535 instead of 65536 whenpartition.end_sector= 65791 andpartition.start_sector= 256, resulting 65535 sectors * 4096 sector size / 1024 / 1024 = 255.99609375 < 256 MiBPartitioningViewtoInstaller.Mount(step 2)Notes
Custom installation with this branch still fails with the following error:
Details
This is because Distinst assumes 512 sector size as reported at pop-os/distinst#177. That's out of scope of this PR and you can use a workaround to make sure the ESP partition size is larger than 2048 MiB (= 524288 sectors when 4096 sector size).