Ask Your Question
0

Grub boots from kernels that I removed

asked 2017-10-29 08:27:47 -0500

lynob gravatar image

updated 2017-10-29 08:37:23 -0500

I'm running Fedora 26, rpm -qa kernel outputs kernel-4.13.5-200.fc26.x86_64. And that's the one I want.

enter image description here

I had 3 kernels showing in grub, that one, and 2 newer ones, Wifi wasn't working when booting from the other two so I excluded kernel updates from dnf, and I removed the newer kernels sudo dnf remove kernel-4.x.

All went smoothly, however when I restart, I still can see them in grub and I can boot from them and the wifi won't work if I pick them.

Here I am booting from the newest kernel that I removed.

enter image description here

Here's my grub

enter image description here

What went wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-10-31 15:54:35 -0500

sixpack13 gravatar image

@lynob

I guess your "dnf remove kernel-core-x.y.z" probability doesn't work as expected cause you did a "sudo dnf remove kernel-4.x" before.

in this special case you need to do "rpm -qa|grep kernel" and "dnf remove ..." all the parts left over from the above kernel aswell  [1]

afterwards you need to do the "sudo grub2-mkconfig...."

after that it seems very unlikely that you are able to boot that removed kernel furthermore !

[1]
on my box:
rpm -qa | grep kernel gives

kernel-4.13.9-300.fc27.x86_64
kernel-core-4.13.9-300.fc27.x86_64
kernel-headers-4.13.9-300.fc27.x86_64
kernel-modules-4.13.9-300.fc27.x86_64

P.S.
I do dnf remove kernel-core-x.y.z cause all other kernel packages (headers, modules and the kernel itself) depend on kernel-core. dnf realize that and removes the depending parts aswell. I'm somewhat lazy !

@sideburns regarding GUI (I believe [ I don't use it] there is one already called "gnome-software"

but what is so difficult in
1. to open a terminal and
2. rpm -qa|grep kernel-core and
3. sudo dnf remove kernel-core-x.y.z and 
4. sudo  sudo grub2-mkconfig -o /boot/grub2/grub.cfg && sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Hints:
- double left click one kernel-core in the output of step 2
- key in "sudo dnf remove " and 
a) middle click to paste the before highlight kernel-core OR
b) to write that command further to read "sudo dnf remove kernel-c" and hit the tab key (command expansion) once or more times to select the right kernel-core
edit flag offensive delete link more
0

answered 2017-10-29 10:35:18 -0500

sixpack13 gravatar image
sudo rpm -qa|grep kernel-core

sudo dnf remove kernel-core-x.y.z

sudo grub2-mkconfig -o /boot/grub2/grub.cfg && sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
edit flag offensive delete link more

Comments

sudo rpm -qa|grep kernel-core I get the list, when I try to remove it, it says No match for argument:Error: No packages marked for removal.

lynob gravatar imagelynob ( 2017-10-29 13:26:48 -0500 )edit

Just what command are you using to remove the packages? You have to be very, very specific with this to get the ones you need removed without nuking the one that's in use. This is one case where a GUI may be better, as you can select exactly the ones you need without worrying about a typo messing everything up.

sideburns gravatar imagesideburns ( 2017-10-29 14:55:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-10-29 08:27:47 -0500

Seen: 205 times

Last updated: Oct 31 '17