I have Windows 8 and Ubuntu on my system. I recently upgraded from Ubuntu 13.04 to 14.04, and ran Boot Repair in order to make the GRUB the default loader. However, it failed to achieve what I wanted, reporting an error (http://paste.ubuntu.com/8640254/). When at startup I press F9 and check the boot menu, it shows two copies of Ubuntu loaders. Any idea as to how this issue might be resolved?
2 Answers
It seems that by upgrading Ubuntu to a newer version you also updated a kernel. GRUB sees both (actually, the log says that there are 3 kernels up, not sure why you see only two) kernels and identifies them as kernels for Ubuntu. It simply means that there's a different version of the engine.
To remove an older kernel, simply run apt-get autoremove
[1] procedure on any of those Ubuntu instances. Most likely you'll also need administrative privileges for removing packets, thus the command would be sudo apt-get autoremove
[1] - manual for apt-get
states:
autoremove
autoremove is used to remove packages that were automatically installed
to satisfy dependencies for some package and that are no more needed.

- 3,590
-
Thanks for your reply. I understand the logic you have given, and by that logic, autoremove should work to get rid of any kernel that has outstayed its welcome, as it does with any other redundant software, but this is what I am getting after running autoremove for the first time: http://s30.postimg.org/hezx6o2gx/image.png and http://s10.postimg.org/43anzkx3t/image.png The latter is what I get after running autoremove the second time. So for some reason, it is not working. – UserName Jun 02 '15 at 12:11
-
Looking through your pasted log (in the original question), it seems that one copy of Ubuntu is mounted (line 587). Maybe you've set up your when have a plugged in usb with ubuntu instance? Have you tried updating boot-loader without the usb device, that contains burned ubuntu image? – psukys Jun 02 '15 at 18:43
I know this is old but I don't see a proper solution/answer yet and it shows up very early in recent google searches. The issue you're running into has nothing to do with redundant/old kernels and grub. This takes place before grub is loaded and you can see the different kernels displayed.
It's got to do with the way Ubuntu's UEFI install option works. The reason Ubuntu and a lot of other distro's create two entries in your UEFI/BIOS is because there's both a shimx64.efi and a grubx64.efi. It is seeing both of those files and displays an entry for each. The shimx64.efi has to do with secureboot and MS's signing BS.
If you're using secureboot then shimx64.efi (which was signed by Microsoft on the version Canonical supplies) is what would be used to boot and it slings itself over to grubx64.efi and then boots your OS.
If you're not using secureboot then shimx64.efi is not necessary and you would be able to boot just by using/selecting the grubx64.efi option.
Depending on your setup you should be able to rename/remote shimx64.efi so you're not seeing the duplicate entry, otherwise unfortunately it's probably best to just ignore it.

- 1
-
may you complete your answer and mention the way to find this file – Mostafa Ahangarha May 14 '16 at 07:02
This is what I am getting when I press F9 at startup, with two "Ubuntu"s showing up on the menu. Both of them point to the same GRUB. I tried the steps suggested in the link you shared, but to no avail. What I basically want is not to have to press F9 in order to access the GRUB, so that the GRUB is my default boot loader. I hope I have made myself clear. Also, I sent the report to boot.repair@gmail.com and am awaiting a reply. Any solutions?
– UserName Oct 24 '14 at 15:15sudo efibootmgr -o
but every time I restart the computer, the boot order resets itself. This is what I get:BootCurrent: 0002 Timeout: 0 seconds BootOrder: 0000,3000,0002,2001,2002,2003 Boot0000* Windows Boot Manager Boot0002* Ubuntu Boot2001* USB Drive (UEFI) Boot2002* Internal CD/DVD ROM Drive (UEFI) Boot3000* Internal Hard Disk or Solid State Disk
– UserName Oct 25 '14 at 11:22