-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase the minimum EFI System Partition (ESP) size to 500MiB #4711
Conversation
/kickstart-test --testtype smoke |
These unit tests all expect the size to be 200, like Kickstart tests succeeded, so this should work in reality. |
Aha, I wasn't sure if those were defining the size or testing. Fixed, thanks. |
I just let the tests run again, but... I'll note that you bumped the default for normal platforms and the 3 tests for that, and also the one mac_efi test but not the actual value for that platform... ;-) But we're getting there! Thank you! |
I can write a release note later, if you want to skip that part... If not, see docs/release-notes/template.rst |
Do we also want the |
I can't answer this without guessing. But if I were to go for that guess - there's no updates, so there's no use for the space, and it's sufficient as of now, so let's keep it as-is. |
Ack, okay. Fixed. |
/kickstart-test --testtype smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, thank you!
The release note text could use some more work, I'd suggest something like this:
The size of the EFI System Partition (ESP) created by Anaconda has changed from 200 MiB to 500 MiB.
The reasons for this change include:
- This partition is used to deploy firmware updates. These updates need free space of twice the SPI flash size, which will grow from 64 to 128 MiB in near future and make the current partition size too small.
- The larger space enables future changes to how the bootloader is deployed on Fedora.
- The new minimum is identical with what Microsoft mandates OEMs allocate for the partition.
I'd also suggest "Bootloader" for the Type at top. This applies to all installations, not just kickstart.
Feel free to leave cleaning that for us though...
@@ -224,7 +224,7 @@ def _bootloader_partition(self): | |||
return PartSpec( | |||
mountpoint="/boot/efi", | |||
fstype="efi", | |||
size=Size("200MiB"), | |||
size=Size("500MiB"), | |||
max_size=Size("600MiB"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the default bumped all the way to 500, keeping 600 for the maximum is not really facilitating much enlargement. IOW should max_size also be increased, perhaps to 1GiB ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@berrange I was struggling to think what we would do with more than 600GB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, /boot is already 1 GB and that's primary to cope with multiple big kernels. If we expect those kernels to all turn into UKIs, then that would seem to justify having 1 GB for ESP too, or at the very least raising the ceiling to all people to opt-in to much larger ESP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed, I've modified the patch to allow scaling up to 2GiB now.
I would prefer if this would grow even larger. We already know that gfx driver people want to include their drivers in initrds in a future no so far away, and that means 100mb+ in an initrd. if you stick to 500M this is going to require a bumping very soon again I am sure. And it's really hard retroactviely growing the ESP. (see here for a discussion about that: https://mastodon.social/@karolherbst@chaos.social/110066943704825190) I'd really be more aggressive here. i.e. on a large disk go for 2g at least, and on the tiniest of systems I'd still go for 800m or so. (if tech savvy people really want to go smaller, allow them via some form of override, sure, but by default i would never go below 800M, so you have some room for the coming years) |
(and it's not just that some drivers will grow to 100M+ but that we want to go for a future with pre-build kernels, and that likely means shipping multiple of them in the ESP at the same time, even on systems that don't need them.) |
This well-respected page from 2015 suggests 550M as a minimum btw: https://www.rodsbooks.com/linux-uefi/ ArchLinux recommends 512M minimum https://wiki.archlinux.org/title/EFI_system_partition (and that's a pretty old recommendation too) debian also defaults to 500M since a longer time. I think in 2023 we shouldn't really default to a default that 8 years ago seemed appropriate, in particular with the clear perspective pre-built UKIs and graphics drivers in the initrd will boost our disk space needs in future. |
I think a lot of people working on UKIs would agree, and that can certainly be a future change -- but this hopefully non-controversial change is about aligning the value as used by Microsoft and to fix future firmware updates. Your suggested 2GB is going to be a significant percentage of space on IoT devices and needs much more careful consideration -- for instance deleting the /boot and expanding /boot/efi when we do the switch to UKIs, or maybe defaulting to the larger "maximum" value when the target disk is much larger. That's deliberately not covered in this proposal, although I have changed the maximum size to 2GiB to be helpful. |
I've modified it to your text, thanks. |
Well so far the only controversy your proposal triggered was that people (such as me) saying you are not bold enough, and go higher. I think the noise in the other direction was rather muted, no? |
You're completely free to submit another PR and Fedora Change Proposal which supersedes this one. I'm changing the default by 300MB for two easy to justify reasons, you're proposing changing it by 1800 for a different reason entirely. |
If there's a Fedora Change associated with this, I'd love to see it mentioned in the commit message as well as release note links :-) |
/kickstart-test --testtype smoke |
It's here: https://fedoraproject.org/wiki/Changes/BiggerESP Maybe don't link to it just yet as we're figuring out if it's a self contained change or a systemwide change. |
Arch recommends 300 MiB which matches what, AFAIK, Windows Setup creates on 4Kn drives. 512 MiB is only recommended for "early and/or buggy UEFI implementations". And for systems with that will have multiple kernel packages installed, the Arch recommendation is at least 1 GiB. |
Hi thanks for this contribution. I see two things we should resolve before merging this. Give it visibility for a few people (I'll ping them) and have the change accepted by FESCO (it is not right now). Also @hughsie if you can, please add the change link to the Release notes. Hi @jstodola @frozencemetery, are you fine with this change? |
Blocked until we have ACKs from all the parties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Currently the default allocated space for the EFI System Partition (ESP) is a minimum of 200 MiB and a maximum of 600MiB. This smaller size is more than enough for storing the EFI binaries just needed to boot the machine. The ESP is also used to deploy firmware updates which need 2x SPI flash size (typically 64MB, soon 128MB) as free space. We're also soon going to modernize how the bootloader is deployed, and this also is going to need more space again. Microsoft mandates OEMs to allocate a minimum of 500MiB and so I think we should just do the same. Also increase the maximum size to 2GiB to accommodate future UKIs. Signed-off-by: Richard Hughes <richard@hughsie.com>
Done. |
Yes, bootloader folks are fine with it. Thanks for checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me.
/kickstart-test --testtype smoke |
Hello @hughsie, do you have any idea when this will be revisited, roughly? I don't want to miss that just because the final commitment happens elsewhere than this PR... |
This was approved as a fedora feature. I think it's good to go now, actually. |
Now we're looking into this for https://bugzilla.redhat.com/show_bug.cgi?id=2212121 , one thing that worries me: did we consider the impact of the large increase in max size on cases like live images? i.e. deliverables which are built through anaconda? Presumably we don't want those to have 2G ESPs, but maybe now they will? I haven't checked, but it seems like a concern. |
So, the first compose we got through with this change shows two failures in openQA tests that are probably related to it (and a third, but that one probably just needs adjustments to the test to handle the larger ESP). I didn't dig into them yet as it's the weekend, but if anyone else wants to, feel free. anaconda logs and journal are on the assets tab:
|
I've filed the various issues openQA ran into after this change and marked them as blocking the Change bug tracker:
For now we have worked around the aarch64 image size issue by simply increasing the image sizes, on the assumption that we really do want the ESP on those images to be 2G in size; if we don't, we'll have to make more adjustments somewhere. I will probably fiddle with the openQA stuff to work around the other two bugs so those tests don't fail every day, but the underlying issues do still need to be looked at. |
Currently the default allocated space for the EFI System Partition (ESP) is a minimum of 200 MiB and a maximum of 600MiB. This smaller size is more than enough for storing the EFI binaries just needed to boot the machine.
The ESP is also used to deploy firmware updates which need 2x SPI flash size (typically 64MB, soon 128MB) as free space. We're also soon going to modernize how the bootloader is deployed, and this also is going to need more space again.
Microsoft mandates OEMs to allocate a minimum of 500MiB and so I think we should just do the same.