Redhat / Centos update

When issuing "yum update", will it update kernel as well. If not, how can I upgrade the kenerl and fall back in case there is any problem ?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yum update updates everything, including the kernel. The new kernel gets added to your GRUB configuration menu, so if you want to boot to an older version, you just have to select the older entry when GRUB shows it's menu at bootup. As far as I know, CentOS keeps the last 3 kernels and deletes the older ones.

As CentOS uses on tested software, you should always be safe using yum update, and I'd run it regularly to keep the system properly patched.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shiju JacobInfo SecurityCommented:
You can change how yum handles kernel packages with some simple changes to your /etc/yum.conf. The installonly_limit option controls how many old packages are kept:

    installonly_limit Number of packages listed in installonlypkgs to keep installed at the same time. Setting to 0 disables this feature. Default is ‘0’.

I disabled the functionality altogether by setting installonly_limit to 0:


It’s important to keep in mind that you will need to purge these packages from your system yourself now. Kernel packages can occupy a fair amount of disk space, so make a note to go back and clean them up when you no longer need them.
If it fails, you would need to be in front of the system to choose the former kernel version to boot from.

The only possible cause for a failure is if you have "non-supported" peripherals/devices i.e. network..

integrating DKMS would help auto transition between kernel as DKMS will handle the recompile/reincorporate the module/during the bootup.

Leaving the above referenced old kernel packages is fine.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

"yum update" is a bit short-toothed as it will not handle package deprecations/renames

yum check-update -> show needed updates
yum upgrade -> install them

yum-protectbase and yum-versionlock somehow can be made to emulate appearance of Debian apt-get upgrade  vs dist-upgrade.

IMPORTANT: Please do not follow advice of Shiju to keep full history of installed kernels. 10 upgrades later your /boot will be full and you will have no chance to use YUM to clean oldest kernel.
Shiju JacobInfo SecurityCommented:

You can rather have the value set to 3 or 2 to keep only 3 or 2 packages  my eg said 0 to keep all as per the request from the user

I had clearly told that it will eat up space4

Shiju Jacob
AXISHKAuthor Commented:
RHEL has it at 5, oracle linux (that loads 2 kernels by default) has value of 3
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.