0

I recently followed this guide to dual-booting OEM Windows 8 and Ubuntu, and now I've got an awful GRUB menu full of redundant entries. All I want are two entries: one for Ubuntu, and one for Windows. I'd also like to be able to rename them, since the entry for Windows 8 has a name that doesn't make any sense.

user155708
  • 297
  • 2
  • 4
  • 13

1 Answers1

1

First try grub-customizer, see this answer, but you should know that grub-customizer has some issues with the newest grub-2.00.

If you like the manual editing way, open a terminal (Ctrl+Alt+T) and run

gksudo /etc/grub.d/40_custom && gedit /boot/grub/grub.cfg

Here you will create YOUR custom grub entries. If you have another Linux system (Windows no matters), then you must update these custom entries by hand every time a new kernel arrives in the other Linux system (not Ubuntu).

Now you must have two documents opened, the one (40_custom) is opened with root privileges.

Each entry begins with

menuentry 

and ends with this symbol }

Copy paste the entries you want from grub.cfg to 40_custom . Not Ubuntu's entries. Only the entries from ### BEGIN /etc/grub.d/30_os-prober ### and below.

When done, save the 40_custom document.

Run in terminal

sudo chmod 644 /etc/grub.d/30_os-prober
sudo chmod 755 /etc/grub.d/40_custom 
sudo update-grub 

Above commands will remove the execute permissions from 30_os-prober (that scans for other Operating Systems and add the entries) and will give execute permissions to your custom script (40_custom). Last command will update grub with the new values.

Check the new values with

cat /boot/grub/grub.cfg

Above method is a bit tricky and dangerous. You should edit the files very carefully because you may wind up with a corrupted grub menu or no menu at all. If that's the case, you have to use boot-repair from a Live media to restore grub.

More grub tips and tricks can be found in Ubuntu Wiki/Grub2, for custom menus look here.

Good Luck

NickTux
  • 17,539
  • Thanks. The manual way is the way I prefer. grub-customizer only gave me remove options, and not hide options. Can I just hash out the entries I don't want to see? – user155708 Jul 10 '13 at 02:03
  • No you cannot just hash out the entries because at next grub update the file /boot/grub/grub.cfg will be overwritten. You must create your own 40_custom entries. Also the grub-customizer offers you the hide option. The delete is not actual a delete. You can restore the "deleted" entries if you want. – NickTux Jul 10 '13 at 10:20