Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76665 - [mkinitcpio] initramfs fallback image is too large for a dual-boot 100 MiB EFI partition

Attached to Project: Arch Linux
Opened by Guillaume Delacourt (Feufochmar) - Friday, 25 November 2022, 07:47 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 30 November 2022, 06:52 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Giancarlo Razzolini (grazzolini)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After upgrading today (notably updating mkinitcpio), I noticed the messages when initramfs images were built :

[...]
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
==> ERROR: Image generation FAILED: zstd reported an error
[...]
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
==> ERROR: Image generation FAILED: zstd reported an error

My /boot partition is a 100 MiB partition, originally from a pre-installed Windows 10. Since I don't use the Windows installation, I can remove files needed for a Windows boot, but that render a dual boot impossible. After removing files from the /boot partition and trigging another initramfs regeneration, the initramsfs-linux.img is built (it is around 15 MiB), but not the initramfs-linux-fallback.img which is around 64 MiB when zstd reports the write error. This is way too large for a dual-boot EFI partition.

When downgrading the mkinitcpio package to version 32-2, the images are built without triggering the write error. The initramfs-linux.img is then around 9 MiB and the initramfs-linux-fallback.img around 36 MiB.

Additional info:
* version package : mkinitcpio 33-1
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 30 November 2022, 06:52 GMT
Reason for closing:  None
Additional comments about closing:  "Increase in size comes from new default values for hooks (notably the kms hook). Recommended size for /boot were at least 200 MiB in 2017, the time I installed ArchLinux on the computer, though the efi partition from the Windows preinstallation was only 100 MiB."
Comment by Tobias Powalowski (tpowa) - Friday, 25 November 2022, 12:02 GMT
lsinitcpio of both initramdisks would be interesting. I guess more modules are included.
Comment by Doug Newgard (Scimmia) - Friday, 25 November 2022, 13:27 GMT
What hooks are you using? The defaults changed to include more things, change them if you need to.

For example, the kms hook when using nvidia is going to make things very large.
Comment by nl6720 (nl6720) - Saturday, 26 November 2022, 09:54 GMT
My suggestion is to use higher compression. E.g.:

COMPRESSION="xz"
COMPRESSION_OPTIONS=(-9e)
Comment by Guillaume Delacourt (Feufochmar) - Tuesday, 29 November 2022, 06:45 GMT
I'm using the defaults (I haven't changed that configuration).
Comment by Doug Newgard (Scimmia) - Tuesday, 29 November 2022, 06:54 GMT
And the defaults changed under you, and that's what's causing your problem. Configure it how you want.
Comment by Guillaume Delacourt (Feufochmar) - Tuesday, 29 November 2022, 07:16 GMT
I removed the kms hook and regenerated the images. It seems this hook was responsible for the larger size.
Was there discussion about image size when setting the new defaults ? The wiki doesn't seems to point size issues with the kms hook. Since preinstalled Windows are likely to come with a 100 MiB partition, I'm unsure setting kms in the default hooks is a right decision.
Comment by nl6720 (nl6720) - Tuesday, 29 November 2022, 08:50 GMT
Both https://wiki.archlinux.org/title/Installation_guide#Example_layouts and https://wiki.archlinux.org/title/Partitioning#/boot recommend 300 MiB (which is also the Windows Setup default on 4Kn drives).
If you are using a smaller partition than recommended, is reasonable to have to make adjustments. In this case, by editing /etc/mkinitcpio.conf to compress more.

Loading...