2

I just built a new PC with a MSI Z690 Tomahawk DDR4 motherbaord and I have 3 M.2 SSDs installed. I'm using one as a windows 11 drive and I have installed Ubuntu 22 on a different SSD. But when my computer restarts it doesn't show the GRUB menu. It boots directly into Windows 11.

I've scoured the internet and tried various things. I'm making this post in desperation after depleting all known solutions out there.

Things I have tried so far:-

For each of these, I have my Windows already installed on a drive and I install Ubuntu from a bootable USB drive.

  1. First I did it as I had always done for all my previous machines. I installed Windows 10 on the main M.2 drive. Then shrunk the partition with a 300GB space for the Ubuntu 20 LTS installation. I configured the space for a swap, root and home drives using the "something else" option when it asks for how to partition it. I've done this so many times and it always works. But this time, it installs ubuntu but doesn't show me the GRUB menu.
  2. That didn't work, so I tried installing Ubuntu using the automated install method that Ubuntu offers, the one where it automatically configures dual boot. That didn't work either. Same result.
  3. Then I erased everything from all the drives. Reinstalled Windows 11 on my main M.2. Thought I'd give it a go. Then I installed Ubuntu using the middle option it provides, which is to erase the entire disk and install Ubuntu on it. And this time I chose a separate SSD to do the installation on. And I went with Ubuntu 22.

Aside from trying these out, I have also tried the following options:-

  1. Enable/Disable Secure boot
  2. Enable/disable MSI Fast boot
  3. Enable/disable Memory Fast boot
  4. Booted into Ubuntu from live USB and ran a boot repair tool that automatically checks out GRUB and does the unhiding of the menu etc and upgrades GRUB.
  5. I also did the whole thing manually, boot from the usb via the "try Ubuntu" option and mounted the SSD, edited the /etc/default/grub file to set the grub menu from "hidden" to "menu" and then set the timeout from 0 to 10 and then updated the grub. I even came back after rebooting to check if the grub file had stayed updated and it did.
  6. I also once reinstalled Ubuntu after selecting the bootable drive as the one that was marked as the Windows bootable partition.

So this is what I have:-

enter image description here

And I've checked that the Windows 11 and my motherboard is set to use UEFI Bios.

And this is what my BIOS boot options look like:-

enter image description here

enter image description here

Not sure if you'd need any other information, but I would really appreciate having Ubuntu 22 alongside my Windows 11 in a dual boot config with the Grub menu showing up every time I boot.

RawCode
  • 233
  • Do you really mean Ubuntu Core 22? as it's still in beta and hasn't yet been released; only Ubuntu 22.04 LTS has (which is a different product; but the product on which the Ubuntu 22 products are built). (20 & 22 are intended for headless server operation and thus don't have desktop & multi-boot setup utilities you find in 20.04 & 22.04) – guiverc May 07 '22 at 11:26
  • 1
    Check grub settings. Grub 2.06 in Jammy Only run os-prober on first run and if it previously found other OS. Grub 2.06 turns off os-prober in /etc/default/grub. I have always turned off os-prober and used my own boot stanza in /etc/grub.d/40_custom. Also if Windows has fast startup on, os-prober will not find the Windows hibernated partitions. – oldfred May 07 '22 at 13:18
  • +1 for the excellent quality of your question. I'd go into /etc/default/grub, change the line GRUB_TIMEOUT=0 to GRUB_TIMEOUT=5, update it with sudo update_grub and restart. Press the shift button while starting and check if grub appears – kanehekili May 07 '22 at 18:41
  • Correction: Press the "Esc" button during start, since you have Uefi – kanehekili May 07 '22 at 19:21
  • @guiverc, yes, I meant 22.04, thanks for the clarification. – RawCode May 07 '22 at 22:00
  • @kanehekili I already mentioned in the question that I had done just that. Didn't work. But anyway, I fixed it in a different way. Answer below. – RawCode May 07 '22 at 22:01

1 Answers1

1

Fixed this.

I used the easyuefi application on windows to resolve this.

It's quite intuitive. And it works better when you have the grub installed in the same boot loader as windows.

Some things I had to struggle with along the way:-

  1. Make sure to disable fast boot from the bios, otherwise the keyboard doesn't work in the grub menu.
  2. The easy uefi let me change the boot order but it only worked when I set the boot order change to work only for the next time boot happened. So it has the feature where your change applies only for one time. And that's when it works. If you change the boot order permanently, it doesn't work at all. The way I finally fixed this is a bit convoluted. I had to basically change the path of the uefi on windows boot entry to the path shown for the ubuntu uefi. And for this i had to use the following command in command line mode in advance troubleshoot options that you get when you restart windows using advance restart mode.

bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

Just make sure that you're entering the path to ubuntu efi that you see in the ubuntu entry in easyUefi app. This is what finally worked for me.

Source, with more details - https://askubuntu.com/a/869099/1020105

RawCode
  • 233