The package kernel-core-${VER} claims to own/provide /boot/vmlinuz-${VER} and /boot/initramfs-${VER}.img
The vmlinuz file ought to be installed (copied) from package to /boot/
The initramfs file is apparently generated by a line in posttrans script of the package: /bin/kernel-install add ...
I presume that the /bin/kernel-install invokes dracut.
If the kernel-install or dracut acts on only when something (from GRUB packages) is present, then that would explain the lack of initramfs, but not the lack of vmlinuz.
The /bin/kernel-install script has a number of tests to determine what kind of system it is on and from those tests makes an assumption as to where to install the kernel and initramfs. It may be that the kernel is being installed to a different location now that you have removed grub2. Maybe in /boot/efi/EFI/ somewhere. As far as I know rEFInd does not require the removal of grub2. This may take a lot of time to figure out and fix.
Yes, you are right, kernel-install is trying to install in /boot/efi:
kernel-install add 6.10.3-200.fc40.x86_64 /usr/lib/modules/6.10.3-200.fc40.x86_64/vmlinuz
cp: error writing '/boot/efi/e77df060298e4fd5aa3b415c3ed06017/0-rescue/initrd': No space left on device
dracut[F]: Creation of /boot/efi/e77df060298e4fd5aa3b415c3ed06017/0-rescue/initrd failed
/usr/lib/kernel/install.d/51-dracut-rescue.install: line 91: /boot/efi/loader/entries/e77df060298e4fd5aa3b415c3ed06017-0-rescue.conf: No such file or directory
/usr/lib/kernel/install.d/51-dracut-rescue.install failed with exit status 2.
The 51-dracut-rescue.install is from package dracut-config-rescue and for creating βrescueβ version. The logic in it is probably same as in other kernel-install scripts. It asks βdoes directory exists?β. If not, fallback is the /boot. For some reason you seem to have /boot/efi/${MACHINE_ID}/ β that is not in default. This script gets the name of directory as argument, so some other script calls it.
Do you really have /boot/efi/${MACHINE_ID}/ and what is in it?
Why fc40? ELRepo offers kernel-ml β currently 6.10.4-1.el9.elrepo β and that is built for el9.
In other words, dracut did try to write where we donβt want it to write to. Then you did help it to βdo the wrong thingβ, which did not make things better. Perhaps reinstall of the GRUB packages would be a better solution.
An issue is that the ESP (EFI System Partition) mounted on /boot/efi is smaller than /boot. The latter defaults to 1 GB and some people manage to fill even that with kernels β¦
@nihi1ist@jbkt23
Let me add an interesting fact - that also solves the problem in 2 minutes: using dracut with β-fβ parameter followed by a directory results in new initrd saved in that directory.
(I just tested it to be sure - works like a charm).
If every kernel would overwrite the snafu/initramfs.img, then only the last would have valid initramfs image. That is why the two approaches that we have seen have either /boot/initrd-$kver.img or snafu/$kver/initrd.img
PS. Copy-paste of text is at least as easy to obfuscate as bitmap images.
If <image> is omitted or empty, depending on bootloader specification, the default location can be /efi/<machine-id>/<kernel-version>/initrd, /boot/<machine-id>/<kernel-version>/initrd, /boot/efi/<machine-id>/<kernel-version>/initrd, /lib/modules/<kernel-version>/initrd or/boot/initramfs-<kernel-version>.img.
The /usr/bin/dracut is a Bash script and seems to have something like: