Skip to main content
4 of 4
replaced http://askubuntu.com/ with https://askubuntu.com/

rebuilding my grub2 menu based on my one installed kernel

tl;dr : I have one kernel now on fedora and want that ONLY with Windows 8 to show up on my boot menu.


I've been tweaking and geeking with linux kernels. Then I wanted to clean up my boot menu.

So upon googling for remove old kernels, most answers are ubuntu based. This has gotten me confused and lost.

I've tried installing fedora versions apps or tools from what is suggested for ubuntu or tweaking the commands a bit. No luck.

Finally I used this post. I ran sudo yum remove kernel.

Now on my machine this is what I get:

$ rpm -q kernel #<-when I run this.. kernel-3.12.5-302.fc20.x86_64 

I then did :

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

However, Now, I have this huge list on my boot menu. Which looks like this:

$ sudo grep "menuentry " /boot/grub2/grub.cfg | cut -c 1-100 menuentry 'Fedora, with Linux fedup' --class fedora --class gnu-linux --class gnu --class os --unres menuentry 'Fedora, with Linux 3.14.0-rc6-eudyptula-00145-ga4ecdf8-dirty' --class fedora --class gnu- menuentry 'Fedora, with Linux 3.14.0-rc6-00145-ga4ecdf8' --class fedora --class gnu-linux --class gn menuentry 'Fedora, with Linux 3.14.0-rc6-00145-ga4ecdf8.old' --class fedora --class gnu-linux --clas menuentry 'Fedora, with Linux 3.14.0-rc3+' --class fedora --class gnu-linux --class gnu --class os - menuentry 'Fedora, with Linux 3.14.0-rc3+.old' --class fedora --class gnu-linux --class gnu --class menuentry 'Fedora, with Linux 3.12.6' --class fedora --class gnu-linux --class gnu --class os --unre menuentry 'Fedora, with Linux 3.12.6.old' --class fedora --class gnu-linux --class gnu --class os -- menuentry 'Fedora, with Linux 3.12.5-302.fc20.x86_64' --class fedora --class gnu-linux --class gnu - menuentry 'Fedora, with Linux 0-rescue-5894da36659c4dcc8799c7b9e06f08e7' --class fedora --class gnu- menuentry 'Windows 8 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'ospro 

(It was either that or taking a picture of my screen during boot time. I hope it gives a picture of what is on my boot list)

Don't know why it made .old versions and I'm not sure if it's safe to just delete them. I googled and even came up with this post: grub2-mkconfig should ignore .old kernel images so I think grub2 will always rebuild my menu and shove in those .old kernel entries.

I simply want :

to remove the cruft so that I only have Fedora, with Linux 3.12.5-302.fc20.x86_64 (the kernel I'm on now) and Windows 8. Bonus : I want Windows 8 the default.

gideon
  • 353
  • 3
  • 6
  • 17