0

installing of errata security kernel rpm ( from redhat sattelite ) on the linux red-hat,

could sometimes - create a diff 2-4 new update kernel under /boot ,

the problem here that /boot could be nearly %0 availbe space

is it possible to install only the latest rpm kernel and not all the previous kernels

I am not sure but I found the installonly_limit parameter from /etc/yum.conf

when we set installonly_limit=1 , does this mean to install always the latest kernel ?

for example

dose installonly_limit=1 ,

Tell us to keep to install only the higher rpm kernel release

and ignore installing the other old kernel version?

/etc/yum.conf 

installonly_limit=1
dandan
  • 1,081
  • 4
  • 13
  • 21

1 Answers1

1

No, it is not possible: yum intentionally manages kernel updates as new installation, rather than true upgrades.

If your /boot partition is full, you should first remove oldest kernels (but not the one currently running - you can find it issuing uname -a) using yum remove. After that, you can install the newer kernels.

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • I found the package-cleanup --oldkernels --count=1 , this tool should remove all the kernels except the current , but what in case grub.conf is wrong - dose this tool will remove the older kernel in spite bad configuration in /etc/grub.conf? – dandan Jun 10 '16 at 08:59
  • Each time a old kernel is removed or a new one is installed, `grub.conf` is recreated by `grub2-mkconfig`, which scans the currently-installed kernel under `/boot` and rewrite the grub config file. So, generally even badly damaged `grub.conf` file can be repaired - simple because they are wiped and recreted from scratch. Anyway, if in doubt, make a backup copy of your current `grub.conf`. – shodanshok Jun 10 '16 at 09:04
  • can we be sure to use the tool - package-cleanup --oldkernels --count=1 , to remove all old kernel except the current ? – dandan Jun 10 '16 at 09:06
  • what in case default=1 in grub.conf . dose this know the current according to (uname -r) ? – dandan Jun 10 '16 at 09:10
  • I don't use `package-cleanup` very often, and I prefer to clean up kernels manually (when needed). So I can't answer this specific question. For `GRUB_DEFAULT`, give a look at the [manual](https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html) – shodanshok Jun 10 '16 at 09:20
  • `package-cleanup --oldkernels` does work. Its exclusions of the running kernel or newer kernels make it fairly safe. This does mean you have 2 installed after you update and before you reboot into the new one. – John Mahowald Jun 11 '16 at 15:35
  • please see this article - https://www.question-defense.com/2014/05/13/centos-remove-old-kernels , they opposite to you answer! – dandan Jun 16 '16 at 12:42