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.
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
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
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
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.
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.