First, apologies if this is the wrong section to post; there doesn’t seem to be one specifically for installation issues.
I’ve very recently installed Manjaro Gnome to dual boot on a brand new HP laptop (OmniBook 7 Aero 13 Ryzen) which had Windows 11 pre-installed. I dealt with bitlocker and the installation was successful. But the laptop always boots straight to Windows unless I go through an annoying series of keypresses at start-up: F9 > Boot options > Boot from EFI file > SYSTEM > EFI > Manjaro > grubx64.efi
The latter is naturally what I want to be offered immediately.
After some searching I found this:
Oh No - It boots directly to Windows - What do I do?
Just boot to Windows.
Run CMD as Administrator
bcdedit /set {bootmgr} path \EFI\Manjaro\grubx64.efi
Reboot
It appears I did successfully change the path to the Windows Boot Manager, but it’s the Windows Boot Loader that should be changed. But this is where I’m out of my depth and conscious that a false move could make matters a lot worse.
Should I simply run: bcdedit /set {current} path \EFI\Manjaro\grubx64.efi ?
I suspect it’s not as simple as that and would appreciate some expert advice.
Thanks. No, I didn’t: first time I’ve come across it. It looks complex - more than I suspect I need to resolve my issue. I’d be very surprised if I need to install anything else - I just need guidance on tweaking what I’ve got.
@Teo
Thanks Teo, but with respect, my grub is not broken and doesn’t need restoring - I’m not failing to boot or getting a black screen. I can get to grub and load Manjaro successfully; it’s just a pain having to go through half a dozen key presses to do it. I’m pretty sure I simply need to configure the system to find it directly.
@jofi
Thanks jofi, but I’m not convinced. It looks like using a sledgehammer to crack a nut. And although rEFInd is platform independent, your link is to the Arch wiki, and I’ve read so many times Manjaro experts pointing out that Manjaro is not Arch. (And if rEFIfind was a necessary ingredient for a successful dual boot installation on modern systems I’d have thought it would be mentioned and recommended much more widely in the Manjaro documentation.)
Mod edit:Merged consecutive posts. Please use the Edit function to add more details.
The Arch wiki is the best reference out there. It shouldn’t be too hard to install rEFInd, see linux multi boot with refind (somewhat old). But then it’s only a consideration. I think setting the Windows Boot Manager path to Grub is just a hack. Perhaps this worked when it was posted back in 2020 or so but still even back then it was nothing more than a hack.
If you do not see the manjaro boot entry in the bios, then the efi variable for it was deleted. The install-grub rewrites the efi file AND sets the variable in the nvram.
Alternatively, the same can be achieved with the efibootmanager, a new entry has to be added pointing to the manjaro (grub) efi file.
~ efibootmgr ✔
Timeout: 0 seconds
BootOrder: 0000,2001,2005,2002,2004
Boot0000* Windows Boot Manager HD(1,GPT,f80c1f52-8f06-4991-989e-f4108339d98a,0x800,0x82000)/\EFI\Microsoft\Boot\bootmgfw.efiRC
Boot0002* Windows Boot Manager HD(1,GPT,f80c1f52-8f06-4991-989e-f4108339d98a,0x800,0x82000)/\EFI\Manjaro\grubx64.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0003* Manjaro HD(1,GPT,f80c1f52-8f06-4991-989e-f4108339d98a,0x800,0x82000)/\EFI\Manjaro\grubx64.efi
Boot2001* EFI USB Device RC
Boot2005* Internal Hard Disk or Solid State Disk RC
~
@pwx
Thanks pwx. There are options in the BIOS to set the boot order, but only between USB, HDD, Network etc. Yes, Manjaro and Windows are on same drive - there’s only the one drive. During my research on this I read somewhere that HP laptops can be a pain when it comes to this as the BIOS flexibility can be limited.
Mod edit:Merged consecutive posts. Please use the Edit function to add more details.
Thanks again pwx. All good as far as the last step: grub-install… Is it literally /dev/xxx I need to enter, or do I need to substitute a path relevant to my system for xxx, in which case how do I determine the correct path? (Sorry if this is a dumb question, but as you probably gather I’m out of my depth here.)
That will update the fallback efi entry. After that choose the hard disk in the uefi settings.
Add the windows entry after you reboot to manjaro normally, it will not work in the chroot (as per instructions above, OS-prober enable, and update-grub.)
By the way the windows boot is somewhat messed up too, you might want to fix this first.
Done that pwx, but it still boots straight to Windows. However, definite improvement: when I hold F9 while booting it now gives me a straight choice between Windows boot manager and Manjaro,
The output from sudo fdisk -x is:
~ sudo fdisk -x ✔
[sudo] password for nick:
Disk /dev/nvme0n1: 953,87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: PSENN001TA87QC0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 48C13179-0831-4DAC-9BAE-2C25ABADCECE
First usable LBA: 34
Last usable LBA: 2000409230
Alternative LBA: 2000409263
Partition entries starting LBA: 2
Allocated partition entries: 128
Partition entries ending LBA: 33
Device Start End Sectors Type-UUID UUID Name Attrs
/dev/nvme0n1p1 2048 534527 532480 C12A7328-F81F-11D2-BA4B-00A0C93EC93B F80C1F52-8F06-4991-989E-F4108339D98A EFI system partition
/dev/nvme0n1p2 534528 567295 32768 E3C9E316-0B5C-4DB8-817D-F92DF00215AE EBAC6425-ABE2-41CD-B83C-E5D2719549A8 Microsoft reserved partition
/dev/nvme0n1p3 567296 1026013183 1025445888 EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 45EF9F14-4277-4555-B15E-4EBB621C6D61 Basic data partition
/dev/nvme0n1p4 1998813184 2000396287 1583104 DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 95CFA53F-AE96-4CC9-A5D0-7AB3378D8351 Basic data partition RequiredPartition GUID:63
/dev/nvme0n1p5 1026013184 1998813183 972800000 0FC63DAF-8483-4772-8E79-3D69D8477DE4 D76CADE7-C303-4C12-9C1A-88CF7AE33509 root
Partition table entries are not in disk order.
So I tried: sudo grub-install --target=x86_64-efi /dev/nvme0n1 and that got the improvement mentioned above. Perhaps I should specify one of the partitions rather than the hard disk as a whole? One more tweak and I’ll have success?
Mod edit:Added backticks before and after command output.
Legacy (BIOS) installations install GRUB directly to the drive’s boot sector; whereas (U)EFI installations use the EFI partition (/dev/nvme0n1p1 in your case).
Molski, thanks - I think you could be right. But sorry, I don’t do “something like” when I’m already out of my depth. Can you please confirm that this is a valid command to use and won’t make things worse?