Unable to set Manjaro Grub as default

I installed Manjaro 17.1.10 xfce alongside with Windows 10 and Ubuntu 16.04, but I’m facing the problem of setting the Manjaro Grub as default. When I turn on my computer, the Ubuntu Grub loads and detects Ubuntu, Windows, and Manjaro. However, it will not let me boot into Manjaro (I read somewhere that is due to the intel-ucode.img that needs to be loaded before the OS, which in Ubuntu is part of the OS).

I can boot into Manjaro if I plug a a bootable USB with manjaro and using the Grub from the memory doing :

grub> search.file /etc/manjaro-release root
grub> configfile /bootgrub/grub.cfg

But even if I do

sudo grub-install /dev/sda 
sudo update-grub

or

sudo grub-install
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sda -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

The Ubuntu Grub always boots.

I have also tried

sudo efibootmgr -o 0006,0000,0004

where 0006: Manjaro, 0000: Ubuntu 16.04, and 0004: Windows 10

I also reinstalled Manjaro, but didn’t work.

If is worth something, my partitions are as follow:

/dev/sda1: EFI partition
/dev/sda2: Windows 10
/dev/sda3: Ubuntu 16.04
/dev/sda4: Manjaro 17.1.10
/dev/sda5: swap
/dev/sda6: NTFS partition

If someone could help me with this I would be very gratefull. I have been dealing with Manjaro for about 2 weeks and I have been unable to use it without issues and I really want to give it a try.

UPDATE:
So, after having just too much random freezings every x seconds at random startups, I decided to reinstall everything. This is what worked for me in a second attempt. I first installed Windows 10, and shrink enough space for manjaro, some data, and swap. Then I manually installed manjaro selecting the partition and selected ‘\boot\efi’ to the respective partition.

In my case the partitions were as follow:

  • \dev\sda1 - Recovery
  • \dev\sda2 - Boot
  • \dev\sda3 -
  • \dev\sda4 - Win10
  • \dev\sda5 - NTFS partition
  • \dev\sda6 - Manjaro
  • \dev\sda7 - Swap

After installing everything and trying to reboot into my fresh installation of manjaro at reboot, it didn’t work (as expected)and went right into windows.

At this point I tried to do what Ubuntu Boot Repair asked me to do when repairing it. I went to windows. Then I made sure that the partition with the loaders had \boot\efi\EFI\Manjaro\grubx64.efi. Once I was sure that the grubx64.efi file existed I went into an admin CMD and typed:
bcdedit /set {bootmgr} path \EFI\Manjaro\grubx64.efi

That solved the issue with grub not running at the start. However, I’m pretty sure that this is going to block any other grub of any other OS I Stallaktion in the future… Something like what I originally describe here, no way of making manjaro grub to start as main grub.

From the link that you used which you do not refer, what’s


efibootmgr -v
sudo parted -l
sudo blkid
findmnt -s
findmnt /boot/efi

And again from the link,
What’s computer make and model?
And have you tried the other links for [Difficult UEFI setups] there?

Please be thorough.

Well, the trick is to get Windows out of the game with it’s own tools. This is why I am so surprised by your solutions. Booting into Win10 and have it nocked out itself will do.
Therefore and once again:
Boot into Win10 and start a Admin Powershell with <win>+<x>

$ mountvol s: /s
$ s:

While “s:” can be any drive letter of your choice that is not used.
check for the Manjaro entry in EFI.

[koeti@PSYCHO efi]$ ls -l ./EFI
total 12
drwxr-xr-x 2 root root 4096 Apr 24 22:36 Boot
drwxr-xr-x 2 root root 4096 Jun 23 01:34 Manjaro
drwxr-xr-x 4 root root 4096 Apr 30 03:26 Microsoft
[koeti@PSYCHO efi]$ ls -l ./EFI/Manjaro/
total 124
-rwxr-xr-x 1 root root 123392 Jun 24 13:57 grubx64.efi

These commands have been issued running Manjaro. The path in Windows will be like

s:\EFI\Manjaro\grubx64.efi

Now let’s kick the Windows Bootmanager and replace it with grub. You MUST be in a Windows Admin Powershell. First make a note of the output of bcdedit and here from path and description (the latter is actually of none importance)

$ bcdedit

The path on the very top is important if you decide to get back to windows only.
Now give control over your system to Manjaro Grub:

$ bcdedit /set '{bootmgr}' path \EFI\Manjaro\grubx64.efi
$ bcdedit /set '{bootmgr}' description "Manjaro x64"

or what ever description you prefer.
Do another:

$ bcdedit

to check your results and reboot if satisfied.

I did that multiple times on a Lenovo Y50 and Surface Pro 1796 and it always works. Windows Bootmanager is now out of the game and will not even show up in your BIOS anymore. However, after booting Manjaro do a

$ sudo grub-install
$ sudo update-grub

All your OS’s will now be available and controlled by the Manjaro Grub

Addition:
This is also true for the Ubuntu Grub. This is somehow not able to boot Manjaro. Important is, that secureboot is disabled. I think it is in your case because Manjaro would not have installed in the first place.

Thanks for your reply. To be hones, I have checked a lot of links (lots of them pointing to or having been answered by you). A list of the sites I’ve visited and I had open in my phone and computer are:

Kernel Panic on Boot
Restoring Manjaro Grub After Ubuntu Upgrade
https://wiki.manjaro.org/index.php?title=Restore_the_GRUB_Bootloader
https://forums.linuxmint.com/viewtopic.php?t=119292





With respect to the outputs you asked me, here they are. I included what Ubuntu was showing in case it’s worth something

**$ efibootmgr -v

Ubuntu:

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0007,0001,0002,0004,0003,0006,0008
Boot0000* ubuntu	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* UEFI: IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0002* UEFI: IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0003* manjaro	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\manjaro\grubx64.efi)
Boot0004* Windows Boot Manager	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0006* manjaro	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\Manjaro\grubx64.efi)
Boot0007* UEFI: IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0008* UEFI: IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv6([::]:<->[::]:,0,0)..BO

Manjaro:

BootCurrent: 0009
Timeout: 2 seconds
BootOrder: 0009,0000,0007,0001,0002,0004,0003,0006,0008
Boot0000* ubuntu	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* UEFI: IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv4(0.0.0.00.0.0.0,0,0)..BO
Boot0002* UEFI: IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0003* manjaro	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\manjaro\grubx64.efi)
Boot0004* Windows Boot Manager	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0006* manjaro	HD(1,GPT,0b92f5d9-9346-4725-9e99-65a55902654f,0x22,0x1007de)/File(\EFI\Manjaro\grubx64.efi)
Boot0007* UEFI: IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv4(0.0.0.00.0.0.0,0,0)..BO
Boot0008* UEFI: IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(600292427622,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0009* UEFI: KingstonDataTraveler 2.0PMAP	PciRoot(0x0)/Pci(0x14,0x0)/USB(4,0)/HD(2,MBR,0x51ca6a5,0x367b98,0x2000)..BO

sudo parted -l

Ubuntu and Manjaro:

Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                  Flags
 1      17.4kB  538MB   538MB   fat32           EFI System Partition  boot, esp
 2      538MB   108GB   107GB   ntfs                                  msftdata
 3      108GB   215GB   107GB   ext4
 4      215GB   317GB   101GB   ext4
 5      317GB   329GB   12.9GB  linux-swap(v1)
 9      329GB   990GB   661GB   ntfs            Basic data partition  msftdata
10      990GB   1000GB  10.1GB  ntfs            Basic data partition  hidden, diag

**$ sudo blkid

Ubuntu and Manjaro:

/dev/sda1: UUID="4BBD-3C9E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="0b92f5d9-9346-4725-9e99-65a55902654f"
/dev/sda2: UUID="363880664D08FC62" TYPE="ntfs" PTTYPE="dos" PARTUUID="5ca9c328-5d0e-49e1-9c57-0f538bb4b594"
/dev/sda3: UUID="2664046d-cb22-4b33-978b-bb2061effc53" TYPE="ext4" PARTUUID="378f1093-fb2e-48ac-a671-bd3ccc7aafa3"
/dev/sda4: UUID="275ed997-ebe0-4f18-84c6-3b5f7f46f609" TYPE="ext4" PARTUUID="23ee6e51-2728-4c4b-8459-cd2fd92064ad"
/dev/sda5: UUID="5039c8ea-6aaf-45b4-8121-a0d6eb5b3472" TYPE="swap" PARTUUID="aa5e5b20-92b9-4011-839d-89c62c6e4620"
/dev/sda9: LABEL="DATA" UUID="FA9A720A9A71C3A3" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="394aee1d-b151-4fba-a224-bb1b4fc6f60f"
/dev/sda10: LABEL="RECOVERY" UUID="62F4516DF4514507" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="611dedad-7525-11e6-95b3-b267bcdf21f6"

**$ findmnt -s

Ubuntu:

TARGET    SOURCE                                    FSTYPE OPTIONS
/         UUID=275ed997-ebe0-4f18-84c6-3b5f7f46f609 ext4   errors=remount-ro
none      UUID=5039c8ea-6aaf-45b4-8121-a0d6eb5b3472 swap   sw
/boot/efi UUID=4BBD-3C9E                            vfat   defaults

Manjaro:

TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=4BBD-3C9E                            vfat   defaults,noatime
/         UUID=2664046d-cb22-4b33-978b-bb2061effc53 ext4   defaults,noatime
swap      UUID=5039c8ea-6aaf-45b4-8121-a0d6eb5b3472 swap   defaults,noatime

**$ findmnt /boot/efi

Ubuntu:

TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iochar

Manjaro:

TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda1 vfat   rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro

Thanks for replying!
Even though the Windows Boot Manager is not showing up, I will give it a try and let you know what are the results.

The Windows Bootmanager (Win10) is only good to handle Windows. It will ignore any other OS. So what good is it for when you want to boot other OS’s than Windows? In fact, i have my system setup with the Win10 Bootmanager still in place. But only for testing my commands with the efibootmanager. And I did that just today and the outcome is rather unpredictive. Sometimes it works, sometimes I have to plug in the LiveUSB. Still investigating…

You’ve said, you’ve done

Yet in ‘efibootmgr’ both in Ubuntu and Manjaro (they should be the same),
0006 is not the first, 0000 (Ubuntu) is.
And you are using shim in Ubuntu.

Have you disabled secureboot?
And what is computer make and model?

I have (am) preparing a method where you should be able to boot Manjaro from Ubuntu grub while waiting to hear from you secureboot and computer make and model.

System:
  Host: PSYCHO Kernel: 4.16.14-2-MANJARO x86_64 bits: 64 Desktop: N/A 
  Distro: Manjaro Linux 17.1.10 Hakoila 
Machine:
  Type: Laptop System: Microsoft product: Surface Pro v: D:0B:09F:5C:09P:38S:01E:0 
  serial: <root required> 
  Mobo: Microsoft model: Surface Pro serial: <root required> UEFI: Microsoft 
  v: 233.2110.770 date: 01/30/2018 
CPU:
  Topology: Dual Core model: Intel Core i5-7300U bits: 64 type: MT MCP 
  L2 cache: 3072 KiB 
  Speed: 601 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 
  4: 601 
Graphics:
  Card-1: Intel HD Graphics 620 driver: i915 v: kernel 
  Display: x11 server: X.Org 1.19.6 driver: intel unloaded: fbdev,modesetting,vesa 
  resolution: 2736x1824~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2) 
  v: 4.5 Mesa 18.1.1 
Audio:
  Card-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k4.16.14-2-MANJARO 
Network:
  Card-1: Marvell 88W8897 [AVASTAR] 802.11ac Wireless driver: mwifiex_pcie 
  IF: wlp1s0 state: up mac: c4:9d:ed:8f:3e:4f 
Drives:
  HDD Total Size: 297.95 GiB used: 128.34 GiB (43.1%) 
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEBKF256G7 size: 238.47 GiB 
  ID-2: /dev/sda type: USB vendor: Generic model: SD MMC size: 59.48 GiB 
Partition:
  ID-1: / size: 62.49 GiB used: 12.85 GiB (20.6%) fs: ext4 dev: /dev/nvme0n1p5 
Sensors:
  System Temperatures: cpu: 32.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 162 Uptime: 1h 55m Memory: 7.72 GiB used: 1.39 GiB (18.1%) 
  Shell: bash inxi: 3.0.10 

Unfortunately my Lenovo Y50 is still in repair and I am over the road till August. I am burning to get it back and do testing on it.

[suchus@PSYCHO efi]$ efibootmgr -v
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0005,0001,0000,0002
Boot0000* Internal Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)SDD.
Boot0001* USB Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)USB.
Boot0002* PXE Network	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)PXE.
Boot0003* MsTemp	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(2,GPT,493a4183-68c3-4027-81a9-c48b76eda317,0xdc,0x1680)
Boot0004* manjaro	HD(1,GPT,79e30bbe-bc06-43db-a1cb-98e69ff8dda1,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)
Boot0005* Windows 10	HD(1,GPT,79e30bbe-bc06-43db-a1cb-98e69ff8dda1,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................

This is the unstable versionn iam running now

you can change the boot order in bios setup
its called as hard disk BBS priorities put manjaro on top
then you will see manjaro grub on startup

thats not working

Some UEFI firmwares require a bootable file at a known location
you can copy an already installed GRUB EFI executable to the default/fallback path

cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI

Here’s one way to boot Manjaro from Ubuntu’s grub (since you have Ubuntu grub)

  1. Boot to Ubuntu, At Ubuntu terminal,
sudo touch /boot/grub/custom.cfg
  1. Open up this file, add entries below and save the file.

menuentry "Manjaro - multiboot " {
               insmod part_gpt
               insmod ext2
               search --no-floppy  --fs-uuid --set=root 2664046d-cb22-4b33-978b-bb2061effc53
               chainloader /boot/grub/x86_64-efi/core.efi
     }


menuentry "Manjaro - chainload " {
               insmod part_gpt
               insmod fat
               search --no-floppy  --fs-uuid --set=root 4BBD-3C9E
               chainloader /EFI/Manjaro/grubx64.efi
     }


menuentry "Manjaro - configfile "  {
    insmod part_gpt
    insmod ext2
    search --no-floppy  --fs-uuid --set=root 2664046d-cb22-4b33-978b-bb2061effc53
    configfile /boot/grub/grub.cfg
}

  1. Reboot.
    It should boot up to Ubuntu’s grub and at bottom of grub menu are these 3 additional entries.
    Configfile may not work if you are using Ubuntu’s shim (secureboot) but try out all, starting with chainload, multiboot and configfile.

ps" I’m still waiting for your computer make and model.
It may be tied up with Microsoft (and shim).

2 Likes

OP had said he had done…

Same thing. Only better.

This is a path and file created by Microsoft. Next Boot or Update by Microsoft can and will replace it because it is considered (rightfully) compromized. DO NOT TOUCH THESE FOLDERS!

No. It is not. It is the disk boot file for the device.
Nothing to do with microsoft.
The thing about your method, calvous, is that you are asking people to use Windows boot through Easybcd and then to Manjaro grub.

I’ll remember to ask you if anyone wants to do specifically that.

And you’re using Microsoft Surface Pro :smile:

As I said, I am still investigating. But this files and folders are no subject to be changed by commands other than efibootmgr or bcdedit. And I absolutely disadvice to use Easybcd. This is very confusing for uneducated users.
Modern (or NowADays) PCs and Laptops and Tablets like the Surface are infiltrated with Microsofts !11@#$44@#$. Therfore use Microsoft’s tools to kick itself. It’s just one command on the powershell and by the way the one to install rEFIind. Check this:

BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0001,0000,0002
Boot0000* Internal Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)SDD.
Boot0001* USB Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)USB.
Boot0002* PXE Network	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)PXE.
Boot0003* SurfaceFrontPage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(4042708a-0f2d-4823-ac60-0d77b3111889)VOL+.
Boot0005* Manjaro x64	HD(1,GPT,79e30bbe-bc06-43db-a1cb-98e69ff8dda1,0x800,0x82000)/File(\EFI\Manjaro\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................

Last line done by ‘bcdedit’. Win10 won’t touch it.

And BTW: I bought that Surface Pro for the amazing screen (3:2). Where all others have the completely useless (when you want to get some work done) 16:9. I HATE THAT :face_with_symbols_over_mouth:

Exactly. Your system will use only GUID a881d567-6cb0-4eee-8435-2e72d33e45b5.
So you will have no choice.
Some Lenovo’s are like that, BTW.
The rest of us don’t need to follow, or use your method (unless they want to - suckers :grin:).

The matter of fact is @gohlip, every other request here is about the issue of Manjaro not booting after install. We have to come up with a solution. And we should tag this to the very top of all forums reading “Here is how to!”

I understand. But to reply to you properly, it will require a very long response.
But being the polite guy that I am :rofl:, I acknowledge your comment but defer any response.

Cheers.