0

My title is borrowed from this question which describes a situation very close to mine, including three steps which both the OP and I have taken without success. However I'm using the Ubuntu 18.04.4 live USB to install Ubuntu 18.04.4. To recap, the things I've done, mostly in order, are:

  • get new HP Pavilion x360 in the mail
  • create Ubuntu 18.04.4 live USB
  • disable Secure Boot (BIOS) and fast startup (Windows)
  • reboot into live environment and install Ubuntu 18.04.4
  • find that no Grub menu comes up when I reboot - Windows comes on instead.

Boot-repair has been ineffectual. It asked me to run a certain command ("bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi") which has also been suggested by this AskUbuntu answer (albeit modified to "bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi") but neither of these commands has worked. A different AskUbuntu answer suggested editing /etc/systemd/system/boot-linux-next.service; I was hopeful that would work since it was specific to HP Pavilion laptops but that, too, failed. Does anyone have a solution?

(Note: I've left out some boot-repair output to keep this question from being too long.)

4
  • Does this answer your question? Dual boot Win 8 / Ubuntu loads only Win
    – karel
    Apr 22, 2020 at 0:00
  • @karel that question and its answers don't say anything about networking... Apr 22, 2020 at 1:01
  • Get it to boot if you can. Then it will be easier to move on from there and solve the networking issue. If you get stuck with 18.04, 20.04 will be officially released tomorrow.
    – karel
    Apr 22, 2020 at 1:06
  • @karel OK, I've tried everything I can think of for the boot issue, including the steps in your linked question. I've edited the question to focus on the boot issue for now. Apr 22, 2020 at 2:38

1 Answer 1

0

It turns out this answer to an earlier question does work after all. I didn't explicitly test the premise of the answer, that HP laptops come with firmware that set the Windows entry first in the UEFI boot order each time the device is loaded. However, efibootmgr did show Windows placed earlier in the boot order than Ubuntu, even after reinstalling. After running efibootmgr to find out BootCurrent is 0000 for me (it may vary), I created a new startup script (/etc/systemd/system/boot-linux-next.service) with the following contents:

[Unit]
Description=Boot Linux next

[Service]
Type=oneshot
# Replace '0' in the next line with the appropriate code. Advice taken from https://askubuntu.com/a/1142709.
ExecStart=/bin/efibootmgr --bootnext 0

[Install]
WantedBy=multi-user.target

and ran sudo systemctl enable --now boot-linux-next.service. You should pay attention to the output of this command to make sure there are no errors - there seems to be a difference between Ubuntu 18.04.4 and later versions of Ubuntu where the latter are OK with relative paths for executables (efibootmgr) but the former requires an absolute path (/bin/efibootmgr). I was able to check the BootNext variable is set correctly by running efibootmgr; apparently the act of running systemctl causes the startup script to be run once. Booting has been normal since then, although I'm still concerned about what might happen the next time I try to boot Windows.

5
  • I am happy to read your answer and learn that you successfully solved your problem. If there is any other help that you need related to this problem please comment and I will try to provide you with additional help which may include creating a private chatroom because extended discussions in comments are normally discouraged and a private chatroom is the recommended alternative method. I don't want you to feel like you're locked in a loop with an unresponsive tech support telephone answering machine.
    – karel
    Apr 22, 2020 at 6:35
  • @karel I would very much appreciate the chance to discuss a couple of further issues. At the moment, this is a duct tape solution that will only work as long as I don't boot into Windows - whenever I do, I'll need a bootable USB drive next time around to get into Linux and change the BootNext variable again. I've been having various USB drives fail on me so I would like to learn about a permanent solution if one exists. Apr 22, 2020 at 6:53
  • Three resources at Ask Ubuntu for making bootable USB drives and fixing Windows boot problems. 1. Unable to boot into Windows after installing Ubuntu, how to fix? 2. What is the proper way of creating installation media from Ubuntu iso? 3. Why Doesn't a Bootable USB Boot
    – karel
    Apr 22, 2020 at 7:00
  • @karel Thanks for the answers, they are very pertinent - and thanks for helping me avoid the answering machine syndrome! I was wondering if you have a good technique in mind for making a sufficiently large USB drive bootable with multiple ISOs - this kind of thing used to be easier before UEFI and Secure Boot took over, but I imagine it must still be possible. I've tried one Ubuntu tool called multisystem but it's not always worked with my specific USB drives. Apr 22, 2020 at 22:45
  • Most of the multiboot answers on Ask Ubuntu are old and things have changed since the answers were posted since large USB drives are available now. I like these two recent up-to-date answers by Cameron: 1. askubuntu.com/a/992857 2. askubuntu.com/a/992818
    – karel
    Apr 22, 2020 at 23:28

You must log in to answer this question.

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