/boot 95% full

I’ve had this problem before and it was solved here

Now I have upgraded to F40, and the problem has reappeared. Then the reason was having debug kernels installed, but this is not the case now - I’ve checked. The size of my /boot partition is 1.1G. I have many large files in /boot, see below:

ls -lh /boot
total 855M
-rw-r--r--. 1 root root 270K Aug  5 01:00 config-6.10.3-200.fc40.x86_64
-rw-r--r--. 1 root root 268K Jul 25 01:00 config-6.9.11-200.fc40.x86_64
-rw-r--r--. 1 root root 268K Jul 27 01:00 config-6.9.12-200.fc40.x86_64
drwx------. 4 root root 4.0K Jan  1  1970 efi
drwxr-xr-x. 2 root root 4.0K Jul 27 15:43 extlinux
drwx------. 3 root root 4.0K Aug 11 13:21 grub2
-rw-------. 1 root root  81M Sep  3  2021 initramfs-0-rescue-c7746c73cff845c9825cb6be1b76708e.img
-rw-------. 1 root root  60M Aug  9 16:51 initramfs-6.10.3-200.fc40.x86_64.img
-rw-------. 1 root root  59M Jul 29 02:56 initramfs-6.9.11-200.fc40.x86_64.img
-rw-------. 1 root root  59M Aug  1 22:11 initramfs-6.9.12-200.fc40.x86_64.img
drwxr-xr-x. 3 root root 4.0K Sep  3  2021 loader
drwx------. 2 root root  16K Sep  3  2021 lost+found
-rw-r--r--. 1 root root 150K Jan 25  2024 memtest86+x64.efi
-rw-r--r--. 1 root root 162K Aug  9 16:52 symvers-6.10.3-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 160K Jul 29 02:56 symvers-6.9.11-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 160K Aug  1 22:12 symvers-6.9.12-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 8.9M Aug  5 01:00 System.map-6.10.3-200.fc40.x86_64
-rw-r--r--. 1 root root 8.9M Jul 25 01:00 System.map-6.9.11-200.fc40.x86_64
-rw-r--r--. 1 root root 8.9M Jul 27 01:00 System.map-6.9.12-200.fc40.x86_64
drwxr-xr-x. 9 root root 4.0K Dec  9  2021 timeshift
-rwxr-xr-x. 1 root root  11M Sep  3  2021 vmlinuz-0-rescue-c7746c73cff845c9825cb6be1b76708e
-rwxr-xr-x. 1 root root  16M Aug  5 01:00 vmlinuz-6.10.3-200.fc40.x86_64
-rwxr-xr-x. 1 root root  16M Jul 25 01:00 vmlinuz-6.9.11-200.fc40.x86_64
-rwxr-xr-x. 1 root root  16M Jul 27 01:00 vmlinuz-6.9.12-200.fc40.x86_64
-rw-r--r--. 1 root root  42M Mar 18 00:00 vmlinuz-virt.efi-6.7.10-100.fc38.x86_64
-rw-r--r--. 1 root root  59M Mar 18 00:00 vmlinuz-virt.efi-6.7.10-100.fc38.x86_64+debug
-rw-r--r--. 1 root root  42M Mar 27 00:00 vmlinuz-virt.efi-6.7.11-100.fc38.x86_64
-rw-r--r--. 1 root root  59M Mar 27 00:00 vmlinuz-virt.efi-6.7.11-100.fc38.x86_64+debug
-rw-r--r--. 1 root root  43M Apr  4 01:00 vmlinuz-virt.efi-6.8.4-100.fc38.x86_64
-rw-r--r--. 1 root root  59M Apr  4 01:00 vmlinuz-virt.efi-6.8.4-100.fc38.x86_64+debug
-rw-r--r--. 1 root root  43M Apr 11 01:00 vmlinuz-virt.efi-6.8.5-101.fc38.x86_64
-rw-r--r--. 1 root root  43M Apr 13 01:00 vmlinuz-virt.efi-6.8.6-100.fc38.x86_64
-rw-r--r--. 1 root root  43M Apr 17 01:00 vmlinuz-virt.efi-6.8.7-100.fc38.x86_64
-rw-r--r--. 1 root root  44M Apr 27 01:00 vmlinuz-virt.efi-6.8.8-100.fc38.x86_64
-rw-r--r--. 1 root root  44M May  2 01:00 vmlinuz-virt.efi-6.8.9-100.fc38.x86_64

Not sure which files it may be safe to delete or, better, how to configure so that only necessary files are saved.

Grateful for your help.

You seem to have configured timeshift to write to /boot. That directory probably is what is filling the file system. Timeshift probably should have a different location to save the images.

You also have a ton of vmlinuz images for fc38 (some are debug kernels) that seem obsolete and should be removed. Apparently because the names of those images are not stock fedora kernel names they were left behind during upgrades.

Additionally the rescue image is from 2021 and probably will not boot with the current libraries. It probably should be recreated. Instructions for that are in the solution here.

1 Like

For some reason you have installed the kernel-uki-virt and/or the kernel-debug-uki-virt. It is a known problem that when installing a new version the old version is not properly removed.

I would recommend to remove the kernel-uki-virt packages and also delete the vmlinuz-virt.efi files.

The kernel-uki-virt packages are only provided as a test on some specific virtual machine, and should generally not be installed.

1 Like

Thank you Jeff and Villy, these are both very good points (how do I indicate that two answers equally solved the problem?)

Jeff V: The timeshift configuration was left from last time. I have to read up on how to do that and have neglected to make time for that.

Is it safe to just rm /boot/star fc38 star? (not sure how to override the star-star as italic)

Villy Kruse: I noticed the kernel-uki-virt but didn’t now what they were for, I’ll remove them.

Thank you again both.

If the packages noted by Villy have been removed and are no longer installed then those files can be removed with sudo rm /boot/vmlinuz-virt.efi* It should ask for confirmation for each file to be removed so you can verify what it is doing.

The same command would also take care of the timeshift directory and content when structured as sudo rm -r /boot/timeshift

Use both at your own risk but I think they are safe for your needs since both require individual confirmation for each file being removed.

1 Like

All done - I hope!

ls -l /boot
total 271328
-rw-r--r--. 1 root root    275499 Aug  5 01:00 config-6.10.3-200.fc40.x86_64
drwx------. 4 root root      4096 Jan  1  1970 efi
drwxr-xr-x. 2 root root      4096 Jul 27 15:43 extlinux
drwx------. 3 root root      4096 Aug 11 13:21 grub2
-rw-------. 1 root root 173030962 Aug 11 18:26 initramfs-0-rescue-c7746c73cff845c9825cb6be1b76708e.img
-rw-------. 1 root root  62487523 Aug 11 18:23 initramfs-6.10.3-200.fc40.x86_64.img
drwxr-xr-x. 3 root root      4096 Sep  3  2021 loader
drwx------. 2 root root     16384 Sep  3  2021 lost+found
-rw-r--r--. 1 root root    153088 Jan 25  2024 memtest86+x64.efi
-rw-r--r--. 1 root root    165780 Aug  9 16:52 symvers-6.10.3-200.fc40.x86_64.xz
-rw-r--r--. 1 root root    163112 Jul 29 02:56 symvers-6.9.11-200.fc40.x86_64.xz
-rw-r--r--. 1 root root    163112 Aug  1 22:12 symvers-6.9.12-200.fc40.x86_64.xz
-rw-r--r--. 1 root root   9329995 Aug  5 01:00 System.map-6.10.3-200.fc40.x86_64
-rwxr-xr-x. 1 root root  16009576 Aug 11 18:23 vmlinuz-0-rescue-c7746c73cff845c9825cb6be1b76708e
-rwxr-xr-x. 1 root root  16009576 Aug  5 01:00 vmlinuz-6.10.3-200.fc40.x86_64

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       1.9T  1.3T  590G  69% /
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           7.8G  172K  7.8G   1% /dev/shm
efivarfs        384K  167K  213K  44% /sys/firmware/efi/efivars
tmpfs           3.2G  2.1M  3.1G   1% /run
tmpfs           7.8G  1.9M  7.8G   1% /tmp
/dev/sda2       974M  269M  638M  30% /boot
/dev/sda3       1.9T  1.3T  590G  69% /home
/dev/sda1       599M   35M  564M   6% /boot/efi
tmpfs           1.6G  3.8M  1.6G   1% /run/user/1000

dnf list installed kernel*
Installed Packages
kernel.x86_64                                                6.9.11-200.fc40                             @updates
kernel.x86_64                                                6.9.12-200.fc40                             @updates
kernel.x86_64                                                6.10.3-200.fc40                             @updates
kernel-core.x86_64                                           6.9.11-200.fc40                             @updates
kernel-core.x86_64                                           6.9.12-200.fc40                             @updates
kernel-core.x86_64                                           6.10.3-200.fc40                             @updates
kernel-devel.x86_64                                          6.9.11-200.fc40                             @updates
kernel-devel.x86_64                                          6.9.12-200.fc40                             @updates
kernel-devel.x86_64                                          6.10.3-200.fc40                             @updates
kernel-devel-matched.x86_64                                  6.10.3-200.fc40                             @updates
kernel-doc.noarch                                            6.10.3-200.fc40                             @updates
kernel-headers.x86_64                                        6.10.3-200.fc40                             @updates
kernel-modules.x86_64                                        6.9.11-200.fc40                             @updates
kernel-modules.x86_64                                        6.9.12-200.fc40                             @updates
kernel-modules.x86_64                                        6.10.3-200.fc40                             @updates
kernel-modules-core.x86_64                                   6.9.11-200.fc40                             @updates
kernel-modules-core.x86_64                                   6.9.12-200.fc40                             @updates
kernel-modules-core.x86_64                                   6.10.3-200.fc40                             @updates
kernel-modules-extra.x86_64                                  6.9.11-200.fc40                             @updates
kernel-modules-extra.x86_64                                  6.9.12-200.fc40                             @updates
kernel-modules-extra.x86_64                                  6.10.3-200.fc40                             @updates
kernel-modules-internal.x86_64                               6.9.11-200.fc40                             @updates
kernel-modules-internal.x86_64                               6.9.12-200.fc40                             @updates
kernel-modules-internal.x86_64                               6.10.3-200.fc40                             @updates
kernel-selftests-internal.x86_64                             6.10.3-200.fc40                             @updates
kernel-srpm-macros.noarch                                    1.0-23.fc40                                 @fedora 
kernel-tools.x86_64                                          6.10.3-200.fc40                             @updates
kernel-tools-libs.x86_64                                     6.10.3-200.fc40                             @updates
kernel-tools-libs-devel.x86_64                               6.10.3-200.fc40                             @updates

And I configured timeshift to write on /dev/sda3

I hope this is all correct.

Thank you very much indeed for your help, again.

How do I say that both of you solved the thread?

This seems to show you got a bit aggressive in deleting files
You should still have vmlinuz, symvers, config, initramfs, and System.map file for each of the 3 installed kernels. It appears you manually deleted most of those for the 6.9.11 & 6.9.12 kernels which is not a good thing since now those older kernels cannot boot. They also cannot be easily reinstalled since they are no longer available in the updates repo. You may be able to get the rpms from the koji.fedoraproject.org repo if you wish to do so.

At present, from that file list, it appears that you only have the 6.10.3 kernel and the rescue image as bootable options.

You may be able to recover those files by running sudo kernel-install with appropriate options but I have never tried it.

I only suggested removal of the extra vmlinuz-virt.efi files which would not have affected booting from any of the currently installed kernels.

1 Like

I see what you mean, but I only removed by hand the files with f38 in them - I ran exactly the command you suggested (<rm vmlinuz-virt.efi*/>) and looked before responding ‘y’ to each. I’ll have to take my chances and hope things work ok.

I am not sure what happened but above is the file list from your original post, and I expected it to look like below after the deletions. (but with the changed rescue images)

ls -lh /boot
total 855M
-rw-r--r--. 1 root root 270K Aug  5 01:00 config-6.10.3-200.fc40.x86_64
-rw-r--r--. 1 root root 268K Jul 25 01:00 config-6.9.11-200.fc40.x86_64
-rw-r--r--. 1 root root 268K Jul 27 01:00 config-6.9.12-200.fc40.x86_64
drwx------. 4 root root 4.0K Jan  1  1970 efi
drwxr-xr-x. 2 root root 4.0K Jul 27 15:43 extlinux
drwx------. 3 root root 4.0K Aug 11 13:21 grub2
-rw-------. 1 root root  81M Sep  3  2021 initramfs-0-rescue-c7746c73cff845c9825cb6be1b76708e.img
-rw-------. 1 root root  60M Aug  9 16:51 initramfs-6.10.3-200.fc40.x86_64.img
-rw-------. 1 root root  59M Jul 29 02:56 initramfs-6.9.11-200.fc40.x86_64.img
-rw-------. 1 root root  59M Aug  1 22:11 initramfs-6.9.12-200.fc40.x86_64.img
drwxr-xr-x. 3 root root 4.0K Sep  3  2021 loader
drwx------. 2 root root  16K Sep  3  2021 lost+found
-rw-r--r--. 1 root root 150K Jan 25  2024 memtest86+x64.efi
-rw-r--r--. 1 root root 162K Aug  9 16:52 symvers-6.10.3-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 160K Jul 29 02:56 symvers-6.9.11-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 160K Aug  1 22:12 symvers-6.9.12-200.fc40.x86_64.xz
-rw-r--r--. 1 root root 8.9M Aug  5 01:00 System.map-6.10.3-200.fc40.x86_64
-rw-r--r--. 1 root root 8.9M Jul 25 01:00 System.map-6.9.11-200.fc40.x86_64
-rw-r--r--. 1 root root 8.9M Jul 27 01:00 System.map-6.9.12-200.fc40.x86_64
-rwxr-xr-x. 1 root root  11M Sep  3  2021 vmlinuz-0-rescue-c7746c73cff845c9825cb6be1b76708e
-rwxr-xr-x. 1 root root  16M Aug  5 01:00 vmlinuz-6.10.3-200.fc40.x86_64
-rwxr-xr-x. 1 root root  16M Jul 25 01:00 vmlinuz-6.9.11-200.fc40.x86_64
-rwxr-xr-x. 1 root root  16M Jul 27 01:00 vmlinuz-6.9.12-200.fc40.x86_64
1 Like

Yes, I completely see what you mean. Something happened in the process of reassigning the rescue core.

I searched at koji.fedoraproject.org, I couldn’t find the kernels I’m missing but - no worries, I’ll hope the present kernel works until new versions are issued and I’m back to three.

Does the file below look ok?

more /etc/dnf/dnf.conf
# see `man dnf.conf` for defaults and possible options

[main]
gpgcheck=True
installonly_limit=4
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True

Thank you!

The default is installonly_limit=3 but otherwise that looks perfectly normal.

That can be set to whatever you consider reasonable but should never be less than 2 (the currently booted kernel and the newly installed one makes 2 so that is absolute minimum)

1 Like

The only other command I ran (apart from moving the initramfs and vmlinuz files for the rescue core to my home directory) was: dnf reinstall kernel kernel-core

So this is probably what removed the files that are missing, I am not sure.

sudo kernel-install add-all will rebuild all the initrd’s and reinstall all the vllinuz files from where they are safely stored in /usr/lib/modules directory. This is a new feature in Fedora 40.

3 Likes
ls /boot
config-6.10.3-200.fc40.x86_64
config-6.9.11-200.fc40.x86_64
config-6.9.12-200.fc40.x86_64
efi
extlinux
grub2
initramfs-0-rescue-c7746c73cff845c9825cb6be1b76708e.img
initramfs-6.10.3-200.fc40.x86_64.img
initramfs-6.9.11-200.fc40.x86_64.img
initramfs-6.9.12-200.fc40.x86_64.img
loader
lost+found
memtest86+x64.efi
symvers-6.10.3-200.fc40.x86_64.xz
symvers-6.9.11-200.fc40.x86_64.xz
symvers-6.9.12-200.fc40.x86_64.xz
System.map-6.10.3-200.fc40.x86_64
System.map-6.9.11-200.fc40.x86_64
System.map-6.9.12-200.fc40.x86_64
vmlinuz-0-rescue-c7746c73cff845c9825cb6be1b76708e
vmlinuz-6.10.3-200.fc40.x86_64
vmlinuz-6.9.11-200.fc40.x86_64
vmlinuz-6.9.12-200.fc40.x86_64

Thank you so much.

My thanks to @vekruse for the command to perform that task.