# Fedora 24 - Edit and Remove Grub entries manually

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

Hamilton

edit retag close merge delete

Sort by » oldest newest most voted

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'{
}
stuff
}
stuff
}
stuff
}
....
}


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",

more

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: https://fedoraproject.org/wiki/GRUB_2...

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.