Sie sind auf Seite 1von 20

5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system.

- CertDepot

CertDepot
Everything you need to pass your RHCSA, RHCE, LFCS, LFCE and much more.

search here Go

Home About RHEL6 RHEL7

RHEL7: Update the Upcoming Events

kernel package (CET)

appropriately to ensure There are no events.

a bootable system.
Last updated on March 3, 2017 (11,842 views) - CertDepot 65 Comments

RHCSA7: Task
Share this link Like 0 of the day
0
Allowed time: 3 minutes.
Check that you've got no
SELinux policy violations.
Note: This is an RHCSA 7 exam objective.

To install a new kernel package, type:


RHCE7: Task
# yum install kernel.rpm of the day
Allowed time: 10 minutes.
or Configure a httpd server
that executes a Perl script
# rpm -ivh kernel.rpm in the /var/www/cgi-bin
directory displaying
"Hello!".
Note: Dont use the -U option which replaces the current kernel
instead of adding it to the boot menu.

(1 votes, average: 5.00 out of 5)


Poll for
Leave a Reply
favorite RHEL
7 book
https://www.certdepot.net/rhel7-update-the-kernel-package/ 1/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

What is your favorite


65 Comments on "RHEL7: Update the kernel package
appropriately to ensure a bootable system."
RHEL 7 book to
prepare RHCSA & RHCE
exams?
Notify of new follow-up comments Email
Sander van Vugt's
book (51%, 1,321
You must be logged in to post a comment. Votes)

Asghar Ghoris book


Sort by: newest | oldest (22%, 573 Votes)

None (9%, 240 Votes)


vivek
Others (9%, 236 Votes)

rpm -ivh kernel.rpm Andrew Mallett's


Member
book (4%, 106 Votes)

Do we just have to run this command? Is this Jang/Orsaria's book


package available automatically or do we have to (4%, 102 Votes)
configure any repo? do we have to change anything
in grub.config file?
Total Voters: 2,578

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

1 year 5 months ago

Poll for most


CertDepot difficult
RHCSA 7
topic
Author Yes, you will need to configure a repository
to be able to get packages.
The other option is to download each What do you think is
package separately but this way nothing will the most difficult
deal with dependencies and it will be a big RHCSA 7 topic?
work for almost nothing.
Systemd
1 year 4 months ago LVM
Kickstart
SELinux
bajeradai LDAP
ACL
Automounter
Could you please write complete steps for updating
Member Others
new kernel?
I think before # rpm -ivh kernel.rpm, there should

https://www.certdepot.net/rhel7-update-the-kernel-package/ 2/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

be # wget kernel.rpm. Vote


Also grub2-set-default 0 to set new kernel and if
new kernel is in second line of grub2 menu, grub2-
View Results
set-default 1 should be used in last step.
Thanks.

1 year 4 months ago

Poll for most


CertDepot
difficult RHCE
7 topic

Author
You are right about getting the new kernel
package: you need to use wget or a What do you think is
command like that to download the the most difficult RHCE
7 topic?
package.
After, by default, the new kernel is put at the
Networking
first line of the grub menu. You dont need
Firewalld
to run any command for that.
Kerberos
iSCSI
1 year 4 months ago
Apache
DNS
arclight
NFS
Samba
Postfix
This is great information, thanks again. I have a big MariaDB
Member
issue in setting up the local repositories as pre- Others
dependency for this Question (and pretty much for
all other questions requiring yum installation). As I Vote
understand it, a new installation of the server during
the exam would contain no .repo files in the View Results
/etc/yum.repos.d directory, and it assumed that we
need to set this up first and foremost, is this correct?

1 year 4 months ago


Recently
Updated
CertDepot
Pages
RHEL7: Apply a
Author
Yes, I think. This is correct.
tuning profile to a
server.
1 year 4 months ago
RHEL7 Latest
tutorials

https://www.certdepot.net/rhel7-update-the-kernel-package/ 3/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

SELINUX: Diagnose
arclight
and address
routine SELinux
Thanks for that. Could you please point me to the
policy violations.
Member appropriate certdepot page for repos setup,
RHEL7: How to get
particularly from the RHCSA exam perspective?
started with
NetworkManager.
1 year 4 months ago
RHEL7: How to
install Cockpit.
RHEL7: How to get
CertDepot
started with
network throughput
Repository can be studied in this page. measurement.
Author
RHEL7: Configure
a Kerberos KDC.
1 year 4 months ago
RHEL7: Use
Kerberos to control
arclight access to NFS
network shares.
RHEL7 Quick
Member
Much appreciated, thanks recipes
RHEL7: How to set
1 year 4 months ago up the NTP
service.

bajeradai

Can we just run this command to upgrade new


Member
kernel from ftp or given path?
Recent
# yum update kernel
Comments
Sam on RHEL7:
1 year 4 months ago Provide SMB
network shares to
specific clients.
CertDepot
CertDepot on
RHEL7: Extend
existing
Author
When you run the yum update kernel
unencrypted logical
command, you ask the various configured
volumes.
repositories in the /etc/yum.repos.d
samuel.sappa on
directory for updates. If no repository is
RHEL7: Provide
configured, nothing happens.
SMB network
Most repositories are remote http servers
shares to specific
or local directories. You could certainly set clients.

https://www.certdepot.net/rhel7-update-the-kernel-package/ 4/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

up a repository based on ftp but its not a Sultan on RHEL7:


classic configuration. Extend existing
unencrypted logical
volumes.
1 year 4 months ago
samuel.sappa on
RHEL7: Provide
bajeradai SMB network
shares to specific
clients.
Member
That means, to update the new kernel,just we need
to run the command : rpm -ivh kernel.rpm right?

1 year 4 months ago


Archives
CertDepot May 2017
April 2017
March 2017
Author Dont use the rpm command, it doesnt
February 2017
keep the history of all the installed January 2017
packages (yum history). December 2016
If you absolutely want to use the rpm November 2016
command, at least use rpm -ivh October 2016
kernel.rpm. This command doesnt September 2016
replace/upgrade the current kernel but August 2016
install a new one: the difference is that the July 2016
old kernel is kept (very useful in case of June 2016
boot problems). May 2016
The yum install kernel.rpm command April 2016
behaves like rpm -ivh, installing a new March 2016
kernel instead of replacing/upgrading it. February 2016
January 2016
December 2015
1 year 4 months ago
November 2015
October 2015
bajeradai September 2015
August 2015
July 2015
Member
In the beginning of this page you June 2015
said, Dont use the -U option and May 2015
now, you said to use rpm -Uvh April 2015
kernel.rpm, Which one is right? In March 2015
the test, they will give you a link and February 2015
you will update new kernel from that January 2015
link. For example, the link is December 2014
November 2014

https://www.certdepot.net/rhel7-update-the-kernel-package/ 5/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

http://certdepot.net. Can you please October 2014


write the possible end to end steps? September 2014
August 2014
July 2014
1 year 3 months ago
June 2014
May 2014
CertDepot April 2014
March 2014
February 2014
Author
You are perfectly right. In my January 2014
previous comment, I made a December 2013
mistake that I fixed. November 2013
Use rpm -ivh kernel.rpm or October 2013
yum install kernel.rpm but September 2013
dont use rpm -Uvh
kernel.rpm.

1 year 3 months ago


Meta
bajeradai Register
Log in
Entries R S S
Member I passed the exam with Comments R S S
score 277/300 but I WordPress.org
could not solve the
kernel related question,
rpm -ivh kernel.rpm
command was not
working.

1 year 3 months ago

CertDepot

Author Use yum install instead.

1 year 3 months ago

bajeradai

Member Thank you.

https://www.certdepot.net/rhel7-update-the-kernel-package/ 6/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

1 year 4 months ago

CertDepot

Author You are welcome.

1 year 4 months ago

mehboob

Member Hi,

Are there any questions in RHEL7 RHCSA exam


about kernel tuning optimizing or troubleshooting.

Thanks.

1 year 2 months ago

CertDepot

Author
No, There isnt.

1 year 2 months ago

redhat0329

Member
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.

1 year 1 month ago

https://www.certdepot.net/rhel7-update-the-kernel-package/ 7/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

CertDepot

Yes, it is the same, version and


rpm extension are not
Author
displayed.

1 year 1 month ago

redhat0329

Member Thanks.

1 year 1 month ago

redhat0329

Member Thanks

1 year 1 month ago

redhat0329

Member Hi CertDepot,

Do i need to run the


below command after
updating or installing the
kernel?

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

Thanks

1 year 1 month ago

CertDepot

https://www.certdepot.net/rhel7-update-the-kernel-package/ 8/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

Author

Normally you shouldnt


need to.

1 year 1 month ago

redhat0329

Member Thanks.

1 year 1 month ago

redhat0329

Member
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?

1 year 23 days ago

CertDepot

Author Normally, you should


have only one repository
bringing kernel updates.
This problem shouldnt
usually happen.
But in case it occurs,
your solution is
interesting.

https://www.certdepot.net/rhel7-update-the-kernel-package/ 9/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

1 year 22 days ago

redhat0329

Member Im 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. Well I
think for precautions
disabling the other repos
first is a best idea then
after updating the kernel
thats the time I enabled
again the other repos.

1 year 22 days ago

Annamdi

Member
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?

1 year 22 days ago

Sam

Member Sounds like exam jitters to me. There are a


few ways to install a program (ie a kernel).

1)From Source usually (untar, compile and


configure)
2)From a Binary (untar, and install)

https://www.certdepot.net/rhel7-update-the-kernel-package/ 10/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

3)From a RPM source (downloadable)


4)From a YUM repository
see https://www.certdepot.net/rhel7-set-
local-repository-lab/

Note: It is also possible to install a local


kernel with yum as well as the above. As it is
a Red Hat exam it is unlikely you will get 1)
or 2) above.

yum localinstall kernel.rpm

Hope this helps and good luck with the


exam.

1 year 20 days ago

navideh

Member 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?

11 months 9 days ago

CertDepot

Author
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 didnt 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.

https://www.certdepot.net/rhel7-update-the-kernel-package/ 11/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

11 months 9 days ago

phil_guy412

Member
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?

11 months 7 days ago

CertDepot

Author
When you install a new kernel, it
automatically becomes the default kernel.
You dont 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.

11 months 6 days ago

navideh

Member 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

https://www.certdepot.net/rhel7-update-the-kernel-package/ 12/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

repo before that I share my client (Do I should get


updated my package repo on repo and then share
with client)?

11 months 5 days ago

CertDepot

Author
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 dont 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 havent 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.

11 months 3 days ago

navideh

Member 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?

10 months 25 days ago

CertDepot

Author The base repository should be enough.


You could optionally include the update

https://www.certdepot.net/rhel7-update-the-kernel-package/ 13/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

repository. The two others shouldnt be


necessary at all.

10 months 25 days ago

Lisenet

Member 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.

10 months 24 days ago

navideh

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

10 months 22 days ago

CertDepot

Author When you run yum update on your


system, you update your system but not
your local repository.
To update your local repository, and not
your local system, read this tutorial:
https://www.certdepot.net/rhel7-set-local-
repository-lab/

10 months 22 days ago

https://www.certdepot.net/rhel7-update-the-kernel-package/ 14/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

navideh

Member Do we have to create the same repo in exam?


because it will be difficult and take much time to do
that!

10 months 20 days ago

CertDepot

Author You shouldnt need to create a repository


from scratch.

10 months 19 days ago

samuel.sappa

Member
Hi Certdepot,
Since were 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

9 months 17 days ago

CertDepot

Author Normally if youve got a problem with the


currently installed kernel, you can decide to
execute a previous version of it through the
boot menu.
Im not aware of another option, sorry.

9 months 18 days ago

https://www.certdepot.net/rhel7-update-the-kernel-package/ 15/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

samuel.sappa
Hi CertDepot,
Thank you for your reply and
Member explanation, by the way your work in
this website is awesome I
recommended this web to my friend
Thanks for sharing

9 months 17 days ago

CertDepot

Author
Thanks. Youre welcome.

9 months 17 days ago

twostep

Member 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-

8 months 24 days ago

CertDepot

Author I didnt know that. Very interesting. Thanks.

8 months 24 days ago

jawad.nawaz@hotmail.com

Member 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.

https://www.certdepot.net/rhel7-update-the-kernel-package/ 16/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

Would
yum install kernel *** will do the work or you need to
put grub2 set-default as well.
Thanks

8 months 2 hours ago

CertDepot

Author
Normally, yum install kernel*** should be
enough.

7 months 29 days ago

eleanya

Member Sorry for the stupid question. I


thought the command was yum
install kernel

2 months 16 days ago

CertDepot

Author
You are perfectly right. I added
yum install kernel to this
page because its a valid
answer.

2 months 15 days ago

samuel.sappa

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

https://www.certdepot.net/rhel7-update-the-kernel-package/ 17/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

6 months 18 days ago

CertDepot

Author
The new installed kernel will be
automatically used at the next boot.

6 months 18 days ago

zi

Member if we were asked to update kernel from a specific


path how should we get the update? and where
should we store it?

1 month 17 days ago

CertDepot

Author
The path of new kernel will be given. You
wont need to store anything: the yum
command accept a url.

1 month 17 days ago

zi

Member so how should it go?

yum update http:.

1 month 13 days ago

zi

Member
or this

https://www.certdepot.net/rhel7-update-the-kernel-package/ 18/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

yum install http://

1 month 12 days ago

CertDepot

Author Yes, yum install

1 month 12 days ago

scruff

Hi there. Sitting a lot of nights at the homelab PC.


Member During the kernel update task the command rpm -i
kernel-xx.rpm warns me about linux-firmware,
xfsprogs and kmod versions conflicts. These 3
RPMs 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 Im applying the command
yum update kernel, it updates kernel automatically
and sets new kernel to default boot Read more

24 days 2 hours ago

Sam

Member 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.

23 days 19 hours ago

https://www.certdepot.net/rhel7-update-the-kernel-package/ 19/20
5/19/2017 RHEL7: Update the kernel package appropriately to ensure a bootable system. - CertDepot

This w ebsite is not affiliated or endorsed by Red Hat or VMw are. The w ebsite content is only free for non-commercial use. Website hosted by
2017 CertDepot OVH, 2 rue Kellermann, 59100 Roubaix, France.
Responsive Theme pow ered by WordPress

https://www.certdepot.net/rhel7-update-the-kernel-package/ 20/20

Das könnte Ihnen auch gefallen