CentOS 7 – Limiting Rescue Kernel Imeges

Home » CentOS » CentOS 7 – Limiting Rescue Kernel Imeges
CentOS 3 Comments

In order to keep only 3 kernel images on a CentOS 7 I edited /etc/yum.conf and I
put

installonly_limit=3

This parameter works for standard kernel images, but does not work for rescue images:

$ ls -al /boot/vmlinuz*

-rwxr-xr-x 1 root root 5027376 May 13 20:46
/boot/vmlinuz-0-rescue-2554e2ffad84452bb07401bed0a61089
-rwxr-xr-x 1 root root 3084288 Jun 27 06:42
/boot/vmlinuz-0-rescue-2be43759d5354c5a84125dea5b4a02ab
-rwxr-xr-x 1 root root 5029136 Mar 18 05:18
/boot/vmlinuz-0-rescue-3871136569fb49cb934a276af5e09b32
-rwxr-xr-x 1 root root 5029008 Mar 31 19:54
/boot/vmlinuz-0-rescue-ca5579e88a014362836fa90f4aa34248
-rwxr-xr-x 1 root root 5029744 Aug 6 16:31
/boot/vmlinuz-0-rescue-e2ae4db2b909488088e78ac4064661d2
-rwxr-xr-x 1 root root 5029744 Aug 6 03:15 /boot/vmlinuz-3.10.0-229.11.1.el7.x86_64
-rwxr-xr-x 1 root root 5027376 May 13 12:15 /boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
-rwxr-xr-x 1 root root 5029200 Jun 24 00:15 /boot/vmlinuz-3.10.0-229.7.2.el7.x86_64

Is there a way to keep rescue images within a certain limit?

Thank you in advance

3 thoughts on - CentOS 7 – Limiting Rescue Kernel Imeges

  • Nicolas Thierry-Mieg wrote on 24/08/2015 00:24:

    According to man page:

    /*
    installonlypkgs List of package provides that should only ever be installed, never updated.
    */

    This is not the case for two reasons: (1) I want to install rescue kernel image and (2) there is no rpm package for rescue kernel

  • yes, install: not update. That’s what installonlypkgs and installonly_limit are for. Read the manpage again carefully, that sentence you quoted is tricky.

    that’s a problem though… where do these files come from?