Restore Manjaro GRUB entry to UEFI menu

At some time, something has to be modified in Calamares, so we don’t have all these -so frequent- failed boot installations.
Please check with OP

  • which ISO was used
  • which installer and version

and inform (again) philm about the process that creates failed boot installations.
In this one it seems “Replace Previous Installation” == Ubuntu, failed.
Also

again failed.

Okay, back early. Sky’s a bit dark.

I’ll explain first. You now do not have Ubuntu OS. But there is an Ubuntu efibootentry (in shim.efi). (And there is no Manjaro efibootentry - and I assume you’ve done the things petsam asked you to do as per the link). So what we do now is to use that Ubuntu bootentry for Manjaro.

But after we fix this, we may still want to find out why you could not fix manjaro efibootentry. But let’s fix it first.

Let’s start.
########################################################

  1. Boot up to Manjaro installed OS. Open terminal.
  2. Confirm the Ubuntu boot is there
    ls /boot/efi/EFI
    ls /boot/efi/EFI/ubuntu
    Is there an ubuntu directory and is the file “shimx64.efi” in it?
  3. Then
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/ubuntu/shimx64.efi

  1. Reboot normally.

##################################################
If it works, we can find out why you did not get manjaro into the efibootentry.
As starters, did you
(a) disable secure boot
(b) did you do (while in Manjaro) as per petsam’s link

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"

© more… but the 2 above would be key points.

And if you do fix manjaro efibootentry later on, you can just remove ubuntu bootentry later on, even as that boots manjaro as well.

It may be that your HP is really tied up with Microsoft (signature edition?).
(Ubuntu works because it uses microsoft keys and shim.)
And the above is the best ( not only - but in your situation, best) way to get manjaro to boot.

This thing works like charm man. Thanks a lot. Although boot entry in UEFI/BIOS is still named as Ubuntu, anyway to change that ?

a) My secure boot was never on the first place. Actually 2 years back when i actualy started using linux(ubuntu) my wifif couldn’t work due to some reasons and solving that it required secure boot to be off and since then i never i turned it in UEFI/BIOS.
b) I wasnt’ comforatble with that hd2 and hd1 stuff and as i could boot into Manjaro i never follow that link

Yes my laptop does comes with preinstalled windows 10 which i rarely use thoguh… Its just heck lot of time to waste for me to setup coding environment there and then deal with random errors.

As usual, first things first.

You’re welcome.
Yes. It is using ‘ubuntu’ bootentry’
You can only remove this entry after you get a ‘manjaro’ bootentry to work.
Before that, do not remove it. (relabelling? - haven’t looked into it, and not that I know of)

noted.

I don’t fully understand.
Are you saying you did not follow petsam’s link?
If you want to, you can try that. The 2 commands.

I still don’t know (not good with windows anyway) if your computer is tied up with Microsoft.
Some Lenovo’s are. But unsure about HP. Just sure about some messed up uefi firmware. Not sure about tie-in. And we cannot accuse without solid evidence.

Again, I do not fully understand. But if not important, good that you’ve got Manjaro ‘fixed’.

If you want to see what to do about manjaro efibootentry, we’re here.
But if you want to leave it meantime, its’ okay and it’s up to you.

Cheers, take care.

No i didn’t. I just followed everything he wrote here in the replies.
Yes i can try those 2 commands but what exactly are those 2 for? Are those for making Manjaro bootentry to work ?

If its not much of a work i guess i can do that.

The 2 commands are (when booted up to Manjaro OS) from the link are

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"

3 commands above. Additional grub-install is just to make sure you got it covered.
And I (unlike some people) just like to be sure.

Careful you do not make any typo. Especially the apostrophes (")
Not shown here as “manjaro” but as "manjaro"
There are 2 sets (total 4) of apostrophes, but it should be okay if you copy directly from above or from the link itself or typed directly into the terminal but do not type into this discourse forum and copy from it.

Good luck.

Ok i have the Manjaro boot entry now. Now i can simply remove ubuntu boot entry by deleting folder ubuntu under /boot/efi/EFI/ ? Also in future i may install ubuntu again so would deleting this ubuntu entry make it difficult to normally install ubuntu like it usually is done or it will have no effect at all ?

Good. Most important, good that your computer uefi is okay.
Yes, remove the Ubuntu efibootentry this way

sudo rm -Rf /boot/efi/EFI/ubuntu
sudo efibootmgr -b 0000 -B

Let’s take a look of your “efibootmgr” command before and after you did your commands above.
(maybe a reboot is necessary, but seldom needed).

No, it is not difficult and proceed as normal. But your case here shows you use ‘shimx64.efi’ for ubuntu (which works) but without secureboot, a grubx64.efi is sufficient and preferred.

[luv@luv-pc ubuntu]$ sudo efibootmgr -b 0000 -B
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 3000,0001,0002,0003,2001,2002,2004
Boot0001* Windows Boot Manager
Boot0002* manjaro
Boot0003* EFI Hard Drive (HGST HTS541010A9E680)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

Now seeing output, i have one more question(sorry if i am asking too many :no_mouth:
Boot0003* is what i used for booting into Manjaro earlier when neither ubuntu nor manjaro boot was working(by entering exit in ubuntu grub and then choosing EFI hardrive). So i want to ask isn’t Boot0003 and boot0002 duplicate ? if not what is boot0003 for… and if they are duplicate should and how can i remove 0003 ?

**BootOrder: 3000,0001,0002,0003,2001,2002,2004**
Boot0001* Windows Boot Manager
Boot0002* manjaro
Boot0003* EFI Hard Drive (HGST HTS541010A9E680)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

Do this…(first)

sudo efibootmgr -o 0002,0001

Recheck with “efibootmgr”

As for bootentries with “EFI xxxx”, “Internal Disk…”, “Hard Disk XXX”
Leave them alone. They are your system uefi firmware entries.
Even if you delete them, they will regenerate on next reboot (if there).
Oh “Hard Disk xxx” is the /boot/bootx64.efi and note the 1st additional command we use above.
If you mess up (some people do) and lose our manjaro grubx64.efi, we (system rather) still have this to boot and it is the manjaro boot. Heh Heh! Nice. I cheated (in a good way) to make sure people needing help here on this forum when messing up manjaro has this to boot.

2 Likes

That last thing is nice. Thanks for all the help. Hope i can run this satbly for next 2 years like i did with ubuntu 16.04 :stuck_out_tongue:

1 Like

This is how people “steal” hard-workers’ paychecks! :rofl:
I hope @philm will add this Manjaro-gohlip hack to Calamares and @chrysostomus to M-A.

@luvk1412 what ISO did you use for the installation?

1 Like

Can you post a more detailed feature request about it? For example in Next up in manjaro-architect

1 Like

[quote=“petsam, post:41, topic:50373, full:true”]

manjaro-deepin-17.1.10-stable-x86_64.iso

1 Like

The only way for me to reproduce this error was by typing.

$ mountvol /s s:

Means you where typing the arguments in the wrong order.

Sorry for bugging again, After that day today i needed windows for some work and when i try booting into windows by selecting that option through grub menu, it again takes me to manajro grub menu only and doesnt boots to windows.
I tried changing boot order in UEFI/BIOS also but it didn’t help. It still booted to grub. I think doing all the above steps to fix manjaro boot i somehow replaced windows boot also but i am not sure about it. Can you help ?

Also as u can see in UEFI its hows same thing in brackets for WIndows as well as Manjaro :expressionless:

At Manjaro, do the commands again.

sudo grub-install
sudo update-grub
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 additional ‘update-grub’ command is just to make sure in case windows has changed (possible when windows override boot).

ps: Your screen shot showing same ‘HGST HT5410xxxxxxxxxxx’ is correct. It is the disk name.
ps: you should boot windows using Manjaro grub menu (not at system menu as shown in screen shot). Doesn’t that work? Show windows entry at manjaro grub.cfg if it does not.

No doing above didn’t solve the problem. After doing above command when i tried to select windows from manajro grub menu it still loaded me to grub menu again. but then when i tried to enter Manjaro it showed me some ramdisk error and should coudl not continue to linux which actually scared me to death as i couldn’t boot into both of my os. I switched the boot order once in BIOS/UEFI and then it luckily entered in to manajro and now can enter Manjaro from both boot orders but not windows.
Here is what i see in grub menu. I am not sure about how to “Show windows entry at manjaro grub.cfg”

So notice the first manjaro (no windows) and the second manjaro (windows entry but cannot boot) are different Manjaro bootentries.

But right, let’s solve the problem and use what your HP uefi wants to use.
Your solution which works earlier is using Ubuntu shim.efi

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/ubuntu/shimx64.efi


You still have this Ubuntu entry right?

Refer…

Let’s start.
########################################################

Boot up to Manjaro installed OS. Open terminal.
Confirm the Ubuntu boot is there
ls /boot/efi/EFI
ls /boot/efi/EFI/ubuntu
Is there an ubuntu directory and is the file “shimx64.efi” in it?
Then

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/ubuntu/shimx64.efi

Reboot normally.

Good luck again.

Phew. :laughing: HP’s more messy than we thought.
And Please do not remove that Ubuntu bootentry, ever. You may have to redo this in the future.

I don’t know if you remember our last conversation or not but i had removed Ubuntu entry then :frowning: you can read above. :frowning: