Kernel-uki-virt takes all the space in the efi partition

On update to fedora 38, one new pkg that was installed was kernel-uki-virt, which i believe is only intended for virtual machines. During installation process i got a notification saying efi partion was almost full. I was surprised because I thought fedora used a separate partition for boot. Looking at my efi partition, it seems most of the space is taken by a vmlinuz file generated by this pkg.

Why is this file not being saved in the separate boot partition where the normal kernel files are stored? And can I delete the kernel-uki-virt pkg since I dont use virtual machines? Right now I have 40 mb space left in efi partition but since fedora also stores 2 old versions of the kernel, efi will probably have no space left the next time the kernel pkgs update.

What is your file structure?
Most users have partitions for /boot, /boot/efi, /, and /home (and mounted appropriately) by default.

The normal location for the vmlinuz and initfamfs files is /boot.

If those files are not being placed in /boot then it seems odd to me.

Possibly the efi partition is mounted at /boot instead of /boot/efi?

1 Like

Apparently to preserve the chain of trust:

Yes, it is currently optional even for VMs.

See also:

1 Like

It is unclear if grub2 is able to boot the nki kernel. You can boot it using systemd-boot and systemd-boot has been able to do that from the beginning. However, that is not easy if you also want to keep secure boot enabled.

You can build a nki kernel yourself by using dracut with the “–uefi” option, and that has worked for already several years.

1 Like

The uki kernel went in via a dependency, if I remember correctly via VirtualBox, but I cannot trace it back anymore. may be the dependency is gone. It works fine in qemu-kvm, where you can boot it from efi directly. Since the uki kernel is designed to be started by UEFI directly, it has to reside in the EFI partition, because without additional drivers UEFI can only read VFAT. This partition could be too small for it. You can safely remove the package, but it could come back…

1 Like

thanks, yeah i removed it and thankfully it didnt cause any problems or come back in updates
slightly ot but i wonder if i can also remove kernel-core and kernel-modules-core
they seem to be redundant as I already have kernel and kernel-modules installed
and they appeared after updating to fedora 38

/boot nearly full - how to free space? - #2 by vgaetera

1 Like

Actually kernel-core is a central part of the kernel software, as is kernel-modules-core.
I believe the kernel package is a meta-package that pulls in all the other parts needed, and without that package it seems kernel upgrades do not proceed properly.

I would recommend you do not attempt to remove any of the kernel packages from fedora since they all work together. Exceptions to this are the kernel-headers and kernel-devel packages along with the *-debug packages which are used for compiling and testing. Even then, if you are using anything that uses an out-of-tree kernel module that needs compiled (such as VirtualBox, nvidia, and the like) you will still need at least the kernel-devel package. Note that these consume little if any space in /boot or /boot/efi.

1 Like

The linux kernel is provided by these packages


or alternatively by these packages.


You need at least one of these sets installed to boot the system.

kmod-VirtualBox will pull in one of these sets if none of these are installed. Which one is chosen to be pulled in is a bit random and sometimes not the correct one.

1 Like

got it thanks, was just curious thats all
thank you everyone and sorry for disturbing yall again :smile:

1 Like

Not a disturbance. We all had to start somewhere and learn as we go so questions sometimes make us think back to how we did things and how we learned.

It is great to communicate with others who are interested and learning.

:cowboy_hat_face: :+1:

1 Like