Hi,
I’m using AlmaLinux-9-GenericCloud-9.3-20231113.x86_64.qcow2 on Proxmox 8.0.9. When the system have two installed kernels and tries to install the third one during “dnf update” I’m getting an error saying that there is not enough space in /boot partition and the update is aborted. Further investigation shows that it is true. As you can se further down there is two kernels installed and they take up 95% of the space in /boot. The problem seems to be that by default the parameter installonly_limit in /etc/dnf/dnf.conf is set to “3”. Its easy to change the value to 2 and it fixes the issue but if people are deploying the images in production it will cause some issues. The solution is to ship the image with installonly_limit=2 or increase the /boot partition size. Hope this helps.
dnf list kernel:
Installed Packages
kernel.x86_64 5.14.0-362.13.1.el9_3 @baseos
kernel.x86_64 5.14.0-362.18.1.el9_3 @baseos
df -h:
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 7.7G 0 7.7G 0% /dev/shm
tmpfs 3.1G 9.2M 3.1G 1% /run
/dev/sda4 60G 7.1G 53G 12% /
/dev/sda3 507M 480M 27M 95% /boot
/dev/sda2 200M 7.1M 193M 4% /boot/efi
tmpfs 1.6G 120K 1.6G 1% /run/user/1000
/dev/sr0 356K 356K 0 100% /run/media/user/cidata
cat /etc/dnf/dnf.conf:
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
linuxalma:
dnf list kernel
What is consuming space in /boot/?
# du -d1 -hx /boot
2.4M /boot/grub2
28K /boot/loader
16K /boot/lost+found
463M /boot
This example has mostly files directly in directory /boot. The main culprits:
# ls -lh /boot/{vmlin,symv,init}*
-rw-------. 1 root root 123M Nov 17 2022 /boot/initramfs-0-rescue-86..2d.img
-rw-------. 1 root root 54M Jan 4 10:03 /boot/initramfs-5.14.0-362.13.1.el9_3.x86_64.img
-rw-------. 1 root root 55M Feb 1 11:13 /boot/initramfs-5.14.0-362.18.1.el9_3.x86_64+debug.img
-rw-------. 1 root root 54M Feb 1 11:09 /boot/initramfs-5.14.0-362.18.1.el9_3.x86_64.img
-rw-------. 1 root root 55M Feb 1 11:17 /boot/initramfs-5.14.0-362.8.1.el9_3.x86_64+debug.img
lrwxrwxrwx. 1 root root 52 Jan 4 10:03 /boot/symvers-5.14.0-362.13.1.el9_3.x86_64.gz -> /lib/modules/5.14.0-362.13.1.el9_3.x86_64/symvers.gz
lrwxrwxrwx. 1 root root 58 Feb 1 11:12 /boot/symvers-5.14.0-362.18.1.el9_3.x86_64+debug.gz -> /lib/modules/5.14.0-362.18.1.el9_3.x86_64+debug/symvers.gz
lrwxrwxrwx. 1 root root 52 Feb 1 11:08 /boot/symvers-5.14.0-362.18.1.el9_3.x86_64.gz -> /lib/modules/5.14.0-362.18.1.el9_3.x86_64/symvers.gz
lrwxrwxrwx. 1 root root 57 Feb 1 11:17 /boot/symvers-5.14.0-362.8.1.el9_3.x86_64+debug.gz -> /lib/modules/5.14.0-362.8.1.el9_3.x86_64+debug/symvers.gz
-rwxr-xr-x. 1 root root 12M Nov 17 2022 /boot/vmlinuz-0-rescue-86..2d
-rwxr-xr-x. 1 root root 13M Dec 21 14:22 /boot/vmlinuz-5.14.0-362.13.1.el9_3.x86_64
-rwxr-xr-x. 1 root root 13M Jan 29 14:13 /boot/vmlinuz-5.14.0-362.18.1.el9_3.x86_64
-rwxr-xr-x. 1 root root 26M Jan 29 13:49 /boot/vmlinuz-5.14.0-362.18.1.el9_3.x86_64+debug
-rwxr-xr-x. 1 root root 26M Nov 7 21:37 /boot/vmlinuz-5.14.0-362.8.1.el9_3.x86_64+debug
And that is “only” two kernels:
kernel.x86_64 5.14.0-362.13.1.el9_3 @baseos
kernel.x86_64 5.14.0-362.18.1.el9_3 @baseos
On another machine I have “only one” kernel:
-rw-------. 1 root root 82M Jul 22 2022 /boot/initramfs-0-rescue-c3..b7.img
-rw-------. 1 root root 35M Dec 25 12:54 /boot/initramfs-5.14.0-362.8.1.el9_3.x86_64.img
-rw-------. 1 root root 32M Dec 25 13:00 /boot/initramfs-5.14.0-362.8.1.el9_3.x86_64kdump.img
lrwxrwxrwx. 1 root root 51 Dec 25 12:42 /boot/symvers-5.14.0-362.8.1.el9_3.x86_64.gz -> /lib/modules/5.14.0-362.8.1.el9_3.x86_64/symvers.gz
-rwxr-xr-x. 1 root root 11M Jul 22 2022 /boot/vmlinuz-0-rescue-c3..b7
-rwxr-xr-x. 1 root root 13M Nov 7 22:02 /boot/vmlinuz-5.14.0-362.8.1.el9_3.x86_64
One usually has at least the rescue kernel – a copy created at some point, but with fat initramfs.
Also the kdump is enabled by default and has its own initramfs.
The +debug – I’m not sure where those came from.
Point is that there are easily additional files consuming space that are somewhat optional.
Red Hat recommends in Appendix B. Partitioning reference Red Hat Enterprise Linux 9 | Red Hat Customer Portal
/boot
partition - recommended size at least 1 GiB
lkhn
May 8, 2024, 1:35pm
3
Hi,
The size of boot partition (/boot
) is increased from 512 MiB
to 1024 MiB
/ 1 GiB
starting with all AlmaLinux OS 9.4 and 8.10 cloud images.
Thanks a lot!