How do i extend /boot partition capacity?

I ran out of space on my /boot partition, I tried to use gparted and it wouldnt allow me to extend a middle partition.

lsblk -o name,type,fstype,size,fsavail,mountpoints

NAME TYPE FSTYPE SIZE FSAVAIL MOUNTPOINTS
sr0 rom 1024M
vda disk 256G
├─vda1 part vfat 600M 591.5M /boot/efi
├─vda2 part xfs 1G 172K /boot
└─vda3 part LVM2_member 126.4G
├─rl-root lvm xfs 70G 60.9G /
├─rl-swap lvm swap 3.9G [SWAP]
└─rl-home lvm xfs 52.5G 48.4G /home

Red Hat recommends 1 GB /boot.
What is consuming space in /boot?

ls -lhS /boot
du -d1 -h /boot

  1. It is not possible to shrink existing XFS
  2. gparted does not, AFAIK, support LVM

One could “juggle”. Create vda4. Make it PV. Add it to VG “rl”. Remove swap. pvmove “rl-root” and “rl-home” to the PV in vda4. Remove vda3 from VG “rl”. Remove vda3. Do what one must to vda2. Add swap.

Does not sound very nice.

# ls -lhS /boot
total 806M
-rw-------.  1 root root 110M Mar 27 11:29 initramfs-0-rescue-ac803aed05e34bb99c56aaafd97a3cc4.img
-rw-------.  1 root root  53M Apr 26 11:10 initramfs-6.8.7-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  53M Mar 28 16:00 initramfs-6.8.2-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  53M Mar 28 16:01 initramfs-6.1.83-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  52M Apr 10 10:45 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64.img
-rw-------.  1 root root  52M Apr 26 11:10 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64+rt.img
-rw-------.  1 root root  52M Mar 27 11:41 initramfs-5.14.0-362.24.1.el9_3.aarch64.img
-rw-------.  1 root root  52M Mar 27 11:41 initramfs-5.14.0-362.8.1.el9_3.aarch64.img
-rw-------.  1 root root  52M Mar 27 14:13 initramfs-5.14.0-362.24.1.el9_3.aarch64+rt.img
-rw-------.  1 root root  30M Mar 28 16:11 initramfs-6.1.83-1.el9.elrepo.aarch64kdump.img
-rw-------.  1 root root  30M Mar 27 11:36 initramfs-5.14.0-362.8.1.el9_3.aarch64kdump.img
-rw-------.  1 root root  30M Apr 10 11:08 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64kdump.img
-rw-------.  1 root root  30M Mar 27 11:42 initramfs-5.14.0-362.24.1.el9_3.aarch64kdump.img
-rwxr-xr-x.  1 root root  12M Apr 17 10:30 vmlinuz-6.8.7-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 10:21 vmlinuz-6.8.2-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Apr  4 12:23 vmlinuz-5.14.0-362.24.1.el9_3.0.1.aarch64
-rwxr-xr-x.  1 root root  12M Mar 13 12:06 vmlinuz-5.14.0-362.24.1.el9_3.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 11:29 vmlinuz-0-rescue-ac803aed05e34bb99c56aaafd97a3cc4
-rwxr-xr-x.  1 root root  12M Nov  8  2023 vmlinuz-5.14.0-362.8.1.el9_3.aarch64
-rwxr-xr-x.  1 root root  12M Apr 17 09:49 vmlinuz-6.1.87-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 09:47 vmlinuz-6.1.83-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Apr  4 12:15 vmlinuz-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rwxr-xr-x.  1 root root  12M Mar 13 11:53 vmlinuz-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-------.  1 root root 5.7M Apr  4 12:23 System.map-5.14.0-362.24.1.el9_3.0.1.aarch64
-rw-------.  1 root root 5.7M Mar 13 12:06 System.map-5.14.0-362.24.1.el9_3.aarch64
-rw-------.  1 root root 5.7M Nov  8  2023 System.map-5.14.0-362.8.1.el9_3.aarch64
-rw-------.  1 root root 5.7M Apr  4 12:15 System.map-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rw-------.  1 root root 5.7M Mar 13 11:53 System.map-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-------.  1 root root 4.5M Apr 17 10:30 System.map-6.8.7-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.5M Mar 27 10:20 System.map-6.8.2-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.2M Apr 17 09:49 System.map-6.1.87-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.2M Mar 27 09:47 System.map-6.1.83-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 255K Apr 17 10:30 config-6.8.7-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 254K Mar 27 10:20 config-6.8.2-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 240K Mar 27 09:47 config-6.1.83-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 240K Apr 17 09:49 config-6.1.87-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 198K Apr  4 12:15 config-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rw-r--r--.  1 root root 198K Mar 13 11:53 config-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-r--r--.  1 root root 196K Apr  4 12:23 config-5.14.0-362.24.1.el9_3.0.1.aarch64
-rw-r--r--.  1 root root 196K Mar 13 12:06 config-5.14.0-362.24.1.el9_3.aarch64
-rw-r--r--.  1 root root 196K Nov  8  2023 config-5.14.0-362.8.1.el9_3.aarch64
-rw-------.  1 root root 6.5K Apr  3 11:08 grub2.cfg
drwx------.  3 root root 4.0K Dec 31  1969 efi
drwxr-xr-x. 11 root root  129 Apr 10 10:44 dtb-5.14.0-362.24.1.el9_3.0.1.aarch64
drwxr-xr-x. 11 root root  129 Apr 26 11:09 dtb-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
drwxr-xr-x. 11 root root  129 Mar 27 11:40 dtb-5.14.0-362.24.1.el9_3.aarch64
drwxr-xr-x. 11 root root  129 Mar 27 14:12 dtb-5.14.0-362.24.1.el9_3.aarch64+rt
drwxr-xr-x. 11 root root  129 Mar 27 11:28 dtb-5.14.0-362.8.1.el9_3.aarch64
drwxr-xr-x. 10 root root  114 Mar 28 16:00 dtb-6.1.83-1.el9.elrepo.aarch64
drwxr-xr-x. 10 root root  114 Mar 28 16:00 dtb-6.8.2-1.el9.elrepo.aarch64
drwxr-xr-x. 10 root root  114 Apr 26 11:09 dtb-6.8.7-1.el9.elrepo.aarch64
lrwxrwxrwx.  1 root root   60 Apr 26 11:09 symvers-5.14.0-362.24.1.el9_3.0.1.aarch64+rt.gz -> /lib/modules/5.14.0-362.24.1.el9_3.0.1.aarch64+rt/symvers.gz
drwxr-xr-x.  6 root root   57 Apr 26 11:09 dtb-6.1.87-1.el9.elrepo.aarch64
lrwxrwxrwx.  1 root root   57 Apr 10 10:45 symvers-5.14.0-362.24.1.el9_3.0.1.aarch64.gz -> /lib/modules/5.14.0-362.24.1.el9_3.0.1.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   56 Mar 27 14:13 symvers-5.14.0-362.24.1.el9_3.aarch64+rt.gz -> /lib/modules/5.14.0-362.24.1.el9_3.aarch64+rt/symvers.gz
lrwxrwxrwx.  1 root root   53 Mar 27 11:41 symvers-5.14.0-362.24.1.el9_3.aarch64.gz -> /lib/modules/5.14.0-362.24.1.el9_3.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   52 Mar 27 11:29 symvers-5.14.0-362.8.1.el9_3.aarch64.gz -> /lib/modules/5.14.0-362.8.1.el9_3.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   51 Mar 28 16:01 symvers-6.1.83-1.el9.elrepo.aarch64.gz -> /lib/modules/6.1.83-1.el9.elrepo.aarch64/symvers.gz
drwx------.  3 root root   50 Apr 22 12:52 grub2
lrwxrwxrwx.  1 root root   50 Mar 28 16:00 symvers-6.8.2-1.el9.elrepo.aarch64.gz -> /lib/modules/6.8.2-1.el9.elrepo.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   50 Apr 26 11:10 symvers-6.8.7-1.el9.elrepo.aarch64.gz -> /lib/modules/6.8.7-1.el9.elrepo.aarch64/symvers.gz
drwxr-xr-x.  3 root root   21 Mar 27 11:28 loader
# du -d1 -h /boot
7.3M	/boot/efi
2.3M	/boot/grub2
40K	/boot/loader
9.1M	/boot/dtb-5.14.0-362.8.1.el9_3.aarch64
9.1M	/boot/dtb-5.14.0-362.24.1.el9_3.aarch64
9.1M	/boot/dtb-5.14.0-362.24.1.el9_3.aarch64+rt
25M	/boot/dtb-6.8.2-1.el9.elrepo.aarch64
17M	/boot/dtb-6.1.83-1.el9.elrepo.aarch64
9.1M	/boot/dtb-5.14.0-362.24.1.el9_3.0.1.aarch64
9.1M	/boot/dtb-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
25M	/boot/dtb-6.8.7-1.el9.elrepo.aarch64
1.3M	/boot/dtb-6.1.87-1.el9.elrepo.aarch64
928M	/boot

You seem to have 9 kernels installed and kdump initramfs images for some too. How many kernels do you really need? I would start by removing old, unused kernels.


Look at outputs of:

dnf rq --installonly
dnf rq --installonly --latest=-3

If (for example) the latter list looks like “unnecessary packages”, then one could:

dnf remove $(dnf rq --installonly --latest=-3)
1 Like

I only use 5.14.0-362.24.1.el9_3.0.1.aarch64+rt. I tried to remove the others but no success in removing them.

# sudo dnf rq --installonly
kernel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-core-0:5.14.0-362.8.1.el9_3.aarch64
kernel-devel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-devel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-lt-core-0:6.1.83-1.el9.elrepo.aarch64
kernel-lt-core-0:6.1.87-1.el9.elrepo.aarch64
kernel-ml-0:6.8.7-1.el9.elrepo.aarch64
kernel-ml-core-0:6.8.2-1.el9.elrepo.aarch64
kernel-ml-core-0:6.8.7-1.el9.elrepo.aarch64
kernel-ml-modules-0:6.8.7-1.el9.elrepo.aarch64
kernel-modules-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-modules-0:5.14.0-362.24.1.el9_3.aarch64
kernel-modules-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-modules-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-devel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-devel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-modules-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-modules-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-modules-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-modules-core-0:5.14.0-362.24.1.el9_3.aarch64
# dnf rq --installonly --latest=3
kernel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-core-0:5.14.0-362.8.1.el9_3.aarch64
kernel-devel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-devel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-lt-core-0:6.1.83-1.el9.elrepo.aarch64
kernel-lt-core-0:6.1.87-1.el9.elrepo.aarch64
kernel-ml-0:6.8.7-1.el9.elrepo.aarch64
kernel-ml-core-0:6.8.2-1.el9.elrepo.aarch64
kernel-ml-core-0:6.8.7-1.el9.elrepo.aarch64
kernel-ml-modules-0:6.8.7-1.el9.elrepo.aarch64
kernel-modules-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-modules-0:5.14.0-362.24.1.el9_3.aarch64
kernel-modules-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-modules-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-core-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-devel-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-devel-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-modules-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-modules-0:5.14.0-362.24.1.el9_3.aarch64
kernel-rt-modules-core-0:5.14.0-362.24.1.el9_3.0.1.aarch64
kernel-rt-modules-core-0:5.14.0-362.24.1.el9_3.aarch64

running both the output looks the same.

I tried this and it didnt seem to work

# dnf remove --oldinstallonly
Dependencies resolved.
================================================================================
 Package                  Arch      Version                  Repository    Size
================================================================================
Removing:
 kernel                   aarch64   5.14.0-362.24.1.el9_3    @baseos        0  
 kernel-core              aarch64   5.14.0-362.8.1.el9_3     @@System      72 M
 kernel-core              aarch64   5.14.0-362.24.1.el9_3    @baseos       72 M
 kernel-devel             aarch64   5.14.0-362.24.1.el9_3    @appstream    61 M
 kernel-lt-core           aarch64   6.1.83-1.el9.elrepo      @@System     112 M
 kernel-ml-core           aarch64   6.8.2-1.el9.elrepo       @@System     133 M
 kernel-modules           aarch64   5.14.0-362.24.1.el9_3    @baseos       18 M
 kernel-modules-core      aarch64   5.14.0-362.24.1.el9_3    @baseos       20 M
 kernel-rt                aarch64   5.14.0-362.24.1.el9_3    @devel         0  
 kernel-rt-core           aarch64   5.14.0-362.24.1.el9_3    @devel        72 M
 kernel-rt-devel          aarch64   5.14.0-362.24.1.el9_3    @devel        61 M
 kernel-rt-modules        aarch64   5.14.0-362.24.1.el9_3    @devel        18 M
 kernel-rt-modules-core   aarch64   5.14.0-362.24.1.el9_3    @devel        20 M

Transaction Summary
================================================================================
Remove  13 Packages

Freed space: 659 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Erasing          : kernel-rt-5.14.0-362.24.1.el9_3.aarch64               1/13 
  Erasing          : kernel-5.14.0-362.24.1.el9_3.aarch64                  2/13 
  Running scriptlet: kernel-5.14.0-362.24.1.el9_3.aarch64                  2/13 
  Erasing          : kernel-modules-5.14.0-362.24.1.el9_3.aarch64          3/13 
  Running scriptlet: kernel-modules-5.14.0-362.24.1.el9_3.aarch64          3/13 
  Erasing          : kernel-rt-modules-5.14.0-362.24.1.el9_3.aarch64       4/13 
  Running scriptlet: kernel-rt-modules-5.14.0-362.24.1.el9_3.aarch64       4/13 
  Erasing          : kernel-rt-modules-core-5.14.0-362.24.1.el9_3.aarch    5/13 
  Running scriptlet: kernel-rt-modules-core-5.14.0-362.24.1.el9_3.aarch    5/13 
  Running scriptlet: kernel-rt-core-5.14.0-362.24.1.el9_3.aarch64          6/13 
ln: failed to create symbolic link '/boot/dtb': No space left on device
error: %preun(kernel-rt-core-5.14.0-362.24.1.el9_3.aarch64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-rt-core
  Erasing          : kernel-modules-core-5.14.0-362.24.1.el9_3.aarch64     7/13 
error: kernel-rt-core-5.14.0-362.24.1.el9_3.aarch64: erase failed

  Running scriptlet: kernel-modules-core-5.14.0-362.24.1.el9_3.aarch64     7/13 
  Running scriptlet: kernel-core-5.14.0-362.24.1.el9_3.aarch64             8/13 
ln: failed to create symbolic link '/boot/dtb': No space left on device
error: %preun(kernel-core-5.14.0-362.24.1.el9_3.aarch64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-core
  Erasing          : kernel-rt-devel-5.14.0-362.24.1.el9_3.aarch64         9/13 
error: kernel-core-5.14.0-362.24.1.el9_3.aarch64: erase failed

  Running scriptlet: kernel-ml-core-6.8.2-1.el9.elrepo.aarch64            10/13 
ln: failed to create symbolic link '/boot/dtb': No space left on device
error: %preun(kernel-ml-core-6.8.2-1.el9.elrepo.aarch64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-ml-core
  Running scriptlet: kernel-lt-core-6.1.83-1.el9.elrepo.aarch64           11/13 
error: kernel-ml-core-6.8.2-1.el9.elrepo.aarch64: erase failed
ln: failed to create symbolic link '/boot/dtb': No space left on device
error: %preun(kernel-lt-core-6.1.83-1.el9.elrepo.aarch64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-lt-core
  Erasing          : kernel-devel-5.14.0-362.24.1.el9_3.aarch64           12/13 
error: kernel-lt-core-6.1.83-1.el9.elrepo.aarch64: erase failed

  Running scriptlet: kernel-core-5.14.0-362.8.1.el9_3.aarch64             13/13 
ln: failed to create symbolic link '/boot/dtb': No space left on device
error: %preun(kernel-core-5.14.0-362.8.1.el9_3.aarch64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-core
error: kernel-core-5.14.0-362.8.1.el9_3.aarch64: erase failed

  Verifying        : kernel-5.14.0-362.24.1.el9_3.aarch64                  1/13 
  Verifying        : kernel-core-5.14.0-362.8.1.el9_3.aarch64              2/13 
  Verifying        : kernel-core-5.14.0-362.24.1.el9_3.aarch64             3/13 
  Verifying        : kernel-devel-5.14.0-362.24.1.el9_3.aarch64            4/13 
  Verifying        : kernel-lt-core-6.1.83-1.el9.elrepo.aarch64            5/13 
  Verifying        : kernel-ml-core-6.8.2-1.el9.elrepo.aarch64             6/13 
  Verifying        : kernel-modules-5.14.0-362.24.1.el9_3.aarch64          7/13 
  Verifying        : kernel-modules-core-5.14.0-362.24.1.el9_3.aarch64     8/13 
  Verifying        : kernel-rt-5.14.0-362.24.1.el9_3.aarch64               9/13 
  Verifying        : kernel-rt-core-5.14.0-362.24.1.el9_3.aarch64         10/13 
  Verifying        : kernel-rt-devel-5.14.0-362.24.1.el9_3.aarch64        11/13 
  Verifying        : kernel-rt-modules-5.14.0-362.24.1.el9_3.aarch64      12/13 
  Verifying        : kernel-rt-modules-core-5.14.0-362.24.1.el9_3.aarch   13/13 

Removed:
  kernel-5.14.0-362.24.1.el9_3.aarch64                                          
  kernel-devel-5.14.0-362.24.1.el9_3.aarch64                                    
  kernel-modules-5.14.0-362.24.1.el9_3.aarch64                                  
  kernel-modules-core-5.14.0-362.24.1.el9_3.aarch64                             
  kernel-rt-5.14.0-362.24.1.el9_3.aarch64                                       
  kernel-rt-devel-5.14.0-362.24.1.el9_3.aarch64                                 
  kernel-rt-modules-5.14.0-362.24.1.el9_3.aarch64                               
  kernel-rt-modules-core-5.14.0-362.24.1.el9_3.aarch64                          
Failed:
  kernel-core-5.14.0-362.8.1.el9_3.aarch64                                      
  kernel-core-5.14.0-362.24.1.el9_3.aarch64                                     
  kernel-lt-core-6.1.83-1.el9.elrepo.aarch64                                    
  kernel-ml-core-6.8.2-1.el9.elrepo.aarch64                                     
  kernel-rt-core-5.14.0-362.24.1.el9_3.aarch64                                  

Error: Transaction failed

Try deleting the oldest kernel rather than using dnf remove. dnf seems to want to create a symbolic link for which there is no space left, so the process fails. Once that oldest kernel is deleted you should have enough space to remove the rest of them with dnf remove.

The rescue kernel is all generated, not from any package. Therefore, its files can be deleted with rm:

rm /boot/*rescue* /boot/loader/entries/*rescue*

That will give space for dnf to do things. (The install of next kernel will probably re-create the rescue.)

(If you want to keep, rather than remove, the rescue kernel, then move those files to another filesystem temporarily.)

1 Like

Hi,
you can easily remove most of your initrd images manually (since they’ll have to be removed manually anyway - they’re NOT a part of the kernel package):

Of course LEAVE THE ONE YOU’RE USING :rofl: :upside_down_face:

Edit: then of course remove all the unnecessary kernels.

Really? While no package actually has initramfs-file, the kernel-core claims ownership:

# rpm -qf /boot/init*
file /boot/initramfs-0-rescue-864..f2d.img is not owned by any package
kernel-core-5.14.0-427.26.1.el9_4.x86_64
kernel-core-5.14.0-427.28.1.el9_4.x86_64

# rpm -ql kernel-core-5.14.0-427.28.1.el9_4.x86_64 | grep init
/boot/initramfs-5.14.0-427.28.1.el9_4.x86_64.img

and removal of kernel-core-X does automatically remove corresponding /boot/initramfs-X.img


The “rescue” are a copy of vmlinuz and a “fat options” initramfs that dracut (optionally) adds. Their removal should give enough space for dnf to work.

You’re right, of course. I made a little brain fart, guilty as charged (I always remove backups manually, hence my association).
But still - it doesn’t contradict the statement that manual removal of old initrd images is completely safe :innocent:

Thank you, sorry for the late reply

do i just do rm
the only kernel im using is 5.14.0-362.24.1.el9_3.0.1.aarch64+rt all other’s im looking to delete

$ ls -lhS /boot
total 806M
-rw-------.  1 root root 110M Mar 27 11:29 initramfs-0-rescue-ac803aed05e34bb99c56aaafd97a3cc4.img
-rw-------.  1 root root  53M Apr 26 11:10 initramfs-6.8.7-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  53M Mar 28 16:00 initramfs-6.8.2-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  53M Mar 28 16:01 initramfs-6.1.83-1.el9.elrepo.aarch64.img
-rw-------.  1 root root  52M Apr 10 10:45 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64.img
-rw-------.  1 root root  52M Apr 26 11:10 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64+rt.img
-rw-------.  1 root root  52M Mar 27 11:41 initramfs-5.14.0-362.24.1.el9_3.aarch64.img
-rw-------.  1 root root  52M Mar 27 11:41 initramfs-5.14.0-362.8.1.el9_3.aarch64.img
-rw-------.  1 root root  52M Mar 27 14:13 initramfs-5.14.0-362.24.1.el9_3.aarch64+rt.img
-rw-------.  1 root root  30M Mar 28 16:11 initramfs-6.1.83-1.el9.elrepo.aarch64kdump.img
-rw-------.  1 root root  30M Mar 27 11:36 initramfs-5.14.0-362.8.1.el9_3.aarch64kdump.img
-rw-------.  1 root root  30M Apr 10 11:08 initramfs-5.14.0-362.24.1.el9_3.0.1.aarch64kdump.img
-rw-------.  1 root root  30M Mar 27 11:42 initramfs-5.14.0-362.24.1.el9_3.aarch64kdump.img
-rwxr-xr-x.  1 root root  12M Apr 17 10:30 vmlinuz-6.8.7-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 10:21 vmlinuz-6.8.2-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Apr  4 12:23 vmlinuz-5.14.0-362.24.1.el9_3.0.1.aarch64
-rwxr-xr-x.  1 root root  12M Mar 13 12:06 vmlinuz-5.14.0-362.24.1.el9_3.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 11:29 vmlinuz-0-rescue-ac803aed05e34bb99c56aaafd97a3cc4
-rwxr-xr-x.  1 root root  12M Nov  8  2023 vmlinuz-5.14.0-362.8.1.el9_3.aarch64
-rwxr-xr-x.  1 root root  12M Apr 17 09:49 vmlinuz-6.1.87-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Mar 27 09:47 vmlinuz-6.1.83-1.el9.elrepo.aarch64
-rwxr-xr-x.  1 root root  12M Apr  4 12:15 vmlinuz-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rwxr-xr-x.  1 root root  12M Mar 13 11:53 vmlinuz-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-------.  1 root root 5.7M Apr  4 12:23 System.map-5.14.0-362.24.1.el9_3.0.1.aarch64
-rw-------.  1 root root 5.7M Mar 13 12:06 System.map-5.14.0-362.24.1.el9_3.aarch64
-rw-------.  1 root root 5.7M Nov  8  2023 System.map-5.14.0-362.8.1.el9_3.aarch64
-rw-------.  1 root root 5.7M Apr  4 12:15 System.map-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rw-------.  1 root root 5.7M Mar 13 11:53 System.map-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-------.  1 root root 4.5M Apr 17 10:30 System.map-6.8.7-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.5M Mar 27 10:20 System.map-6.8.2-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.2M Apr 17 09:49 System.map-6.1.87-1.el9.elrepo.aarch64
-rw-------.  1 root root 4.2M Mar 27 09:47 System.map-6.1.83-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 255K Apr 17 10:30 config-6.8.7-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 254K Mar 27 10:20 config-6.8.2-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 240K Mar 27 09:47 config-6.1.83-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 240K Apr 17 09:49 config-6.1.87-1.el9.elrepo.aarch64
-rw-r--r--.  1 root root 198K Apr  4 12:15 config-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
-rw-r--r--.  1 root root 198K Mar 13 11:53 config-5.14.0-362.24.1.el9_3.aarch64+rt
-rw-r--r--.  1 root root 196K Apr  4 12:23 config-5.14.0-362.24.1.el9_3.0.1.aarch64
-rw-r--r--.  1 root root 196K Mar 13 12:06 config-5.14.0-362.24.1.el9_3.aarch64
-rw-r--r--.  1 root root 196K Nov  8  2023 config-5.14.0-362.8.1.el9_3.aarch64
-rw-------.  1 root root 6.5K Apr  3 11:08 grub2.cfg
drwx------.  3 root root 4.0K Dec 31  1969 efi
drwxr-xr-x. 11 root root  129 Apr 10 10:44 dtb-5.14.0-362.24.1.el9_3.0.1.aarch64
drwxr-xr-x. 11 root root  129 Apr 26 11:09 dtb-5.14.0-362.24.1.el9_3.0.1.aarch64+rt
drwxr-xr-x. 11 root root  129 Mar 27 11:40 dtb-5.14.0-362.24.1.el9_3.aarch64
drwxr-xr-x. 11 root root  129 Mar 27 14:12 dtb-5.14.0-362.24.1.el9_3.aarch64+rt
drwxr-xr-x. 11 root root  129 Mar 27 11:28 dtb-5.14.0-362.8.1.el9_3.aarch64
drwxr-xr-x. 10 root root  114 Mar 28 16:00 dtb-6.1.83-1.el9.elrepo.aarch64
drwxr-xr-x. 10 root root  114 Mar 28 16:00 dtb-6.8.2-1.el9.elrepo.aarch64
drwxr-xr-x. 10 root root  114 Apr 26 11:09 dtb-6.8.7-1.el9.elrepo.aarch64
lrwxrwxrwx.  1 root root   60 Apr 26 11:09 symvers-5.14.0-362.24.1.el9_3.0.1.aarch64+rt.gz -> /lib/modules/5.14.0-362.24.1.el9_3.0.1.aarch64+rt/symvers.gz
drwxr-xr-x.  6 root root   57 Apr 26 11:09 dtb-6.1.87-1.el9.elrepo.aarch64
lrwxrwxrwx.  1 root root   57 Apr 10 10:45 symvers-5.14.0-362.24.1.el9_3.0.1.aarch64.gz -> /lib/modules/5.14.0-362.24.1.el9_3.0.1.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   56 Mar 27 14:13 symvers-5.14.0-362.24.1.el9_3.aarch64+rt.gz -> /lib/modules/5.14.0-362.24.1.el9_3.aarch64+rt/symvers.gz
lrwxrwxrwx.  1 root root   53 Mar 27 11:41 symvers-5.14.0-362.24.1.el9_3.aarch64.gz -> /lib/modules/5.14.0-362.24.1.el9_3.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   52 Mar 27 11:29 symvers-5.14.0-362.8.1.el9_3.aarch64.gz -> /lib/modules/5.14.0-362.8.1.el9_3.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   51 Mar 28 16:01 symvers-6.1.83-1.el9.elrepo.aarch64.gz -> /lib/modules/6.1.83-1.el9.elrepo.aarch64/symvers.gz
drwx------.  3 root root   50 Apr 22 12:52 grub2
lrwxrwxrwx.  1 root root   50 Mar 28 16:00 symvers-6.8.2-1.el9.elrepo.aarch64.gz -> /lib/modules/6.8.2-1.el9.elrepo.aarch64/symvers.gz
lrwxrwxrwx.  1 root root   50 Apr 26 11:10 symvers-6.8.7-1.el9.elrepo.aarch64.gz -> /lib/modules/6.8.7-1.el9.elrepo.aarch64/symvers.gz
drwxr-xr-x.  3 root root   21 Mar 27 11:28 loader

I would start with:

df -h /boot
rm /boot/*rescue* /boot/loader/entries/*rescue*
df -h /boot

If you see that you get space on /boot with that, then you can again try to remove kernel (packages) with dnf.

perfect this worked, now i have so much memory. I did mess up at first by removing a the 5.14.0 kernel that I needed to run the 5.14.0+rt kernel. luckily I made a backup of the VM before trying this

Now don’t forget to remove the old kernels properly - before you forget:

rpm -q kernel | sort -V
uname -r
dnf remove --oldinstallonly --setopt installonly_limit=2 kernel

Also note one 6.1.X and two 6.8.X kernels installed on your system…

it looks like the kernel got deleted when I removed all the files in /boot/ with the version number, removed their folder, and from /boot/loader/entries/

that should be fine right there would not be any lingering files?

Personally, I have a habit of checking /lib/modules/ and /usr/src/kernels/ (except for the obvious /boot) - there’s rarely something left there, but it happens.

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