Bug 1907245 - Minimum recommended /boot partition is too small
Summary: Minimum recommended /boot partition is too small
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 33
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-13 22:57 UTC by Adam Thiede
Modified: 2021-11-08 14:13 UTC (History)
10 users (show)

Fixed In Version: anaconda-35.13-1
Clone Of:
Environment:
Last Closed: 2021-11-08 14:13:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screenshot of reproduction step 7 in a virtual machine (104.84 KB, image/png)
2020-12-13 22:57 UTC, Adam Thiede
no flags Details
Error message when trying to upgrade kernel after install (2.92 KB, text/plain)
2020-12-13 23:12 UTC, Julian Ospald
no flags Details

Description Adam Thiede 2020-12-13 22:57:22 UTC
Created attachment 1738830 [details]
Screenshot of reproduction step 7 in a virtual machine

Created attachment 1738830 [details]
Screenshot of reproduction step 7 in a virtual machine

Description of problem:
When selecting Custom Partitioning in Anaconda, Fedora warns the user if they select a /boot partition smaller than 200MiB, and suggest to use a partition that's at least 200MiB.

Version-Release number of selected component (if applicable): fc33

How reproducible:
- In anaconda's custom partitioning screen

Steps to Reproduce:
1. Boot up Fedora installation medium
2. Select partitioning
3. Select custom partitioning
4. Create /boot partition with a size smaller than 200MiB
5. Create the rest of your partitions
6. Click "Done" once
7. At the bottom, a bar says there are warnings about the partition scheme. Clicking the warning shows the attached screenshot's dialog box.

Actual results:
Fedora installs just fine with a 200MiB boot partition but kernel updates can't be applied, so Fedora does not work properly.

Expected results:
Fedora prevents installation with a /boot partition that's too small.

Comment 1 Julian Ospald 2020-12-13 23:12:11 UTC
Created attachment 1738831 [details]
Error message when trying to upgrade kernel after install

Comment 2 Julian Ospald 2020-12-13 23:12:45 UTC
Is there a workaround for affected users that doesn't involve reinstalling or moving /boot?

Comment 3 Chris Murphy 2020-12-14 00:28:35 UTC
Just as a data point:

/dev/sda5       976M  300M  609M  34% /boot


That's with:

-rw-------. 1 root root 88843360 Nov 26 23:31 initramfs-0-rescue-b51b4a725db84fd286dcf4a790a50a1d.img
-rw-------. 1 root root 34109245 Nov 23 23:04 initramfs-5.10.0-0.rc5.82.fc34.x86_64+debug.img
-rw-------. 1 root root 34114573 Dec  4 19:19 initramfs-5.10.0-0.rc6.20201204git34816d20f173.92.fc34.x86_64.img
-rw-------. 1 root root 34118541 Dec  9 22:45 initramfs-5.10.0-0.rc7.93.fc34.x86_64+debug.img
-rw-------. 1 root root 33930255 Nov 26 23:19 initramfs-5.9.11-200.fc33.x86_64.img
drwxr-xr-x. 3 root root     4096 Aug 29 11:49 loader
drwx------. 2 root root    16384 Aug 29 11:44 lost+found
-rw-------. 1 root root  5888777 Nov 23 10:14 System.map-5.10.0-0.rc5.82.fc34.x86_64+debug
-rw-------. 1 root root  5888935 Dec  4 07:11 System.map-5.10.0-0.rc6.20201204git34816d20f173.92.fc34.x86_64
-rw-------. 1 root root  5885738 Dec  8 10:23 System.map-5.10.0-0.rc7.93.fc34.x86_64+debug
-rw-------. 1 root root  5369812 Nov 24 11:31 System.map-5.9.11-200.fc33.x86_64
-rwxr-xr-x. 1 root root 10164336 Nov 26 23:30 vmlinuz-0-rescue-b51b4a725db84fd286dcf4a790a50a1d
-rwxr-xr-x. 1 root root 11235152 Nov 23 10:14 vmlinuz-5.10.0-0.rc5.82.fc34.x86_64+debug
-rwxr-xr-x. 1 root root 11406448 Dec  4 07:11 vmlinuz-5.10.0-0.rc6.20201204git34816d20f173.92.fc34.x86_64
-rwxr-xr-x. 1 root root 11398480 Dec  8 10:23 vmlinuz-5.10.0-0.rc7.93.fc34.x86_64+debug
-rwxr-xr-x. 1 root root 10164336 Nov 24 11:31 vmlinuz-5.9.11-200.fc33.x86_64

Fedora by default will have three nodebug kernels with hostonly initramfs, plus the non-version/machineid "rescue" pair with nohostonly initramfs. But I think it installs a fourth before it deletes the spare? If so, the above represents a minimum 300M needed. I wonder if there is a way to estimate the minimum size based on the install media's vmlinuz and initramfs? That way it wouldn't have to be hard coded and updated periodically.

Comment 4 Chris Murphy 2020-12-14 00:35:21 UTC
(In reply to Julian Ospald from comment #2)
> Is there a workaround for affected users that doesn't involve reinstalling
> or moving /boot?

Delete the two files containing "rescue" in their filename. That'll free up enough space to update the kernel. There might be some cosmetic errors when it fails to create new rescue files, due to the lack of space. Or alternatively create a new 1-2G partition and file system for /boot, don't forget to update fstab.

Comment 5 Jan Stodola 2020-12-30 14:47:51 UTC
Related RHEL bug 1844423

Comment 6 Vladimír Slávik 2021-04-20 17:14:24 UTC
I wonder what would be correct size these days...

Comment 7 Chris Murphy 2021-04-21 05:39:56 UTC
I wonder about making it ratio instead of a fixed size? Some devices have little room to spare, with as little as 64G drives. Whereas 1T drives in a stock configuration are becoming more common at the high end. Also, Boot Loader Spec intends for the $BOOT device to be shared among the installed distributions. We could estimate that the likelihood of using kdump and multiboot is low in the 128G and less drive size, so keep $BOOT 1G for now. And then 1256M once the drive is 256G, 1512M for a 512G drive and 2G for a 1T drive?

Comment 8 Vladimír Slávik 2021-04-21 14:37:00 UTC
There are actually two values for the /boot size to think of:

a) The "too small" warning threshold. The original report is for this. This value is stored in config files [1][2] and appears to be everywhere the default 200 MiB, except for RHVH with 1 GiB, which is not too relevant here I think.

b) The default size if not specified. I guess that's what you mean in comment 7? That seems to be 1 GiB for most platforms, so no change needed there. [3]


I guess bumping the warning threshold to 512 MiB could be the safe choice while providing some buffer space. It's not like the warning must be addressed...


[1] https://github.com/rhinstaller/anaconda/blob/master/data/anaconda.conf#L209
[2] https://github.com/rhinstaller/anaconda/tree/master/data/product.d
[3] https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/modules/storage/platform.py#L131

Comment 9 Vladimír Slávik 2021-04-21 14:43:34 UTC
https://github.com/rhinstaller/anaconda/pull/3302

Comment 10 Chris Murphy 2021-04-21 21:31:14 UTC
>b) The default size if not specified. I guess that's what you mean in comment 7?

Yes.

>I guess bumping the warning threshold to 512 MiB

That seems reasonable.

Comment 11 Vladimír Slávik 2021-04-22 13:11:44 UTC
Thanks!

The idea about variable /boot size sounds useful, but it's not a 5 minute thing, unlike the change of warning limit. Feel free to open an RFE for that.

Comment 12 Vladimír Slávik 2021-04-23 14:58:26 UTC
Merged, now 512 MiB. No build yet.

Comment 13 Ben Cotton 2021-11-04 14:05:39 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Ben Cotton 2021-11-04 14:34:38 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Ben Cotton 2021-11-04 15:32:31 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.