17

I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help.

Can anyone help me bring up the GRUB boot menu?

In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.


Reply (Himanshu) :
Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see this or this, where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.)

Amir
  • 609
  • 1
  • 9
  • 21

6 Answers6

12
  1. On Windows 10, go to the start menu.

  2. Search and open Recovery Options. The description for it should say System settings.

  3. Under Advanced startup click Restart now.

  4. Click Use a device; it's description should say "Use a USB drive, network connection, or Windows recovery DVD".

  5. Click Ubuntu and hopefully it should take you to the grub boot menu.

  6. Next try going back to the live Ubuntu session on the USB to reinstall grub-efi. On the live session, open a terminal and enter the following commands in:

    sudo mount /dev/sda# /mnt
    

    Replace the hashtag in /dev/sda# with the number representing the partition where you had Ubuntu installed. You can check using gnome-disks or gparted.

    sudo mount /dev/sda# /mnt/boot/efi
    

    Replace the hashtag in /dev/sda# with the number representing the EFI partition. It's usually /dev/sda2.

    sudo mount -o bind /dev /mnt/dev
    sudo mount -o bind /proc /mnt/proc
    sudo mount -o bind /sys /mnt/sys
    sudo mount -o bind /run /mnt/run
    sudo chroot /mnt/
    sudo apt-get install --reinstall grub-efi
    sudo update-grub
    

    Reboot.

  7. If that fails, go to your BIOS settings with one of the F keys; that option might be Enter setup. Look for boot option priorities and move Ubuntu above the Windows Boot Manager. Go to the option to save the changes then reboot.

  8. Lastly you can try using Boot-Repair.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • Thank you. I followed the steps you mentioned. Everything worked except the last steps. I even followed the boot-repair tool tutorial. It still does not work. However, there has been a change! Now when I click on Recovery Options and eventually select Ubuntu, GRUB gets loaded and I see more options there. One of the options is Windows now! But when the computer gets restarted I again need to login into Windows and do the same thing to load up GRUB. What should I do? – Amir Jan 07 '16 at 22:02
  • @Amir, try going to the BIOS and make sure ubuntu is 1st on the boot priority list. If you can log-in to ubuntu, try running sudo update-grub. – Obsidian Jackal Jan 07 '16 at 22:49
  • I followed steps 1 to 4. Now, in step 5, I do not have an "Ubuntu" option. I have only two options: USB NIC (IPV4) and USB NIC (IPV6). What should I do from here? – Erel Segal-Halevi Oct 16 '18 at 05:15
  • Also, when I try "sudo mount /dev/sda# /mnt/boot/efi", I get an error: "/mnt/boot/efi: mount point does not exist". Indeed, there is no folder "efi" in /mnt/boot - there is a folder "grub". – Erel Segal-Halevi Oct 16 '18 at 05:35
  • 1
    Also, when I try "sudo apt-get install --reinstall grub-efi" I get an error: "E: Package grub-efi has no installation candidate" (I have Ubuntu 18.04) – Erel Segal-Halevi Oct 16 '18 at 05:38
  • @ErelSegal-Halevi grub-efi is in the default repositories of all currently supported versions of Ubuntu and also Ubuntu 18.10. You can check it by running apt policy grub-efi. I ran a simulated install of grub-efi in 18.04 and it didn't return any errors. – karel Oct 16 '18 at 05:51
  • @karel maybe it's because I run from a live USB? – Erel Segal-Halevi Oct 16 '18 at 05:53
  • grub-efi is from the main repository, so it would ordinarily be installable from a live USB session. – karel Oct 16 '18 at 06:01
  • Strangely, I can install grub-efi when I do this command before the "sudo chroot /mnt/", when my prompt is "$" (it is then updated to version 2.02-2ubnutu8.2). However, when I do the same command after the "sudo chroot /mnt/" (when my prompt is "#"), I get an error saying "no installation candidate".

    Moreover, when I do "sudo update-grub", I get an error: "failed to get canonical path of /cow".

    – Erel Segal-Halevi Oct 16 '18 at 06:49
  • In any case, after installing grub-efi (before the chroot) and running update-grub (after th chroot), I reboot, go to BIOS setup, and still do not see any Ubuntu option - the only option I see is "Windows Boot Manager". – Erel Segal-Halevi Oct 16 '18 at 06:58
8

I have read many answers and tried accordingly but the problem was still there, so I decided to do it myself as follows:

  1. Click the Start menu and select Settings.

  2. Select UPDATE & SECURITY.

  3. Click Recovery.

  4. Under Advanced startup, click the Restart now button. The system will restart and show the Windows 10 boot menu.

    enter image description here

  5. Select Troubleshoot.

  6. Choose Advanced options.

    enter image description here

  7. Select UEFI Firmware Settings.

  8. Click Restart to restart the system and enter UEFI (BIOS) setup utility.

  9. F10 BIOS setup -> System Configuration tab -> Boot Options -> OS Boot Manager -> Ubuntu -> (select the Ubuntu option and move this option up to the top of the list) -> F10 Save and Exit (press F10 to save Ubuntu as the default boot option) -> F10 (press F10 again to save the changes to the BIOS/UEFI setup utility)

    enter image description here

When the computer restarts, the Ubuntu boot menu will be shown.

karel
  • 114,770
  • This solved my issue. It turns out that in the BIOS the "OS Boot Manger" option in the UEFI Boot Order opens up another menu to select either Ubuntu or Windows. – acedogblast Nov 14 '20 at 17:16
  • Thank you so much. I've been trying to do this for so long and this was the solution. Also to elaborate. You don't need to do all that. If you know your bios key at boot you can just press that and do it at boot). Also it says ubuntu but that's actually the menu you want – Xantium Aug 17 '21 at 19:58
4

Live boot Ubuntu and select try Ubuntu option from the GRUB menu that appears and then install boot repair by typing in following commands.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
arnav
  • 109
3

I'm presuming GRUB successfully installed, but something is clearly amiss. I know you said you already tried bcdedit, but here's the command to set it: bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi. If you set this and could not boot, as you have indicated already, don't forget to rescind the change you made using bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi.

Try following the steps detailed in Enkouyami's answer (i.e. chrooting into your installed Ubuntu system from the live CD and then reinstalling grub manually).

If the above fail, you could try installing grub2win. This allows you to boot grub2 from your Windows EFI firmware by making edits to the boot code. Be sure to follow the instructions carefully on the project's page if taking choosing method.

Another method instead of grub2win is Super Grub2 Disk, which is a live CD that allows you to boot into a variety of operating systems. I would try this first instead of grub2win, as there is less risk involved if something goes awry. I have not used Super Grub2 Disk personally, but I hear it is an incredibly useful tool. Using this tool, you can restore grub by following the instructions here.

terdon
  • 100,812
3

There is a setting in /etc/default/grub called GRUB_TIMEOUT_STYLE=hidden which prevents the GRUB menu from showing during the timeout period unless you press the Esc key. Check to see if this setting is enabled by GRUB_TIMEOUT_STYLE=hidden, and if it is enabled open the /etc/default/grub file for editing in nano text editor and disable it.

sudo nano /etc/default/grub

Comment out the line that says GRUB_TIMEOUT_STYLE=hidden by preceding it with a # character. Make sure that the GRUB_TIMEOUT value there is set to a value larger than zero, for example GRUB_TIMEOUT=10. Save the file.

Then run the update-grub command and reboot:

sudo update-grub  
sudo reboot

Nano text editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.

Other useful links

karel
  • 114,770
1

There's no need for live PCB or anything.

Just boot in BIOS (press F2 in Dell Inspiron) and, Add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi.
Move the boot option to top. (This is for Dell GUI BIOS, but I assume it works for all.)

Assuming everything else was installed normally, this would work very fine.

Once booted, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead, if that's what you want.

Here are some links you should go through to get ideas about other things possible with boots (and self-help).

  1. Enable or disable Windows Boot Manager
  2. Dual-boot Windows 10 and Linux

You can enable Windows Boot Loader for one boot or always as you wish, and boot Ubuntu from it.

karel
  • 114,770