0

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?

3

You can set your default entry without removing the newest kernel through grub2-set-default command. In your case without updating grub2 use:

grub2-set-default 2

After grub update you should have tow kernel on your grub 2 configuration file the command should be (the first kernel is 0 the second one is 1):

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-set-default 1

The command :

# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

will print the exact order of the existing kernel on the grub.cfg file.

Fedora project : Setting default entry

2

Look in /var/lib/initramfs-tools/ if the newer kernel-versions are present.

Erase them, also in /boot relevant entries, like vmlinuz initrid and System.map. But be carefull, that you don't delete the false one!!

As root or with sudo update-grub

  • Your answer is wrong . Reason: Question is tagged "fedora" but Fedora does not have an "update-grub" command. This is only found on Ubuntu and some other deb-based Linux distros. And /var/lib/initramfs-tools/ is also only found on deb based distros. – reichhart Apr 7 '18 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.