Weird issues after an update, can't run dracut

Hi,

Been having those weird issues lately after upgrades I guess. I didn’t do anything outside normal.

As stated in one of my post, this issue came back and was able to fix it yesterday, got another upgrade today and again the same issue where :

I tried to regenerate my initfsram and I got this error :

dracut[F]: Can't write to /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.7-200.fc43.x86_64: Directory /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.7-200.fc43.x86_64 does not exist or is not accessible.

Does anyone have any idea what is happening to my system?? Also the weird part is I don’t even have 6.18.7 available from the grub boot screen… I’m getting the feeling something has gone wrong with one of the updates..

These are the kernels I have on my system (got 6.18.7 with today’s update)

Yet when I boot I only get to choose the latest 6.18-6

And if I try the dracut command I get denied the operation so.. really not sure what is going on. If anyone has any idea, please let me know what I could try.

I mean look at this 6.18.4 should not even be there according to rpm -qa kernel-core…. weird.

The error reported by dracut is looking for a folder that does not even exist..

Please show the output shown by running sudo kernel-install. Also show the output from running rpm -qa 'kernel*'. And finally the output of sudp find /boot.

Hi there, thanks for replying. I managed to fix the issue by executing

sudo dnf reinstall kernel-core

Not sure why it wasn’t install automatically but here are the outputs to what you requested in case you can spot anything else that may be wrong.

I myself am noticing that kernel 6.18.3 is still in the /boot and that option is not even available as a boot option from grub. Is there a command to clean that old stuff up or how can I remove those old kernels?

What I find strange is that in boot/loader/entries I have kernels 6.18.5, 6.18.3 and 6.18.7, while the kernel core listing shows 6.18.5, 6.18.6 and 6.18.7 which makes sense since it keeps the latest 3. Then my boot loading screen shows 4 entries, 6.18.7, 6.18.6, 6.18.5 and 6.18.4.. So the boot/loader/entries do not seem to match what I see.. How do I fix / regenerate this?

I didn’t find anything unusual on your system. But what you can do is run sudo dracut --force to build the initrd for the current running kernel.

For older versions: first run rpm -q kernel. Example

kernel-6.18.5-100.fc42.x86_64
kernel-6.18.5-200.fc43.x86_64
kernel-6.18.6-200.fc43.x86_64

Then take the kernel version which is the string after “kernel-” and run

sudo dracut --kver=6.18.5-100.fc42.x86_64 --force
sudo dracut --kver=6.18.5-200.fc43.x86_64 --force

As a side remark, it is better to copy and paste the output text into your message rather than adding a screen shot.

Screenshot_2026-01-29_17-55-05

If you switch to standard markdown as shown in the image above you can format the copied text by highlighting it and click on ‘</>’.

Hi there, thanks for the help.. I tried dracut –kver but that failed..

sudo rpm -q kernel
kernel-6.18.5-200.fc43.x86_64
kernel-6.18.6-200.fc43.x86_64
kernel-6.18.7-200.fc43.x86_64

then I ran

sudo dracut --kver=kernel-6.18.5-200.fc43.x86_64 --force
realpath: /lib/modules/kernel-6.18.5-200.fc43.x86_64: No such file or directory
dracut[F]: Cannot find module directory
dracut[F]: and --no-kernel was not specified

Then I tried this and had issues as well..

sudo dracut --regenerate-all --force
dracut[F]: Can't write to /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.6-200.fc43.x86_64: Directory /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.6-200.fc43.x86_64 does not exist or is not accessible.

Something is really messed up… Any ideas?

OK so I went and checked in /lib/modules and got it to work for 6.18.5

/lib/modules🔒
ls
6.18.5-200.fc43.x86_64 6.18.6-200.fc43.x86_64 6.18.7-200.fc43.x86_64

/lib/modules🔒
sudo dracut --kver=6.18.5-200.fc43.x86_64 --force

However for 6.18.6 I got this :

/lib/modules🔒
sudo dracut --kver=6.18.6-200.fc43.x86_64 --force
dracut[F]: Can't write to /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.6-200.fc43.x86_64: Directory /boot/efi/ed3991a0a95240cfb5acb6779334be27/6.18.6-200.fc43.x86_64 does not exist or is not accessible.

so I went and checked in the /boot/efi

/lib/modules:locked:
sudo ls -la /boot/efi
total 24
drwx------. 5 root root 4096 Dec 31 1969 .
dr-xr-xr-x. 6 root root 4096 Jan 29 12:37 ..
drwx------. 4 root root 4096 Jul 22 2025 EFI
-rwx------. 1 root root 34 Jul 23 2025 mach_kernel
drwx------. 3 root root 4096 Jul 23 2025 System
drwx------. 2 root root 4096 Feb 10 2025 'System Volume Information'

That id ‘ed3991a0a95240cfb5acb6779334be27’ folder is not there.. How did it figure out to go there? Why is that folder missing? This smells like a bug but not sure.

Last but not least… In my grub boot menu I still see kernel 6.18.4 even though that is nowhere to be found on my system..

So at this point I’m wondering what are my options as there seems to be some kind of mess in the boot loader and failure to regenerate some configs with DRACUT.. What can I do to fix this mess?

What I’m noticing is that the failure in regenerating kernel 6.18.6 actually seems to point to Fedora Linux o-rescue-ed3991a0a95240cfb5acb6779334be27 from my boot screen.. How can that be? Is my grub installation screwed up somehow?

Alright under boot I have the following :
sudo ls -la /boot
total 616348
dr-xr-xr-x. 6 root root 4096 Jan 29 10:18 .
dr-xr-xr-x. 1 root root 194 Jan 29 14:26 ..
-rw-r--r--. 1 root root 294203 Jan 7 19:00 config-6.18.4-200.fc43.x86_64
-rw-r--r--. 1 root root 294203 Jan 10 19:00 config-6.18.5-200.fc43.x86_64
-rw-r--r--. 1 root root 294203 Jan 17 19:00 config-6.18.6-200.fc43.x86_64
-rw-r--r--. 1 root root 294417 Jan 22 19:00 config-6.18.7-200.fc43.x86_64
drwx------. 5 root root 4096 Dec 31 1969 efi
drwx------. 3 root root 4096 Jan 29 14:27 grub2
-rw-------. 1 root root 173988204 Feb 9 2025 initramfs-0-rescue-ed3991a0a95240cfb5acb6779334be27.img
-rw-------. 1 root root 80691204 Jan 28 19:00 initramfs-6.18.4-200.fc43.x86_64.img
-rw-------. 1 root root 79887383 Jan 29 09:56 initramfs-6.18.5-200.fc43.x86_64.img
-rw-------. 1 root root 79890966 Jan 29 09:56 initramfs-6.18.6-200.fc43.x86_64.img
-rw-------. 1 root root 80755887 Jan 29 10:18 initramfs-6.18.7-200.fc43.x86_64.img
drwxr-xr-x. 3 root root 4096 Feb 9 2025 loader
drwx------. 2 root root 16384 Feb 9 2025 lost+found
lrwxrwxrwx. 1 root root 46 Jan 12 11:25 symvers-6.18.4-200.fc43.x86_64.xz -> /lib/modules/6.18.4-200.fc43.x86_64/symvers.xz
lrwxrwxrwx. 1 root root 46 Jan 15 12:47 symvers-6.18.5-200.fc43.x86_64.xz -> /lib/modules/6.18.5-200.fc43.x86_64/symvers.xz
lrwxrwxrwx. 1 root root 46 Jan 26 08:29 symvers-6.18.6-200.fc43.x86_64.xz -> /lib/modules/6.18.6-200.fc43.x86_64/symvers.xz
lrwxrwxrwx. 1 root root 46 Jan 29 10:18 symvers-6.18.7-200.fc43.x86_64.xz -> /lib/modules/6.18.7-200.fc43.x86_64/symvers.xz
-rw-r--r--. 1 root root 11246030 Jan 7 19:00 System.map-6.18.4-200.fc43.x86_64
-rw-r--r--. 1 root root 11246129 Jan 10 19:00 System.map-6.18.5-200.fc43.x86_64
-rw-r--r--. 1 root root 11247275 Jan 17 19:00 System.map-6.18.6-200.fc43.x86_64
-rw-r--r--. 1 root root 11248579 Jan 22 19:00 System.map-6.18.7-200.fc43.x86_64
-rwxr-xr-x. 1 root root 16296296 Feb 9 2025 vmlinuz-0-rescue-ed3991a0a95240cfb5acb6779334be27
-rwxr-xr-x. 1 root root 18343976 Jan 7 19:00 vmlinuz-6.18.4-200.fc43.x86_64
-rw-r--r--. 1 root root 161 Jan 7 19:00 .vmlinuz-6.18.4-200.fc43.x86_64.hmac
-rwxr-xr-x. 1 root root 18343976 Jan 10 19:00 vmlinuz-6.18.5-200.fc43.x86_64
-rw-r--r--. 1 root root 161 Jan 10 19:00 .vmlinuz-6.18.5-200.fc43.x86_64.hmac
-rwxr-xr-x. 1 root root 18343976 Jan 17 19:00 vmlinuz-6.18.6-200.fc43.x86_64
-rw-r--r--. 1 root root 161 Jan 17 19:00 .vmlinuz-6.18.6-200.fc43.x86_64.hmac
-rwxr-xr-x. 1 root root 18356264 Jan 22 19:00 vmlinuz-6.18.7-200.fc43.x86_64
-rw-r--r--. 1 root root 161 Jan 22 19:00 .vmlinuz-6.18.7-200.fc43.x86_64.hmac

and in /lib/modules I have :

sudo ls -la /lib/modules
total 0
drwxr-xr-x. 1 root root 132 Jan 22 19:00 .
dr-xr-xr-x. 1 root root 24274 Jan 29 09:44 ..
drwxr-xr-x. 1 root root 772 Jan 15 12:47 6.18.5-200.fc43.x86_64
drwxr-xr-x. 1 root root 358 Jan 29 14:24 6.18.6-200.fc43.x86_64
drwxr-xr-x. 1 root root 716 Jan 29 10:18 6.18.7-200.fc43.x86_64

I What I can see is that I have under /boot, a lot of old configs that are no longer valid. I did some research and the command sudo grub2-mkconfig -o /boot/grub2/grub.cfg
should sort all the mess out but it doesn’t. Is there something else I should run to clean what shouldn’t be in there?

Update : I tried everything even reinstall 6.18.4 but that package is nowhere to be found.. Can I manually remove any reference to 6.18.4 from /boot or would that brick my system?

According to you ls listing

-rw-------. 1 root root 173988204 Feb  9  2025 initramfs-0-rescue-ed3991a0a95240cfb5acb6779334be27.img 
-rw-------. 1 root root  80691204 Jan 28 19:00 initramfs-6.18.4-200.fc43.x86_64.img 
-rw-------. 1 root root  79887383 Jan 29 09:56 initramfs-6.18.5-200.fc43.x86_64.img 
-rw-------. 1 root root  79890966 Jan 29 09:56 initramfs-6.18.6-200.fc43.x86_64.img 
-rw-------. 1 root root  80755887 Jan 29 10:18 initramfs-6.18.7-200.fc43.x86_64.img 

I see that they are recreated on 29 January at 9:56 and 10:18. So the dracut must have been run successful. The one for 6.18.4-200.fc43.x86_64.img is old anyway so that is not important.

That is not the case. The rescue entry was generated at install time and it is quite normal.

You are right I was able to fix it by reinstall 6.18.6, it was the only way to get it to run.. It was there but just reinstalling it fixed it and was able to run dracut.

6.18.4, that one I can’t even find or install it.. the problem is that executing

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

wont remove 6.18.4 from my boot screen.. I have tried everything and it stays there and refuses to remove it from the /boot directory… Can I physcally erase it from there by

sudo rm /boot/anything 6.8.14 relatred and then recompile grub?

As the command rpm -q kernel doesn’t list 6.18.4, you can remove these files

-rw-r--r--. 1 root root    294203 Jan  7 19:00 config-6.18.4-200.fc43.x86_64 
-rw-------. 1 root root  80691204 Jan 28 19:00 initramfs-6.18.4-200.fc43.x86_64.img 
lrwxrwxrwx. 1 root root        46 Jan 12 11:25 symvers-6.18.4-200.fc43.x86_64.xz
-rw-r--r--. 1 root root  11246030 Jan  7 19:00 System.map-6.18.4-200.fc43.x86_64 
-rwxr-xr-x. 1 root root  18343976 Jan  7 19:00 vmlinuz-6.18.4-200.fc43.x86_64 
-rw-r--r--. 1 root root       161 Jan  7 19:00 .vmlinuz-6.18.4-200.fc43.x86_64.hmac 

Thank you. Alright that part is cleaned and I ran

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

and

sudo dracut --regenerate-all --force

However I still see 6.18.4

This is really stubborn. How do I get that to disappear from the boot menu??

The other strange thing.. 6.18.6 is not even in boot but in /lib/modules………. sorry but the picture but.. this is simpler

6.18.3 should not be there but 6.18.6 should be since it is in /lib/modules.

Just want to confirm one thing in case there is any doubt. I have not messed into this before. All this seemed to have happened through upgrades so there is definitely a bug with the upgrade process.

It may be simpler for you, but very much harder for us and sometime even so hard we won’t even look at it.

By the way, your picture shows something completely different from what has previous been shown.

It is bed time, so good night.

Yeah the picture shows something different because that was a picture taken after I removed 6.18.4, also been trying things out to try and fix this mess.

In the end I ended up doing this

  1. sudo dnf4 remove --oldinstallonly
  2. then I had to manually delete the old configs by end in /boot/loader/entries
  3. sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Now my boot menu shows

  1. 6.8.17

  2. Rescue

  3. Windows

Hopefully when the next kernel is released things will stay in order and not get messed up. Really not sure what happened that my menu would not get generated automatically executing sudo grub2-mkconfig -o /boot/grub2/grub.cfg and not sure why ghost kernels were left in there.

Hopefully this will be useful to someone else who has the same issues.

Thanks for your help @vekruse

grub.cfg doesn’t contain an explicit list of your Fedora kernels to be included in the GRUB menu. Rather it contains the code which GRUB uses to build the menu at boot time from the contents of /boot/loader/entries.

So if you had a stray item in /boot/loader/entries, and the corresponding kernel didn’t disappear from the GRUB menu until that entry was removed, that’s why.

This should never be required if the kernels are removed properly.
sudo dnf remove kernel\*<Version>\* will cleanly remove everything related to that kernel. So for example, to remove kernel 6.18.4 I would use sudo dnf remove kernel\*6.18.4\* and it would remove everything that was installed by that kernel.

Manually removing kernel files without using dnf to perform the removal can easily result in a user having stray files on the system. It also can mean that the rpm database may become out of sync with actually installed packages.

What is the result of running dnf list --installed kernel\* ?
If that shows anything but the 6.18.7 kernel packages (and the 6.18.3 header package) then cleanup will be required.

I also noted that your rescue kernel is from fedora 41. It probably should be updated, and that is easily done with sudo rm /boot/*rescue* and the next kernel update will replace it with the new kernel and release version.

This happened because you apparently removed part of the 6.18.4 files manually and the .conf file for the 6.18.4 kernel remained in /boot/loader/entries. A stray file left by manually removing part of the files and not using the package manager (dnf). The grub menu list of kernels is created by bls from the files located in /boot/loader/entries.

Lingering files of this sort is why it is always best to use dnf to manage kernels and to allow it to perform the installation of new kernels and removal of older kernels as it is designed to do.

The answer to your earlier question about the 6.18.3 package is that the package kernel-headers-6.18.3-200.fc43.x86_64 is a perfectly valid package even with the kernel version at 6.18.7. The headers do not get updated frequently so the older package often remains until a header update occurs.

Hey Jeff.. You seem very keen to place the blame on the person because you assume they themselves didn’t follow procedure and that it is impossible that perhaps there was a bug caused by the upgrade. Not sure if it is because you didn’t pay attention to what I said but I did say that in the end I had to remove things MANUALLY because doing the sudo dnf remove kernel*<Version>* procedure and all others that I found DID NOT WORK! I also did say that all these left overs like kernel 6.18.3 that 6.18.4 are things I noticed as I looked around further. It is only then that I confirmed with VILLY that I could remove the left overs from /boot/load/entries including those in /boot. Now if you want to continue believing that somehow I fucked up that is on you. I have never installed or removed a kernel before because I never had to.

Just a recommendation, before you make assumptions, ask first. Again to make sure you get it right this time, kernel updates only made it into my system via “dnf upgrade” and the issues I experienced and what I noticed I only saw them because I started noticing something weird things during boot time which I also reported in another post that someone else also experienced following an update

That is when I noticed 6.18.4 being in /boot but not in the /lib/modules and same for 6.18.3.

As for what I saw via dnf list --installed kernel* that was the exact content found in /lib/modules. 6.18.5, 6.18.6 and 6.18.7… I had to reinstall 6.18.6 because that was somehow NOT in /boot when it should have been.. And again I never tempered manually with those before.

Yeah I noticed that after looking further to understand how all this works. I’m not sure what happened. It was only by looking around that I noticed more unusual things such as 6.18.3 in /boot for example which should have been removed through updates.. I never touched that myself manually. Same thing with 6.18.4 that stayed behind but was somehow not removed from /boot/loader/entries.. Of 6.18.6 that was in /lib/modules but not in /boot. All I can say is that all of these updates were done through upgrades “dnf upgrade”, I never installed or remove a kernel manually, never had to.

I’m sorry that you feel offended.

I did a full review of this entire thread and you did say you removed kernels but nowhere did you reveal how the kernels were removed, whether manually or using the dnf package manager. The apparent leftover file in /boot/loader/entries for the 6.18.4 kernel (that had already been removed but was still showing up in the grub menu) led me to believe removal may not have been done with the package manager. We on this forum can only know the details that you share, and our suggestions are based on past experiences and information received (even if that information does not contain quite enough detail.)

I have seen several instances where users manually removed the kernel files in /boot and did not use the package manager to remove the kernels. This leaves the system believing those kernels may still be installed, it leaves left-over files in /boot/loader/entries (which still show up on the grub menu) as well as in /usr/lib/module. When this happens there seem times where the package manager cannot perform removals properly because of missing files when it attempts to remove them so it sometimes fails even when success is indicated.

There have been cases where reinstalling a kernel version was necessary before it could be cleanly removed.

1 Like