No space left on /boot

When booting (after installing latest updates) I was told I have no space left on /boot. Disk usage analyser shows me that the largest proportion of space is taken by an initramfs-0-rescue-…img file which seems to be from two years ago, then the initramfs and vmlinuz-virt files for the currently installed kernels.

When looking into the /boot directory, the largest contribution is from efi/EFI/fedora, in which there are four large files, all of them from 6 February (gcdia32.efi, gcdx64.efi, grubia32.efi, grubx64.efi).

Not sure how to free space on /boot (or even if I need to bother - perhaps this will sort itself out as unnecessarily files are deleted automatically)?

The third to last kernel I installed caused problems - the computer wouldn’t boot (said iniramfs not available), so I removed and reinstalled it. Not sure if this is relevant.

Grateful for suggestions.

The simplest work around would probably be to reduce the number of kernels that are kept on /boot by changing the value of installonly_limit= in /etc/dnf/dnf.conf.

A better solution would be to increase the size of your /boot partition. Unfortunately, that process is quite involved.

Edit: Another option might be to uninstall the dracut-config-rescue package which (I think) will prevent that “rescue” kernel from being readded to your /boot partiton the next time you update.

2 Likes

You may want to check what is in /boot. You may have files in there that are not needed.

If you are not sure what is safe to remove then provide the output of the folllowing commands:

du -h /boot
ls -lh /boot /boot/loader/entries/

It is risky attempting to use a system with low disk space as you risk damaging the filesystem. It is best to make space (e.g., by deleting the rescue image and, as suggested, preventing the system from creating a new one).

There are other threads dealing with this – if you have time to read them you may get a better idea of the options available to you.

Terminal output can help us better understand the issue. lost+found Searchable text may help others with similar problems find this thread.

The rescue image contains drivers that the normal kernels load as modules.
Systems that have been upgraded over many Fedora vesions often have a boot partition that is too small for current kernels. It would help to mention the history of the system and the size of /boot/, Here, with a fresh install of F39:

% df -lH /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc2       1.1G  391M  560M  42% /boot

If your partition is this size, check that sudo ls -l /boot/lost+found isn’t full of files.

[root@fedora ~]# du -h /boot
1.1M	/boot/extlinux
2.3M	/boot/grub2/fonts
2.4M	/boot/grub2
36K	/boot/loader/entries
40K	/boot/loader
16K	/boot/lost+found
1.8M	/boot/efi/EFI/BOOT
9.8M	/boot/efi/EFI/fedora/fw
27M	/boot/efi/EFI/fedora
6.1M	/boot/efi/EFI/Dell/Bios/Recovery
6.1M	/boot/efi/EFI/Dell/Bios
6.1M	/boot/efi/EFI/Dell
35M	/boot/efi/EFI
8.0K	/boot/efi/System/Library/CoreServices
12K	/boot/efi/System/Library
16K	/boot/efi/System
35M	/boot/efi
4.0K	/boot/timeshift/snapshots-boot
4.0K	/boot/timeshift/snapshots-monthly
4.0K	/boot/timeshift/snapshots-hourly
4.0K	/boot/timeshift/snapshots
4.0K	/boot/timeshift/snapshots-daily
4.0K	/boot/timeshift/snapshots-weekly
4.0K	/boot/timeshift/snapshots-ondemand
32K	/boot/timeshift
981M	/boot

ls -lh /boot /boot/loader/entries/
/boot:
total 943M
-rw-r--r--. 1 root root 264K Mar 18 00:00 config-6.7.10-100.fc38.x86_64
-rw-r--r--. 1 root root 265K Mar 18 00:00 config-6.7.10-100.fc38.x86_64+debug
-rw-r--r--. 1 root root 264K Mar 27 00:00 config-6.7.11-100.fc38.x86_64
-rw-r--r--. 1 root root 264K Mar 27 00:00 config-6.7.11-100.fc38.x86_64+debug
-rw-r--r--. 1 root root 266K Apr  4 01:00 config-6.8.4-100.fc38.x86_64
-rw-r--r--. 1 root root 267K Apr  4 01:00 config-6.8.4-100.fc38.x86_64+debug
drwx------. 4 root root 4.0K Jan  1  1970 efi
drwxr-xr-x. 2 root root 4.0K Jun 20  2023 extlinux
drwx------. 3 root root 4.0K Apr  7 18:34 grub2
-rw-------. 1 root root  81M Sep  3  2021 initramfs-0-rescue-c7746c73cff845c9825cb6be1b76708e.img
-rw-------. 1 root root  66M Mar 28 22:38 initramfs-6.7.10-100.fc38.x86_64+debug.img
-rw-------. 1 root root  58M Mar 28 22:35 initramfs-6.7.10-100.fc38.x86_64.img
-rw-------. 1 root root  66M Apr  3 05:19 initramfs-6.7.11-100.fc38.x86_64+debug.img
-rw-------. 1 root root  58M Apr  3 05:18 initramfs-6.7.11-100.fc38.x86_64.img
-rw-------. 1 root root  66M Apr  7 04:22 initramfs-6.8.4-100.fc38.x86_64+debug.img
-rw-------. 1 root root  58M Apr  7 04:14 initramfs-6.8.4-100.fc38.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 146K Jan  7 00:00 memtest86+x64.efi
lrwxrwxrwx. 1 root root   52 Mar 28 22:31 symvers-6.7.10-100.fc38.x86_64+debug.xz -> /lib/modules/6.7.10-100.fc38.x86_64+debug/symvers.xz
lrwxrwxrwx. 1 root root   46 Mar 28 22:34 symvers-6.7.10-100.fc38.x86_64.xz -> /lib/modules/6.7.10-100.fc38.x86_64/symvers.xz
lrwxrwxrwx. 1 root root   52 Apr  3 05:07 symvers-6.7.11-100.fc38.x86_64+debug.xz -> /lib/modules/6.7.11-100.fc38.x86_64+debug/symvers.xz
lrwxrwxrwx. 1 root root   46 Apr  3 05:14 symvers-6.7.11-100.fc38.x86_64.xz -> /lib/modules/6.7.11-100.fc38.x86_64/symvers.xz
lrwxrwxrwx. 1 root root   51 Apr  7 03:56 symvers-6.8.4-100.fc38.x86_64+debug.xz -> /lib/modules/6.8.4-100.fc38.x86_64+debug/symvers.xz
lrwxrwxrwx. 1 root root   45 Apr  7 04:05 symvers-6.8.4-100.fc38.x86_64.xz -> /lib/modules/6.8.4-100.fc38.x86_64/symvers.xz
-rw-r--r--. 1 root root 8.5M Mar 18 00:00 System.map-6.7.10-100.fc38.x86_64
-rw-r--r--. 1 root root 9.3M Mar 18 00:00 System.map-6.7.10-100.fc38.x86_64+debug
-rw-r--r--. 1 root root 8.5M Mar 27 00:00 System.map-6.7.11-100.fc38.x86_64
-rw-r--r--. 1 root root 9.3M Mar 27 00:00 System.map-6.7.11-100.fc38.x86_64+debug
-rw-r--r--. 1 root root 8.5M Apr  4 01:00 System.map-6.8.4-100.fc38.x86_64
-rw-r--r--. 1 root root 9.4M Apr  4 01:00 System.map-6.8.4-100.fc38.x86_64+debug
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  15M Mar 18 00:00 vmlinuz-6.7.10-100.fc38.x86_64
-rwxr-xr-x. 1 root root  28M Mar 18 00:00 vmlinuz-6.7.10-100.fc38.x86_64+debug
-rwxr-xr-x. 1 root root  15M Mar 27 00:00 vmlinuz-6.7.11-100.fc38.x86_64
-rwxr-xr-x. 1 root root  28M Mar 27 00:00 vmlinuz-6.7.11-100.fc38.x86_64+debug
-rwxr-xr-x. 1 root root  15M Apr  4 01:00 vmlinuz-6.8.4-100.fc38.x86_64
-rwxr-xr-x. 1 root root  28M Apr  4 01:00 vmlinuz-6.8.4-100.fc38.x86_64+debug
-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

/boot/loader/entries/:
total 32K
-rw-r--r--. 1 root root 155 Jan 21 00:54 c7746c73cff845c9825cb6be1b76708e-0-memtest86+.conf
-rw-r--r--. 1 root root 410 Sep  3  2021 c7746c73cff845c9825cb6be1b76708e-0-rescue.conf
-rw-r--r--. 1 root root 339 Mar 28 22:34 c7746c73cff845c9825cb6be1b76708e-6.7.10-100.fc38.x86_64.conf
-rw-r--r--. 1 root root 384 Mar 28 22:35 c7746c73cff845c9825cb6be1b76708e-6.7.10-100.fc38.x86_64+debug.conf
-rw-r--r--. 1 root root 339 Apr  3 05:15 c7746c73cff845c9825cb6be1b76708e-6.7.11-100.fc38.x86_64.conf
-rw-r--r--. 1 root root 384 Apr  3 05:18 c7746c73cff845c9825cb6be1b76708e-6.7.11-100.fc38.x86_64+debug.conf
-rw-r--r--. 1 root root 335 Apr  7 04:06 c7746c73cff845c9825cb6be1b76708e-6.8.4-100.fc38.x86_64.conf
-rw-r--r--. 1 root root 380 Apr  7 04:15 c7746c73cff845c9825cb6be1b76708e-6.8.4-100.fc38.x86_64+debug.conf

The size is the same and there seems to be nothing in lost+found.

You’re right, I’ve updated over many versions, one day I’ll have to do a fresh install…

Do you really need all the debug kernels? Generally those should be removed and only the latest installed.

I can delete config-6.7.10-100.fc38.x86_64+debug and config-6.7.11-100.fc38.x86_64+debug, but they seem small, not sure how much difference this will make.

Thanks to everyone who answered - I still hope to learn which files I can delete safely (but will look at other threads too).

I suspect this is another case of: Efi partition full - #28 by glb

Edit: Note that the documentation has since been updated.

You should avoid just deleting files – use something like sudo dnf remove <unwanted_package>. You will get a chance to quit after reviewing the proposed action. To get package names, use, e.g., sudo dnf whatprovides /boot/initramfs-6.8.4-100.fc38.x86_64+debug.img.

1 Like

I suspect the problem may be these files from timeshift.

4.0K	/boot/timeshift/snapshots-boot
4.0K	/boot/timeshift/snapshots-monthly
4.0K	/boot/timeshift/snapshots-hourly
4.0K	/boot/timeshift/snapshots
4.0K	/boot/timeshift/snapshots-daily
4.0K	/boot/timeshift/snapshots-weekly

I think timeshift is backup software and it is a configuration error to have it write to /boot I assume.

You’re right, the timeshift files shouldn’t be there, but these are small files. The problem was with having debug kernels installed (after version 6.7.10 did not work, I installed all kernels with this version, then they kept installing).
Thank you to everyone for feedback.

Gill had posted on another thread he used and closed in January. That led me to moving that post to another thread where we solved this issue. I am moving the duplicate thread to merge it here.

Sorry to invade a closed thread. I have tried tree /boot/efi and I get very similar files, with a few additions:

I get a /boot/efi/EFI/Dell directory, with Bios->Recovery->BIOS_CUR.RCV
(a large file)

I get /boot/efi/EFI/Fedora/fw with a file with a long name: ‘fwupd…cap’
(a very large file)

and a file /boot/efi/EFI/fwupdx64.epi
(small, no problem)

Are these necessary? Can I safely delete the two large files? Why have they appeared? Thank you.

I believe that is a file created by dell for recovery of the bios and should not be removed.

The real issue seem to be the size of the /boot or the /boot/efi partition.
Please show the result of df -h, lsblk -f and sudo fdisk -l so we can see what the drive has for space and possibly make suggestions to fix this problem so it does not recur. (use the </> button on the toolbar to retain on-screen formatting of that data.)

NOTE
You should not reopen threads that already have a solution noted.
I am opening a new thread for you to continue this discussion.

Yes, I looked up the files, I don’t think they should be removed. Apologies for not looking before I sent the first message.

[root@fedora ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           7.8G  172K  7.8G   1% /dev/shm
tmpfs           3.2G  2.2M  3.2G   1% /run
efivarfs        384K  106K  274K  28% /sys/firmware/efi/efivars
/dev/sda3       1.9T  1.2T  645G  66% /
tmpfs           7.8G  7.5M  7.8G   1% /tmp
/dev/sda3       1.9T  1.2T  645G  66% /home
/dev/sda2       974M  946M     0 100% /boot
/dev/sda1       599M   35M  564M   6% /boot/efi
tmpfs           1.6G  3.8M  1.6G   1% /run/user/1000
[root@fedora ~]# lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    vfat   FAT32       53A5-B5FD                             563.9M     6% /boot/efi
├─sda2
│    ext4   1.0         63859913-9baa-403b-909b-65fa7bdea94c       0    97% /boot
└─sda3
     btrfs        fedora_localhost-live
                        bf39fb42-52dc-43b3-afaf-8fbdb0de650a    644G    65% /home
                                                                            /
sdb                                                                         
├─sdb1
│    vfat   FAT32 ESP   2403-C0D6                                           
├─sdb2
│                                                                           
├─sdb3
│    ntfs         OS    2ECE4477CE44397B                                    
├─sdb4
│    ntfs         WINRETOOLS
│                       D4D41C3BD41C21F2                                    
├─sdb5
│    ntfs         Image 6E001D02001CD347                                    
└─sdb6
     ntfs         DELLSUPPORT
                        16BED217BED1EEED                                    
sr0                                                                         
zram0
                                                                            [SWAP]

fdisk -l
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000LM007-1R81
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0552A5EC-309C-406D-AEFA-357628BDA9FB

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1230847    1228800  600M EFI System
/dev/sda2  1230848    3327999    2097152    1G Linux filesystem
/dev/sda3  3328000 3907028991 3903700992  1.8T Linux filesystem


Disk /dev/sdb: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: Micron 1100 SATA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: FE3A73BB-C625-4370-AC1E-9C01659A2798

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048   1026047   1024000   500M EFI System
/dev/sdb2    1026048   1288191    262144   128M Microsoft reserved
/dev/sdb3    1288192 461400063 460111872 219.4G Microsoft basic data
/dev/sdb4  461400064 462417919   1017856   497M Windows recovery environment
/dev/sdb5  462417920 497760255  35342336  16.9G Windows recovery environment
/dev/sdb6  497762304 500084735   2322432   1.1G Windows recovery environment


Disk /dev/zram0: 8 GiB, 8589934592 bytes, 2097152 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Original thread is here: No space left on /boot - #8 by blogugogu - I posted other info there.

Thank you.

Sorry, I’ll post here from now on

Looking at that it seems /boot is full (as expected)

Please now post the output of sudo du -h /boot so we can get a summary and see what is using all the space there. This will give us the subdirectories and their usage. It would appear that /boot/efi is not a concern.

My system which has been in use for quite some time only is using ~470M for everything under /boot. Yours shows a full 1G usage and a full partition there.

[root@fedora ~]# du -h /boot
1.1M	/boot/extlinux
2.3M	/boot/grub2/fonts
2.4M	/boot/grub2
36K	/boot/loader/entries
40K	/boot/loader
16K	/boot/lost+found
1.8M	/boot/efi/EFI/BOOT
9.8M	/boot/efi/EFI/fedora/fw
27M	/boot/efi/EFI/fedora
6.1M	/boot/efi/EFI/Dell/Bios/Recovery
6.1M	/boot/efi/EFI/Dell/Bios
6.1M	/boot/efi/EFI/Dell
35M	/boot/efi/EFI
8.0K	/boot/efi/System/Library/CoreServices
12K	/boot/efi/System/Library
16K	/boot/efi/System
35M	/boot/efi
4.0K	/boot/timeshift/snapshots-boot
4.0K	/boot/timeshift/snapshots-monthly
4.0K	/boot/timeshift/snapshots-hourly
4.0K	/boot/timeshift/snapshots
4.0K	/boot/timeshift/snapshots-daily
4.0K	/boot/timeshift/snapshots-weekly
4.0K	/boot/timeshift/snapshots-ondemand
32K	/boot/timeshift
981M	/boot

The issue, and the real reason that I opened this thread is that you posted on a closed thread. It is always best to continue all discussion on one thread. I did not notice that you were also managing the other thread as well or I would have joined this to that one.

In any case, we need to find out why /boot is full and fix that problem – clear space as well as determining the cause and stopping that problem.

I see two problems with what you just posted…

First is the timeshift snapshots. They should NEVER go into /boot since that is a relatively small partition and is dedicated to boot files. Turn off timeshift and reconfigure it to store data somewhere else before restarting it. You also need to remove all those snapshots from /boot.

We need to see what is actually taking space in /boot. Nothing in that list is obvious as to what is using the space. Everything under /boot/efi is another partition so is not of concern. This leaves the only visible suspects as the /boot/timeshift tree.

Lets look at exactly what is in /boot with ls -l /boot

Yes, apologies - we should merge this thread and the one I opened, but don’t know how.