Ask Your Question
1

removed older kernel version is showing up in GRUB

asked 2017-02-19 22:50:33 -0600

traveller gravatar image

I am on F25 and tried removing older kernel using

$ sudo dnf remove kernel-4.8.6-300.fc25.x86_64

it seemed to have removed the kernel as i can see only two newer kernels using....

$ rpm -q kernel
kernel-4.9.8-201.fc25.x86_64
kernel-4.9.9-200.fc25.x86_64

but still the older one is showing up in the grub. how can i clean it from the grub too?

edit retag flag offensive close merge delete

Comments

Always good to have more than two working kernels installed. Generally, you don't have to remove older kernels. dnf will take care of that when updating your system (and installing new kernels). The number of kernels to keep is defined in /etc/dnf/dnf.conf.

florian gravatar imageflorian ( 2017-02-20 10:07:34 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-02-20 03:39:30 -0600

hhlp gravatar image

grub2-mkconfig will create a new configuration based on the currently running system, what is found in /boot, what is set in /etc/default/grub, and the customizable scripts in /etc/grub.d/ . A new configuration file is created with:

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

Under EFI, GRUB 2 looks for its configuration in /boot/efi/EFI/fedora/grub.cfg. For newly installed kernels to work, grubby expects /etc/grub2-efi.cfg to be a symlink to the real grub.cfg (i.e. /boot/efi/EFI/fedora/grub.cfg).

If you already have a grub 2 EFI config file, you should be okay. If not, grub2-mkconfig can help, but your mileage may vary.

 grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

taken from this

edit flag offensive delete link more

Comments

thankyou very much. when i ran the command you offered... it showed older kernel (apparently removed one)'s image "Found linux image: /boot/vmlinuz-4.8.6-300.fc25.x8664" "Found initrd image: /boot/initramfs-4.8.6-300.fc25.x8664.img"

so your solution worked as it was supposed to.. and i think "$ sudo dnf remove kernel-4.8.6-300.fc25.x86_64" removed the kernel but not its image i guess... or something like that.

traveller gravatar imagetraveller ( 2017-02-22 02:47:24 -0600 )edit
0

answered 2017-02-20 04:51:12 -0600

eliaspitsi gravatar image

i have a similar problem as yours except that i am installing a virtualbox and i tried all the above but still my kernel is not update and i can't open the virtualbox please help

edit flag offensive delete link more

Comments

Please ask this as a separate question. Also, you may to search this site for an answer; there is a ton of questions in regards to virtualbox, kernel modules, dkms, ...

florian gravatar imageflorian ( 2017-02-20 10:05:23 -0600 )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

Stats

Asked: 2017-02-19 22:50:33 -0600

Seen: 818 times

Last updated: Feb 20 '17