0

Today morning I installed ubuntu 16.04 alongside windows 10 as dual boot.After installing first time grub menu came and went smooth. From the next time my laptop booted straight to windows 10. To get into grub I had to press F9 everytime I switched on. So I fixed it by installing bootlaoder repair on ubuntu. Now I've got so many entries on grub and it's a mess. So, how can I cleanup this ? Any help would be appreciated . Thanks

This is the grub menu I'm getting

0

2 Answers 2

3

In your case Grub-Customizer might come in handy.

Install it :

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Open it, and remove all unwanted entries :

enter image description here

enter image description here

Click on save. done.

Personally, I don't prefer these types of automated tools. I will update this answer soon if I find a manual way of doing this.

1
  • To do it manually you edit/add grub sections in /etc/grub.d then run sudo grub-update, which will regenerate /boot/grub/grub.cfg for you from the stuff in /etc/grub.d. To keep the OP's entries from returning in the future it might be worth hunting through grub.d to see which scripts are generating all those efi entries. Back up /boot/grub/grub.cfg before messing with it and double-check it before you reboot.
    – Jason C
    Sep 11, 2016 at 3:54
0

Applications like GRUB Customizer are probably what caused this problem to begin with. They probably created extra unnecessary files in /etc/grub.d.

In terminal, type ls -al /etc/grub.d, and you output should look similar to this:

-rwxr-xr-x   1 root root 9.6K Oct 14  2015 00_header*
-rwxr-xr-x   1 root root 6.2K Apr 22 18:16 05_debian_theme*
-rwxr-xr-x   1 root root  12K Apr  6  2015 10_linux*
-rwxr-xr-x   1 root root  11K Apr  6  2015 20_linux_xen*
-rwxr-xr-x   1 root root 2.0K Mar 12  2014 20_memtest86+*
-rwxr-xr-x   1 root root  12K Apr 11  2014 30_os-prober*
-rwxr-xr-x   1 root root 1.4K Oct 14  2015 30_uefi-firmware*
-rwxr-xr-x   1 root root  214 Sep 22  2014 40_custom*
-rwxr-xr-x   1 root root  216 Apr 11  2014 41_custom*
-rw-r--r--   1 root root  483 Apr 11  2014 README 

Any other files you find are suspects for the creation of all the extra entries that you find in your GRUB menu, and should probably be moved out to the desktop (for safe keeping, just in case you mess up). Look for a file that has a bunch of EFI entries. Again, in terminal, type grep -i EFI /etc/grub.d/* to easily find the suspect file.

Once the extra file(s) have been moved, you can sudo update-grub to rebuild a standard GRUB menu.

Cheers, Al

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .