Ubuntu 20.04 dual boot with Win 10 - no boot loader and boot-repair can't fix it

5,870

It seems the solution in my particular case (HP Spectre 13' laptop) was disabling Optane so that the bootloader can be written in the EFI partition.

A complete step by step guide is given on this Reddit post by u/johnny_fear - kudos to him!

To disable Optane, which seems to have been the essential step, this is the procedure:

In Windows, disable Optane. Hit Windows key, type optane, open the app that comes up (you may be prompted to update), and click on Optane memory in the left sidebar. Turn it off and reboot.

Share:
5,870

Related videos on Youtube

Nikola Spasovski
Author by

Nikola Spasovski

Updated on September 18, 2022

Comments

  • Nikola Spasovski
    Nikola Spasovski almost 2 years

    I have successfully installed Ubuntu 20.04 on Windows 10 preinstalled HP Spectre laptop, but when I reboot, it starts directly to Win 10, no boot loader or option to choose Ubuntu.

    Boot-repair tool couldn't help.

    Has someone had a similar issue?

    Also, if it's necessary to set the boot mounting point to the existing EFI (Windows) partition, can someone please advise how it is done during the Ubuntu installation?

    Thank you so much!

    • ldias
      ldias about 4 years
      When you installed Ubuntu did you install the GRUB bootloader? Maybe you can follow the instructions in this article to make the grub bootloader show up?
    • ubfan1
      ubfan1 about 4 years
      Take a look at bug 1396379, and add yourself to the list. The installer always goes to sda regardless of what you input for the location. Manually running sudo grub-install can succeed with the right options, many answered questions on how to do that.
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      I have not specifically installed GRUB, but chose "something else" during the installation and created the root, home and swap partitions. I tried the article you shared prior posting the question here, unfortunately it didn't help either... I am suspecting it has something to do with EFI as I can't see any UBUNTU element when in working in Windows, where as when I start Ubuntu with live USB I can see both the Ubuntu installation and the Windows files. I hope someone can give me a hint or directions how to fix this.
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      @ubfan1 thanks for the advise, but the way I understand this is related when installed on external drives, which isn't my case.
    • ldias
      ldias about 4 years
      @NikolaSpasovski Try the method here: help.ubuntu.com/community/Grub2/Installing. It's under Fixing A Broken System and it's the LiveCD Terminal one.
    • ubfan1
      ubfan1 about 4 years
      In any case where sda should not be the target for the bootloader (external drive, or in your case, nvme drives), the installer fails. In your case, sda is the installer, so you're left with nothing on the nvme EFI partition. grub-install to the nvme0 should work, with the right options like --uefi .... etc.
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      @ubfan1 Thanks for the clarification. I used your advise and attempted to install grub as @idias advised below (help.ubuntu.com/community/Grub2/Installing - Fixing A Broken System with LiveCD Terminal) but I get error message (see below). Could you please advise the commands I need to use instead? ubuntu@ubuntu:~$ sudo mount /dev/nvme0n1p5 /mnt/ mount: /mnt: /dev/nvme0n1p5 already mounted on /mnt. ubuntu@ubuntu:~$ sudo grub-install --boot-directory=/mnt/ /dev/nvme0 Installing for i386-pc platform. grub-install: error: attempt to read or write outside of disk `hostdisk//dev/nvme0'.
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      Thanks so much, I think that's the right direction and I combined your advise with the one of @ubfan1 but I get error message, please see the explanation I replied to his message and let me know if you can detect where the issue is. Thank you both so much for helping me out on this!
    • ldias
      ldias about 4 years
      @NikolaSpasovski Sorry to hear that you are still getting error messages. Maybe try this method: howtoubuntu.org/…. If that fails you could try unmounting and remounting /dev/nvme0n1p5
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      Thanks @Idias, can you please just confirm I'm using the right partition names, as I wouldn't want to destroy the working Win OS. Is the Linux root partition /dev/nvme0n1p5 which I need to mount first, and then install grub on /dev/nvme0? Once I have your confirmation, I'll proceed with the new instructions! Thanks a million for your unselfish assistance!
    • ldias
      ldias about 4 years
      @NikolaSpasovski If you type sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL into terminal you should see all the hard drives on your computer. You should see nvme0n1p5 and then above that should be nvme0. Is that correct? If that is so, then you are good to proceed
    • ubfan1
      ubfan1 about 4 years
      See help.ubuntu.com/community/UEFI for your UEFI install. The i386-pc seems wrong, expected to see amd64. Ubuntu should be installed in the same mode as Windows, UEFI. Do you have Nvidia graphics hardware? That makes additional signing steps necessary for using secure boot.
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      back to your original question and suggestion, I think it will be easier and least risky to simply reinstall Ubuntu, but this time, try to reinstall set the /boot/efi mount point to the existing EFI partition. I looked for instructions how to do this during the installation, but all I can find is how to set the Root, Swap and Home partitions - do you know of step by step guide how can I set the mount point to the EFI partition during the installation? Thanks!
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      Thanks and I think I'll just reinstall Ubuntu over and hopefully I can set the /boot/efi mount point to the existing EFI partition, but since the installer didn't ask me that originally, can you advise how can I do that in particular? I know I have to set Root, Swap and Home partitions, but can't find instructions how to set the /boot/efi partition (should it be primary or logical etc) - excuse my ignorance, I'm newbie :)
    • ubfan1
      ubfan1 about 4 years
      I think the technique is to run the "Try Ubutnu", then start a terminal and then run the install. Back in the terminal, wait until the "wrong" EFI is mounted, then unmount it and mount the one you want. I've never actually done this -- just copying the bootloader files to where they belong is easy enough, and change one UUID in the grub.cfg stub.
    • ldias
      ldias about 4 years
      @NikolaSpasovski I will think about that but in the meantime do you mind editing your original question to include that?
    • Nikola Spasovski
      Nikola Spasovski about 4 years
      I reinstalled Ubuntu (this time I used "alongside Windows Boot Manager" option hoping that the GRUB will be mounted on the EFI partition) but got the same result! Unfortunately, I'm newbie and don't understand most of the articles shared, even less the commands, so if you can tell me what exactly I should write in terminal, I'd appreciate it, otherwise, I give up and don't want to bother people anymore. This is the current state of my computer paste.ubuntu.com/p/dwHrKcDmRx Thanks for the help so far, regardless the final outcome.