# Keep running out of space building ramfs or maybe not?

**URL:** <https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585>\
**Category:** Rocky Linux Help & Support\
**Created:** [June 8, 2026, 4:12pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585 "2026-06-08T16:12:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 8, 2026, 4:12pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/1 "2026-06-08T16:12:04Z")

</div>

Hello,

I am new to Linux and experiencing a recurring issue for which I have no idea as to why it happens.

Every so often after an update I will ge a message saying the vlinuz img cannot be found and I have to use the previous kernel.

When I boot to the older kernel I get the following and use dracut to regenerate, I get the following:

sudo dracut -f --regenerate-all

dracut[F]: Can’t write to /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.55.1.el10\_1.x86\_64: Directory /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.55.1.el10\_1.x86\_64 does not exist or is not accessible.  
cp: error writing ‘/boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp’: No space left on device  
dracut[F]: Creation of /boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp failed  
cp: error writing ‘/boot/initramfs-6.12.0-211.18.1.el10\_2.x86\_64.img’: No space left on device  
dracut[F]: Creation of /boot/initramfs-6.12.0-211.18.1.el10\_2.x86\_64.img failed

When I check the space usage, this is what I see?

df -h /boot/  
Filesystem Size Used Avail Use% Mounted on  
/dev/nvme0n1p2 960M 649M 312M 68% /boot

it doesn’t look like im at a 100%

How do I fix the issue and boot to the newer kernel? Any help, advise or guidance is appreciated.

---

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [June 8, 2026, 4:20pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/2 "2026-06-08T16:20:04Z")

</div>

> [@jft](#):
>
> df -h /boot/efi

No space left on /boot is not the same thing as /boot/efi

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 8, 2026, 7:16pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/3 "2026-06-08T19:16:54Z")

</div>

ahhhh ok…thank you.I have reworked the command and posted the results. Can you provide some guidance now?

---

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [June 8, 2026, 8:05pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/4 "2026-06-08T20:05:32Z")

</div>

rpm -q kernel

ls /boot

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 8, 2026, 10:13pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/5 "2026-06-08T22:13:56Z")

</div>

These are the results

rpm -q kernel  
kernel-6.12.0-124.56.1.el10\_1.x86\_64  
kernel-6.12.0-211.16.1.el10\_2.0.1.x86\_64  
kernel-6.12.0-211.18.1.el10\_2.x86\_64

❯ ls /boot  
config-6.12.0-124.56.1.el10\_1.x86\_64 loader  
config-6.12.0-211.16.1.el10\_2.0.1.x86\_64 memtest86+x64.efi  
config-6.12.0-211.18.1.el10\_2.x86\_64 symvers-6.12.0-124.56.1.el10\_1.x86\_64.xz  
efi symvers-6.12.0-211.16.1.el10\_2.0.1.x86\_64.xz  
extlinux System.map-6.12.0-124.56.1.el10\_1.x86\_64  
grub2 System.map-6.12.0-211.16.1.el10\_2.0.1.x86\_64  
initramfs-0-rescue-349ff817715b4c70a3dc6c6f88c67f90.img System.map-6.12.0-211.18.1.el10\_2.x86\_64  
initramfs-6.12.0-124.56.1.el10\_1.x86\_64.img vmlinuz-0-rescue-349ff817715b4c70a3dc6c6f88c67f90  
initramfs-6.12.0-124.56.1.el10\_1.x86\_64kdump.img vmlinuz-6.12.0-124.56.1.el10\_1.x86\_64  
initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img vmlinuz-6.12.0-211.16.1.el10\_2.0.1.x86\_64  
initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64kdump.img vmlinuz-6.12.0-211.18.1.el10\_2.x86\_64

---

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [June 8, 2026, 11:27pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/6 "2026-06-08T23:27:45Z")

</div>

I don’t see anything out of order there.

You could try deleting the oldest kernel you have installed and see if it works as expected after that.

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [June 9, 2026, 8:33am UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/7 "2026-06-09T08:33:19Z")

</div>

You could try adding the following line to the [main] section in /etc/dnf/dnf.conf

`installonly_limit=2`

This will only keep 2 versions of the kernel/initramfs in /boot - which should save space

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 10, 2026, 1:22am UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/8 "2026-06-10T01:22:27Z")

</div>

I did a sudo dnf remove --oldinstallonly

and edited the /etc/dnf/dnf.conf

`installonly_limit=2`

I tried running dracut -f --regenerate-all but still get this

dracut[F]: Can’t write to /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.55.1.el10\_1.x86\_64: Directory /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.55.1.el10\_1.x86\_64 does not exist or is not accessible.  
dracut[F]: Can’t write to /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.56.1.el10\_1.x86\_64: Directory /boot/efi/349ff817715b4c70a3dc6c6f88c67f90/6.12.0-124.56.1.el10\_1.x86\_64 does not exist or is not accessible.  
cp: error writing ‘/boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp’: No space left on device  
dracut[F]: Creation of /boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp failed  
cp: error writing ‘/boot/initramfs-6.12.0-211.18.1.el10\_2.x86\_64.img’: No space left on device  
dracut[F]: Creation of /boot/initramfs-6.12.0-211.18.1.el10\_2.x86\_64.img failed

some of the images aren’t even found

rpm -q kernel  
kernel-6.12.0-211.16.1.el10\_2.0.1.x86\_64  
kernel-6.12.0-211.18.1.el10\_2.x86\_64

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [June 11, 2026, 1:03pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/9 "2026-06-11T13:03:22Z")

</div>

When using the `--regenerate-all` option, dracut will look for the files /lib/modules/\*/modules.dep - maybe you have old /lib/modules directories that exist with a modules.dep file, but with no matching installed kernel ?

If I create a bogus kernel version directory under /lib/modules/ containing an empty modules.dep file, I get a similar ‘does not exist or is not accessible’ warning when running `dracut --regenerate-all`- although I don’t get the ‘No space left on device’ errors

What happens if you just run `dracut -f` ?

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 11, 2026, 1:50pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/10 "2026-06-11T13:50:37Z")

</div>

This is what I get but this is the current kernel that I am booting too because the .18 version of ther kernel can’t find the img file at boot

sudo dracut -f

cp: error writing ‘/boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp’: No space left on device  
dracut[F]: Creation of /boot/initramfs-6.12.0-211.16.1.el10\_2.0.1.x86\_64.img.tmp failed

---

<div class="post-metadata">

**Author:** ![james-p](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@james-p](https://forums.rockylinux.org/u/james-p)\
**Post date:** [June 11, 2026, 3:52pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/11 "2026-06-11T15:52:46Z")

</div>

How much space do you have in /boot (`df -h /boot`) and what is the size of the files in /boot (`ls -lh /boot`) ?

Can you create an initramfs file elsewhere by running something like: `dracut /tmp/initramfs`

What is size of this /tmp/initramfs file ?

---

<div class="post-metadata">

**Author:** ![joephi](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@joephi](https://forums.rockylinux.org/u/joephi)\
**Post date:** [June 12, 2026, 10:50pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/12 "2026-06-12T22:50:00Z")

</div>

On a disturbingly regular basis, I run into this “all the time”. Whether it’s Rocky’s/EL’s dracut or Debian’s mkinitramfs, I end up removing the oldest kernel and retrying. That frees up enough space on /boot to have do its thing. To me, the installation defaults are inadequate, I usually override them with a 2GB ESP (/boot/efi) and a 2GB /boot. I know that doesn’t help you much now, but for the future, go nuts with space for those two areas during installations. Later on someone commented on the number of retained kernels, that too is a knob which can be turned so you don’t have to manually remove kernels then reattempt installation of the newest.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [June 13, 2026, 8:20am UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/13 "2026-06-13T08:20:45Z")

</div>

> [@jft](#):
>
> ```bash
> # ls /boot
> efi
> extlinux
> grub2
> loader
> memtest86+x64.efi
> config-6.12.0-124.56.1.el10_1.x86_64
> config-6.12.0-211.16.1.el10_2.0.1.x86_64
> config-6.12.0-211.18.1.el10_2.x86_64
> symvers-6.12.0-124.56.1.el10_1.x86_64.xz
> symvers-6.12.0-211.16.1.el10_2.0.1.x86_64.xz
> System.map-6.12.0-124.56.1.el10_1.x86_64
> System.map-6.12.0-211.16.1.el10_2.0.1.x86_64
> System.map-6.12.0-211.18.1.el10_2.x86_64
> vmlinuz-0-rescue-349ff817715b4c70a3dc6c6f88c67f90
> vmlinuz-6.12.0-124.56.1.el10_1.x86_64
> vmlinuz-6.12.0-211.16.1.el10_2.0.1.x86_64
> vmlinuz-6.12.0-211.18.1.el10_2.x86_64
> initramfs-0-rescue-349ff817715b4c70a3dc6c6f88c67f90.img 
> initramfs-6.12.0-124.56.1.el10_1.x86_64.img
> initramfs-6.12.0-124.56.1.el10_1.x86_64kdump.img
> initramfs-6.12.0-211.16.1.el10_2.0.1.x86_64.img
> initramfs-6.12.0-211.16.1.el10_2.0.1.x86_64kdump.img
> 
> ```

Do note how there are (usually) five files per kernel:  
_config, symvers, System.map, vmlinuz_, and _initramfs_

In addition, there is a _kdump_ version of initramfs for each kernel.  
Those are unnecessary, unless one actually intends to resort to kdump to debug kernel failures.

Furthermore, there are vmlinuz-0-rescue and initramfs-0-rescue.  
`rpm -qa \*rescue\*` should list a package that creates the rescue version.

* * *

`lsblk -f` and `df -h /boot /boot/efi` do show disk sizes.  
`du -d1 -h -x /boot` and `du -d1 -h /boot/efi` do show disk usage in another way.

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 14, 2026, 1:06pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/14 "2026-06-14T13:06:15Z")

</div>

Thank you, I get the same no space on device error

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 14, 2026, 1:06pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/15 "2026-06-14T13:06:41Z")

</div>

I appreciate the conclusion and can agree.

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 14, 2026, 1:10pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/16 "2026-06-14T13:10:57Z")

</div>

These are my outputs

rpm -qa \*rescue\*  
dracut-config-rescue-107-4.el10.x86\_64

❯ sudo du -d1 -h -x /boot  
1.1M /boot/extlinux  
2.4M /boot/grub2  
16K /boot/loader  
606M /boot

45M /boot/efi/EFI  
4.0K /boot/efi/System Volume Information  
45M /boot/efi

---

<div class="post-metadata">

**Author:** ![jft](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jft](https://forums.rockylinux.org/u/jft)\
**Post date:** [June 14, 2026, 1:44pm UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/17 "2026-06-14T13:44:24Z")

</div>

The following has resolved it:

sudo dnf autoremove

sudo rm -f /boot/_rescue_

sudo rm -rf /var/crash/\*

sudo dracut -f --regenerate-all

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [June 15, 2026, 8:57am UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/18 "2026-06-15T08:57:34Z")

</div>

> [@jft](#):
>
> sudo rm -f /boot/_rescue_

Do note that there is a `/boot/loader/entries/*.conf` file for each kernel.  
They populate the GRUB menu.

> [@jft](#):
>
> dracut-config-rescue-107-4.el10.x86\_64

When you install next kernel, the package `dracut-config-rescue` creates the rescue kernel and initramfs into /boot (and entry file to /boot/loader/entries/).  
If you don’t want the rescue kernel to return, then `sudo dnf rm dracut-config-rescue`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [August 14, 2026, 8:58am UTC](https://forums.rockylinux.org/t/keep-running-out-of-space-building-ramfs-or-maybe-not/20585/19 "2026-08-14T08:58:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
