LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2020, 10:57 AM   #1
salmanahmed
Member
 
Registered: Jun 2020
Posts: 158

Rep: Reputation: Disabled
CentOS 8 upgrade error kernel-core


Hi
I have installed CentOS 8. After recent release of updates, I am trying to upgrade my CentOS by (yum upgrade), but it is giving following error:
Code:
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
So, when I give the command (yum upgrade --skip-broken), it gives following message:
Code:
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--nobest' to use not only best candidate packages)
and the command (yum upgrade --skip-broken --nobest) gives following error:
Code:
Problem: The operation would result in removing the following protected packages: kernel-core
Upon looking on forums, I can find some old posts, terming it as a bug, but nothing about CentOS 8. Kindly help me to solve this problem.
 
Old 07-19-2020, 09:55 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
See the bug BZ#1741381, especially the comment 3 there. As suggested in that comment, try
Code:
dnf mark install $(rpm -qa kernel\*)
 
Old 07-19-2020, 10:15 AM   #3
salmanahmed
Member
 
Registered: Jun 2020
Posts: 158

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
See the bug BZ#1741381, especially the comment 3 there. As suggested in that comment, try
Code:
dnf mark install $(rpm -qa kernel\*)
I ran following command, as mentioned in comment 3:
Code:
[root@alpha ~]# dnf mark install $(dnf repoquery --installed 'kernel*')
Modular dependency problems:

 Problem 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
 Problem 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
Modular dependency problems:

 Problem 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
 Problem 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
kernel-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-core-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-devel-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-headers-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-modules-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-tools-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-tools-libs-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
And confirmed by following command:
Code:
[root@alpha ~]# dnf repoquery --userinstalled | grep kernel
Modular dependency problems:

 Problem 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
 Problem 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
kernel-0:4.18.0-147.8.1.el8_1.x86_64
kernel-core-0:4.18.0-147.8.1.el8_1.x86_64
kernel-devel-0:4.18.0-147.8.1.el8_1.x86_64
kernel-headers-0:4.18.0-147.8.1.el8_1.x86_64
kernel-modules-0:4.18.0-147.8.1.el8_1.x86_64
kernel-tools-0:4.18.0-147.8.1.el8_1.x86_64
kernel-tools-libs-0:4.18.0-147.8.1.el8_1.x86_64
However, the problem persists:
Code:
[root@alpha ~]# yum upgrade
Last metadata expiration check: 0:33:46 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@alpha ~]# 
[root@alpha ~]# yum upgrade --skip-broken
Last metadata expiration check: 0:34:33 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--nobest' to use not only best candidate packages)
[root@alpha ~]# 
[root@alpha ~]# yum upgrade --skip-broken --nobest
Last metadata expiration check: 0:34:39 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
PS: I think that perl module error can be ignored and would not be causing that problem.
 
Old 07-19-2020, 10:25 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Where did the kernel you're currently running come from? Is it the kernel shown above? Please show the output of uname -r.

Are there any kernels installed besides kernel-0:4.18.0-147.8.1.el8_1.x86_64 shown in the output above? Please show the output of ls /boot.

Also, check the contents of /etc/dnf/protected.d/*.conf. Beside the packages specified there, dnf implicitly protects the currently running kernel, so kernel-core shouldn't be explicitly mentioned there.

Last edited by shruggy; 07-19-2020 at 11:54 AM.
 
Old 07-19-2020, 11:21 AM   #5
salmanahmed
Member
 
Registered: Jun 2020
Posts: 158

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Where does the kernel you're currently running come from? Is it the kernel shown above? Please show the output of uname -r.

Are there any kernels installed besides kernel-0:4.18.0-147.8.1.el8_1.x86_64 shown in the output above? Please show the output of ls /boot.

Also, check the contents of /etc/dnf/protected.d/*.conf. Beside the packages specified there, dnf implicitly protects the currently running kernel, so kernel-core shouldn't be explicitly mentioned there.
1. The kernel came from distro, as a result of previous upgrades:
Code:
[root@alpha ~]# uname -r
4.18.0-147.8.1.el8_1.x86_64
2. There aren't other kernels installed. Please check the contents of /boot:
Code:
[root@alpha ~]# cd /boot
[root@alpha boot]# ls
config-4.18.0-147.8.1.el8_1.x86_64
efi
grub2
initramfs-0-rescue-8a9c79d95b28479a833f3442576c711f.img
initramfs-4.18.0-147.5.1.el8_1.x86_64kdump.img
initramfs-4.18.0-147.8.1.el8_1.x86_64.img
initramfs-4.18.0-147.8.1.el8_1.x86_64kdump.img
initramfs-4.18.0-147.el8.x86_64kdump.img
loader
System.map-4.18.0-147.8.1.el8_1.x86_64
vmlinuz-0-rescue-8a9c79d95b28479a833f3442576c711f
vmlinuz-4.18.0-147.8.1.el8_1.x86_64
3. kernel-core is not mentioned in /etc/dnd/protected.d/*.conf:
Code:
[root@alpha protected.d]# ls
dnf.conf  sudo.conf  systemd.conf  yum.conf
[root@alpha protected.d]# cat dnf.conf 
dnf
[root@alpha protected.d]# cat sudo.conf 
sudo
[root@alpha protected.d]# cat systemd.conf 
systemd
systemd-udev
[root@alpha protected.d]# cat yum.conf 
yum
 
Old 07-19-2020, 12:01 PM   #6
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
Code:
rpm -i /var/cache/dnf/BaseOS-*/packages/kernel*.rpm
 
Old 07-19-2020, 02:31 PM   #7
salmanahmed
Member
 
Registered: Jun 2020
Posts: 158

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
Code:
rpm -i /var/cache/dnf/BaseOS-*/packages/kernel*.rpm
Nope... the result is same:
Code:
[root@alpha ~]# dnf --downloadonly upgrade
Last metadata expiration check: 1:49:21 ago on Sun 19 Jul 2020 10:39:36 PM PKT.
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@alpha ~]# 
[root@alpha ~]# dnf --downloadonly upgrade --skip-broken --nobest
Last metadata expiration check: 1:49:35 ago on Sun 19 Jul 2020 10:39:36 PM PKT.
Error: 
 Problem: The operation would result in removing the following protected packages: kernel-core
 
Old 07-19-2020, 03:05 PM   #8
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Ok. The you'll need to download manually at least kernel, kernel-core and kernel-modules, and install them all at once with rpm -i.
 
1 members found this post helpful.
Old 07-20-2020, 06:34 AM   #9
salmanahmed
Member
 
Registered: Jun 2020
Posts: 158

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Ok. The you'll need to download manually at least kernel, kernel-core and kernel-modules, and install them all at once with rpm -i.
The problem is fixed. Following were the step which I followed:
1. Download kernel, kernel-core and kernel-modules, linux-firmware.
2. Boot in rescue mode.
3. Remove existing linux-firmware package and install downloaded package.
4. Then Install kernel packages by (rpm -iv kernel*)
5. Reboot
Thanks shruggy, you are a life savor :-)
 
Old 12-18-2023, 10:17 AM   #10
olevlad
LQ Newbie
 
Registered: Dec 2023
Location: Dallas, TX
Distribution: Most
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by shruggy View Post
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
Code:
rpm -i /var/cache/dnf/BaseOS-*/packages/kernel*.rpm
I got this from this from the rescue...

error: Failed dependencies:
kernel-headers < 4.18.0-348.7.1.el8_5 is obsoleted by kernel-headers-4.18.0-348.7.1.el8_5.x86_64

uname -r
3.10.0-1160.102.1.el7.x86_64
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS Error after kernel upgrade. server1 kernel: EDAC MC0: UE page 0x0, offset 0x0 abefroman Linux - Hardware 4 05-15-2010 05:38 PM
Is it possible to upgrade Fedora Core 2 to Fedora Core 6 ??? nilesh_patil82 Fedora 2 10-04-2006 10:39 AM
Upgrade Fedora Core 4 (FC4) to Fedora Core 5 (FC5) hangs vogelap Fedora - Installation 10 05-22-2006 09:00 AM
Fedora Core 4 (Test 3) to Core 4 Upgrade? Funx_88 Fedora 1 06-14-2005 03:22 AM
How easy to upgrade from Core 1 to Core 2 ? smevans Fedora 3 05-02-2004 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration