After upgrading Fedora no space left on boot/efi

Hello!
After upgrading Fedora from Fedora 37 to Fedora 39(via Fedora 38). I have problem:
now:

uname -a
Linux localhost.localdomain 6.6.12-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jan 16 01:35:34 UTC 2024 x86_64 GNU/Linux

fc38? Why?, but:

cat /etc/redhat-release
Fedora release 39 (Thirty Nine)

I tried dnf update and dnf updated with “ALL Ok”, but i see that when dnf
updated my os, dnf writed warning:

dkms: running auto installation service for kernel 6.6.13-200.fc39.x86_64 Done.
cp: error writing '/boot/efi/adbce/6.6.13-200.fc39.x86_64/initrd': No space left on device
dracut: Creation of /boot/efi/adbce/6.6.13-200.fc39.x86_64/initrd failed
/usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.
warning: %posttrans(kernel-core-6.6.13-200.fc39.x86_64) scriptlet failed, exit status 1

Unfortunately, I allowed automatic disk partitioning a few years ago when I installed Fedora 27.
And 200m(/boot/efi) is a very little!

fdisk -l

Device       Start        End    Sectors   Size Type
/dev/sdc1     2048     411647     409600   200M EFI System
/dev/sdc2   411648    2508799    2097152     1G Linux filesystem
/dev/sdc3  2508800 2000408575 1997899776 952,7G Linux LVM
du -hs /boot/efi/*
166M /boot/efi/adbceRemoved
7,2M /boot/efi/EFI
4,0K /boot/efi/mach_kernel
16K /boot/efi/System
4,0K /boot/efi/System Volume Information
df -h /boot/efi/adbceRemoved
130M 0-rescue
4,0K 4.17.19-100.fc27.x86_64
4,0K 4.18.7-100.fc27.x86_64
4,0K 4.18.9-100.fc27.x86_64
36M 6.6.12-200.fc39.x86_64
4,0K 6.6.13-200.fc39.x86_64
4,0K 7.00

Now i have os Fedora 39, but my kernel is 6.6.12-100.fc38. But directory(above)is 6.6.12-200.fc39.x86_6 FC39?

I don’t know why 0-rescue have 130M, I didn’t restored the system. This directory update 22 January, when i update os to Fedora 39.

  1. Can i remove all files from 0-rescue?
  2. How can I reinstall 6.6.13-200.fc39.x86_64 via dnf i have Nvidia card and i want that akmod-nvidia compiled automatically.
  3. Why did dnf report a successful update when it turned out during the update process that there was no free space on boot/efi? And as a result, the kernel did not install correctly!
    Thanks.

Добавлено — boot, dnf, удалено — f37, f38

On my system I have this.

# ls -al /boot/efi
total 32
drwx------. 4 root root 16384 Dec 31  1969 .
dr-xr-xr-x. 6 root root  4096 Jan 16 16:12 ..
drwx------. 4 root root  4096 Jul 18  2023 EFI
-rwx------. 1 root root    34 Jul 19  2023 mach_kernel
drwx------. 3 root root  4096 Jul 19  2023 System

Anything else seems superflous and the kernels from fc27 are definitely taking up unnecessary space.

Please show us the output of sudo tree /boot/efi which should give an output similar to this.

# tree /boot/efi
/boot/efi
├── EFI
│   ├── BOOT
│   │   ├── BOOTIA32.EFI
│   │   ├── BOOTX64.EFI
│   │   ├── fbia32.efi
│   │   └── fbx64.efi
│   └── fedora
│       ├── BOOTIA32.CSV
│       ├── BOOTX64.CSV
│       ├── gcdia32.efi
│       ├── gcdx64.efi
│       ├── grub.cfg
│       ├── grubia32.efi
│       ├── grubx64.efi
│       ├── mmia32.efi
│       ├── mmx64.efi
│       ├── shim.efi
│       ├── shimia32.efi
│       └── shimx64.efi
├── mach_kernel
└── System
    └── Library
        └── CoreServices
            └── SystemVersion.plist

7 directories, 18 files
# du -hs /boot/efi
18M	/boot/efi

It appears you have a lot of cruft that could be removed. Fedora 39 with a new install creates an efi partition of ~600 MB size.

I have never seen a system that has a directory such as /boot/efi/adbceRemoved and that seems to be using 166M of the available 200M in that partition. Do you have any idea why that may have been created and remains there?

Removal is easy.
sudo rm -r /boot/efi/adbceRemoved then tell it ‘y’ for each file or directory in that tree it asks for confirmation to remove

For simplicity and to update the entire system to the latest I would suggest that you consider backing up your data then do a complete new installation so the file systems are 100% compatible with what fedora now uses for size and format. This is definitely not mandatory but would simplify things since fedora has changed dramatically since the time of F27.

I think that my problem described here:

/boot/efi/adbceRemoved is a /boot/efi/$machineid. I removed some symbols for security. Tomorrow I will try to fix the problem, as written in the article above.

If that link shows the same issue then the fix appears to be to remove that directory. I showed the command to do so above.