Install new kernel while keeping the old kernel with YUM and RPM, how?

devhdadevhda Member Posts: 11 ■□□□□□□□□□
How can you accomplish this?

If I understand it correctly, with RPM it works like this:

rpm -ivh kernelpackage.rpm -> it installs a new kernel while keeping the old kernel in case the new kernel fails to boot. This is the prefered option.

rpm -Uvh kernelpackage.rpm -> it installs a new kernel and it deletes the old kernel. This is *NOT* recommended to do.


With YUM:

yum install kernel
yum update kernel

in BOTH cases, I notice in my lab at home that the old kernel is kept and the new one is added and the system boots from it.
If this is the case, then what is the difference between both YUM commands?

Comments

  • hiddenknight821hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□
    Yum is the way to go when updating kernel. Essentially, it does the same thing as expected. Here's the source straight from the horse's mouth.
    yum always installs a new kernel in the same sense that RPM installs a new kernel when you use the command rpm -i kernel. Therefore, you do not need to worry about the distinction between installingand upgrading a kernel package when you use yum: it will do the right thing, regardless of whether you are using the yum update or yum install command.

    When using RPM, on the other hand, it is important to use the rpm -i kernel command (which installs a new kernel) instead of rpm -u kernel (which replaces the current kernel). See Section B.2.2, “Installing and Upgrading” for more information on installing/upgrading kernels with RPM.
  • devhdadevhda Member Posts: 11 ■□□□□□□□□□
    Yum is the way to go when updating kernel. Essentially, it does the same thing as expected. Here's the source straight from the horse's mouth.

    Excellent answer, thanks hiddenknight! icon_cheers.gif
  • JockVSJockJockVSJock Member Posts: 1,118
    Also, would recommend checking the /boot/grub/grub.conf files and makes sure that all stanzas are updated to the newest version of the kernel, along with checking files under /boot too.

    Also remember that some 3rd party software will need to re-installed as well. Example of this is VMWare Tools if the server is a VM.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • VeritiesVerities Member Posts: 1,162
    JockVSJock wrote: »
    Also, would recommend checking the /boot/grub/grub.conf files and makes sure that all stanzas are updated to the newest version of the kernel, along with checking files under /boot too.

    Also remember that some 3rd party software will need to re-installed as well. Example of this is VMWare Tools if the server is a VM.

    Using vSphere 5.0 I still have this problem with our RHEL vms. VMtools need to be reinstalled anytime we patch them.

    I also recommend only using YUM as RPM is going the way of the dodo. The only use for RPM in my opinion is querying config files for a package...but even then, after working with RHEL or CentOS for a while you will become familiar with the locations of them.
  • JockVSJockJockVSJock Member Posts: 1,118
    Verities wrote: »
    Using vSphere 5.0 I still have this problem with our RHEL vms. VMtools need to be reinstalled anytime we patch them.

    Yup, going thru right now with a script to update all of the VMWare Tools. I also have to do this for the software for Oracle ASM/Grid too.

    Also YUM is going to be deprecated here in the near future:

    https://fedoraproject.org/wiki/Changes/ReplaceYumWithDNF
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • VeritiesVerities Member Posts: 1,162
    JockVSJock wrote: »
    Yup, going thru right now with a script to update all of the VMWare Tools. I also have to do this for the software for Oracle ASM/Grid too.

    Also YUM is going to be deprecated here in the near future:

    https://fedoraproject.org/wiki/Changes/ReplaceYumWithDNF

    Good to know. We're still using RHEL 5/6 so I don't think we'll be seeing it for a couple years.
  • JockVSJockJockVSJock Member Posts: 1,118
    On another thread, it looks like Linux distros are on the verge of deprcating a bunch of commands, in addition to YUM:

    https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/

    I can say this, at least Linux world moves faster on this Vs Microsoft Windows.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • Mike7Mike7 Member Posts: 1,107 ■■■■□□□□□□
    Verities wrote: »
    Using vSphere 5.0 I still have this problem with our RHEL vms. VMtools need to be reinstalled anytime we patch them.
    It was a hassle and VMware's direction(blog post) is open-vm-tools (OVT) for new supported Linux distros.

    On RHEL/CentOS 7, skip VMtools and yum install open-vm-tools. yum install open-vm-tools-desktop if you have GUI desktop.
    OVT is officially supported and the KB article can be found at http://kb.vmware.com/kb/2073803

    For RHEL/CentOS 5/6, I will try the VMware Tools Operating System Specific Packages (OSPs) site at https://www.vmware.com/support/packages
    The vSphere 5.X doc is at https://packages.vmware.com/tools/docs/manuals/osp-esxi-51-install-guide.pdf
    For example, RHEL 6 RPMs are at https://packages.vmware.com/tools/esx/latest/rhel6/x86_64/index.html


    I am lazy... so whenever there is a way to automate..... :)
Sign In or Register to comment.