System boots straight into Windows without showing GRUB

I installed Ubuntu alongside Windows but I did not disable secure boot as someone told me it could cause problems with boot loader. So when installation finished and I rebooted, the system went straight into Windows. I went to Ubuntu IRC Support and they told me to turn off the secure boot and reinstall Ubuntu. I did that but my system still boot into windows.

This is a picture of partitions on my system:

enter image description here

This is my first Ubuntu install on my new laptop.
I followed everdaylinux guide to install it and I used something else option.


Solution 1:

Re-installing GRUB is almost certainly overkill, and carries a small risk of messing things up. Instead, try this:

  1. Boot to Windows.
  2. Open an Administrator Command Prompt window by right-clicking the Command Prompt icon and selecting the option to run it as Administrator.
  3. Type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
  4. Reboot.
  5. If you boot into Ubuntu but GRUB did not give you a menu or if that menu did not include Windows, type sudo update-grub in a Terminal.

That should fix it. Alternatively, instead of steps #2-3, you could try the third-party EasyUEFI, which gives you a GUI menu for rearranging EFI boot priorities. Some EFIs provide similar functionality in their setup utilities. You can also do the same thing with efibootmgr in Ubuntu, but that sometimes fails due to bugs in either efibootmgr or EFIs, and it's harder to explain than is the same procedure with bcdedit in Windows.

Solution 2:

Okay, this is a bit of a process, so fair warning beforehand: it gets a little complex.

You'll have to boot into the Ubuntu LiveCD, and select try Ubuntu.
From there, mount your root partition. You can do this by going into the file manager and then clicking on "20GB Filesystem" (or something very similar to that - you'll know it when you see it on the side).
Now open a terminal and type sudo -i

That will transfer you to a root shell , so be careful!

Run cd /media/ubuntu

then type ls and hit enter.

You should see 1 (maybe 2) options . One will have a very strange name, the other one will have a label denoting as a CDrom.

If there is a second entry , go to the very strange name by typing cd foldername and hitting enter. Then execute

grub-install /dev/sda; chroot . grub-update

The output will be "done." Reboot, and your bootloaded should be back in place with your choice.