Ask Your Question

Fedora 24 - Edit and Remove Grub entries manually

asked 2016-07-31 10:14:31 -0500

Hamilton gravatar image

updated 2016-08-06 08:00:00 -0500

So, i'm dual booting Windows 10 and Fedora 24 in UEFI mode

I want to remove and change names of some grub entries manually (not using grub customizer applications) and keep only Fedora and Windows 10 as entries

Is it possible to do this manually ? If yes, some please explain it step by step? It will be great help

Thanks in advance


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-08-14 08:31:44 -0500

lsatenstein gravatar image

updated 2016-08-14 08:57:14 -0500

Yes, you can edit the grub.cfg (/boot/grub2/grub.cfg) if not using efi. Just remember, when there is a new kernel update, your changes to grub.cfg will be overwritten.

I have often commented out sections in grub.cfg. Rather than deleting the lines. Use the # at the beginning of the line to comment out the lines.

Before doing any serious changes to grub.cfg, copy the grub.cfg to grub.bak

I have also inserted my own submenu for the initial grub.cfg entry. I do this , so I do not have to view the previous and rescue entries unless I choose the submenu (advanced) option.

If you multiboot more than one Linux version, you will note the submenu feature within the grub.cfg. It follows immediately after the very first entry of the second and later listings of other operating Linux systems.

its format is

 menuentry 'your first menu'{
 submenu "Advanced options for .....  {  
      menuentry 'your second menu' {

You can place the submenu for your very own grub.cfg, if desired, to hide all the other grub entries. Doing so would restrict the number of lines appearing on the boot menu to two lines, "the main entry" and the line marked "Advanced",

edit flag offensive delete link more

answered 2016-08-13 10:16:56 -0500

nmilosev gravatar image

There will be a file called grub.cfg somewhere in the /boot/efi or /boot directory. There you can edit labels and order among other things. Be very careful when editing this file, it's not something you normally do manually.

Also, on next kernel update grub.cfg will be regenerated and your settings will be overwritten.

Check this wiki page:

It is generally safe to directly edit /boot/grub2/grub.cfg in Fedora. Grubby in Fedora patches the configuration when a kernel update is performed and will try to not make any other changes than what is necessary. (Other distributions, in particular Debian and Debian-derived distributions provide a software patch that adds an update-grub command which is neither included nor needed in Fedora.) Manual changes might however be overwritten with grub2-mkconfig next time the system is upgraded with anaconda. Some customizations can be placed in /etc/grub.d/40_custom or /boot/grub2/custom.cfg and will survive running grub2-mkconfig.

There you have more information about all this.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-07-31 10:14:31 -0500

Seen: 3,627 times

Last updated: Aug 14 '16