RHEL7: Update the kernel package appropriately to ensure a bootable system.

Share this link

Note: This is an RHCSA 7 exam objective.

To install a new kernel package, type:

# yum install kernel.rpm

or

# rpm -ivh kernel.rpm

Note: Don’t use the -U option which replaces the current kernel instead of adding it to the boot menu.

(2 votes, average: 5.00 out of 5)
Loading...
69 comments on “RHEL7: Update the kernel package appropriately to ensure a bootable system.
  1. vivek says:

    “rpm -ivh kernel.rpm”

    Do we just have to run this command? Is this package available automatically or do we have to configure any repo? do we have to change anything in grub.config file?

    Your site is helping a lot to learn, thanks for that.

    • CertDepot says:

      Yes, you will need to configure a repository to be able to get packages.
      The other option is to download each package separately but this way nothing will deal with dependencies and it will be a big work for almost nothing.

  2. bajeradai says:

    Could you please write complete steps for updating new kernel?
    I think before # rpm -ivh kernel.rpm, there should be # wget kernel.rpm.
    Also grub2-set-default 0 to set new kernel and if new kernel is in second line of grub2 menu, grub2-set-default 1 should be used in last step.
    Thanks.

    • CertDepot says:

      You are right about getting the new kernel package: you need to use wget or a command like that to download the package.
      After, by default, the new kernel is put at the first line of the grub menu. You don’t need to run any command for that.

  3. arclight says:

    This is great information, thanks again. I have a big issue in setting up the local repositories as pre-dependency for this Question (and pretty much for all other questions requiring yum installation). As I understand it, a new installation of the server during the exam would contain no .repo files in the /etc/yum.repos.d directory, and it assumed that we need to set this up first and foremost, is this correct?

  4. arclight says:

    Thanks for that. Could you please point me to the appropriate certdepot page for repos setup, particularly from the RHCSA exam perspective?

  5. arclight says:

    Much appreciated, thanks

  6. bajeradai says:

    Can we just run this command to upgrade new kernel from ftp or given path?
    # yum update kernel

    • CertDepot says:

      When you run the yum update kernel command, you ask the various configured repositories in the /etc/yum.repos.d directory for updates. If no repository is configured, nothing happens.
      Most repositories are remote http servers or local directories. You could certainly set up a repository based on ftp but it’s not a classic configuration.

  7. bajeradai says:

    That means, to update the new kernel,just we need to run the command : rpm -ivh kernel.rpm right?

    • CertDepot says:

      Don’t use the rpm command, it doesn’t keep the history of all the installed packages (yum history).
      If you absolutely want to use the rpm command, at least use rpm -ivh kernel.rpm. This command doesn’t replace/upgrade the current kernel but install a new one: the difference is that the old kernel is kept (very useful in case of boot problems).
      The yum install kernel.rpm command behaves like rpm -ivh, installing a new kernel instead of replacing/upgrading it.

      • bajeradai says:

        In the beginning of this page you said, “Don’t use the -U option” and now, you said to use rpm -Uvh kernel.rpm, Which one is right? In the test, they will give you a link and you will update new kernel from that link. For example, the link is http://certdepot.net. Can you please write the possible end to end steps?

  8. bajeradai says:

    Thank you.

  9. mehboob says:

    Hi,

    Are there any questions in RHEL7 RHCSA exam about kernel tuning optimizing or troubleshooting.

    Thanks.

    • CertDepot says:

      No, There isn’t.

      • redhat0329 says:

        Hi CertDepot,

        There is no package name kernel.rpm when I tried #yum search kernel.
        I only got kernel. is it the same? Thanks in advance.

        • CertDepot says:

          Yes, it is the same, version and rpm extension are not displayed.

          • redhat0329 says:

            Thanks.

          • redhat0329 says:

            Thanks

          • redhat0329 says:

            Hi CertDepot,

            Do i need to run the below command after updating or installing the kernel?

            grub2-mkconfig -o /boot/grub2/grub.cfg

            Thanks

          • CertDepot says:

            Normally you shouldn’t need to.

          • redhat0329 says:

            Thanks.

          • redhat0329 says:

            Hi CertDepot, if there are multiple repositories enabled, is it advisable to disable first the other repositories aside from the update repository? enabled=0 to other repos while the update repos enabled=1 before running yum update kernel or yum install kernel?

          • CertDepot says:

            Normally, you should have only one repository bringing kernel updates. This problem shouldn’t usually happen.
            But in case it occurs, your solution is interesting.

          • redhat0329 says:

            I’m afraid that conflicts will occur if there are multiple repos are enabled while updating the kernel. Worst thing that it will not boot normally that I might get in trouble with. We’ll I think for precautions disabling the other repos first is a best idea then after updating the kernel that’s the time I enabled again the other repos. 🙂

  10. Annamdi says:

    The truth about it is am still confused about this question when it tends to look simple. I have my Rhcsa exam on friday and still need clarification. when creating the repo for the kernel update. what do you add in the baseurl?

  11. navideh says:

    I do have my own repository ,I want to update my kernel. But when I want to update that ,gives me this error:
    No packages marked for update.
    some issues in my repo???
    my current kernel is 3.10.0-327.18.2.el7
    would you please help me?

    • CertDepot says:

      At first sight, I would say you have the standard CentOS repository active and your own repository contains older packages.
      As a second guess, you didn’t install and run the createrepo package (so your repository metadata are not up to date). As a third guess, I would check the content of the configuration file of your repository.
      Hope it helps.

  12. phil_guy412 says:

    Is this another possible option to update the kernel while still keeping the old one?

    1. yumdownloader kernel
    2. yum install linux-firmware
    3. rpm -ivh NEW_KERNEL.rpm

    or

    1. yum update kernel (Not sure if this keeps the old kernel)

    And when you install a new kernel, does the new kernel automatically become the default boot kernel or do I need to run the grub2-set-default command?

    • CertDepot says:

      When you install a new kernel, it automatically becomes the default kernel. You don’t need to run any command.
      The previous default kernel is kept in the /boot partition so you can enable it again in case of problem.

  13. navideh says:

    Actually I created my repo on my server and my client reach that repo through HTTP (does my client need to execute the createrepo cmd???)
    But I think I do have not updated packages on my repo before that I share my client (Do I should get updated my package repo on repo and then share with client)?

    • CertDepot says:

      Normally when you copy an Iso image of RHEL 7.x/CentOS 7.x, you also copy the metadata of the repository located inside and you don’t need to execute the createrepo command.
      However, when you create a repository from scratch and put rpm files into it, you definively need to install the createrepo package and execute the createrepo command, otherwise you haven’t got any metadata and your repository will not work.
      After, when you update your repository packages, it is advised to also execute the createrepo command after to update the corresponding metadata.

  14. navideh says:

    For the exam our local repo should have four parts that includes base, update, extras and centos plus? or having the base repo is enough to do everything that needs to do on the exam?

    • CertDepot says:

      The base repository should be enough. You could optionally include the update repository. The two others shouldn’t be necessary at all.

    • Lisenet says:

      During the exam you may get a single repo to use, and you are free to name it as you like. It does not matter how you call it, base, update, extras or whatever, the main thing is that the repo will contain all packages you may be asked to install.

      Do not overthink it, exam questions are crystal clear.

  15. navideh says:

    How can we update our old version of repository?
    I ran “yum update” on my system and then create new repo, but still I couldn’t see the new version!!!!
    Would you help me to fix my problem?

  16. navideh says:

    Do we have to create the same repo in exam? because it will be difficult and take much time to do that!

  17. samuel.sappa says:

    Hi Certdepot,
    Since we’re troubleshooting the kernel in IMHO we doing this in level 1 or using boot able CD/DVD
    How can we install kernel by running the rpm -ivh kernel.rpm while we in Level 1 or using CD/DVD bootable?
    Thank you for your help

  18. twostep says:

    To verify which kernel is current, you can use a grubby command:
    grubby –default-kernel
    grubby –default-index
    ls -ltr /boot/vmlinuz*
    grubby –info=/boot/vmlinuz-

  19. jawad.nawaz@hotmail.com says:

    There was a Q in RHCSA exam ( forgot the full description). install the kernel from a repo (http), make sure this is the default kernel at boot up.
    Would
    yum install kernel *** will do the work or you need to put grub2 set-default as well.
    Thanks

  20. samuel.sappa says:

    Hi CertDepot,
    When we install new kernel is it by default the one will using during boot or we must configure it manually

  21. zi says:

    if we were asked to update kernel from a specific path how should we get the update? and where should we store it?

  22. scruff says:

    Hi there. Sitting a lot of nights at the homelab PC. During the kernel update task the command “rpm -i kernel-xx.rpm” warns me about linux-firmware, xfsprogs and kmod versions conflicts. These 3 RPM’s should be installed before kernel-xx.xx.xx.rpm. After installing xfsprogs, kmod and linux-firmware packages we are finally able to install kernel-xx.rpm. After that the kernel-xx.xx.xx automatically sets to default entry of boot. The previous old kernel is still active under second entry of boot prompts, as required on task. But if I’m applying the command “yum update kernel”, it updates kernel automatically and sets new kernel to default boot entry. So my question is – what is the difference between “rpm -i linux-firmware-xxx.rmp kmod-xxx.rpm xfsprogs-xxx.rpm kernel-xxx.rpm” and “yum update kernel”? Is the result of these commands the same?

    • Sam says:

      “rpm -i kernel-xx.rpm” installs a local package only, hence then need for additional packages
      “yum update kernel” Install all relevant packages from the repository
      “yum localinstall kernel-xx.rpm” is a little more flexible. check that one out.

Leave a Reply

Upcoming Events (Local Time)

There are no events.

Follow me on Twitter

Archives

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |