HP EliteBook: In BIOS mode, Manjaro boots automatically, but not in EFI mode

Run gparted and make sure that the flags boot & esp are set for your EFI system partition.

1 Like

I think so:

$ sudo parted -l
[sudo] password for mparillo: 
Model: ATA TOSHIBA MK2556GS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      2098kB  317MB  315MB   fat32                 boot, esp
 2      317MB   241GB  241GB   ext4
 3      241GB   250GB  8645MB  linux-swap(v1)

rename efi/boot/grubx64.efi to efi/boot/bootx64.efi. Normally it should install it as bootx64.efi.

Thank you. I followed another post and I:

$ sudo cp /boot/grub/x86_64-efi/core.efi  /boot/efi/EFI/boot/grubx64.efi

So now I have:

$ ls -l /boot/efi/EFI/boot
total 240
-rwxr-xr-x 1 root root 122880 Nov 19 13:19 bootx64.efi
-rwxr-xr-x 1 root root 122880 Nov 19 13:24 grubx64.efi

Should I:

$ sudo rm /boot/efi/EFI/boot/grubx64.efi`

EFI is not always EFI. You may check here for some examples.

Depending on the BIOS version we had to add a compatibility layer to /boot/efi/EFI/boot

[johnd@john-pc Desktop]$ ls /boot/efi/EFI/*

You may also try: cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/shellx64.efi

It looks as if I have what Johnd had:

$ ls /boot/efi/EFI/*
bootx64.efi  grubx64.efi


Then, after I:

$ sudo cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/shellx64.efi

And re-boot, it does not start, automatically but I can navigate the EFI file picker hierarchy, and I see shellx64.efi a level higher than the other two, and when I pick that, it launches the GRUB menu and Manjaro starts great.

Thanks for the link to the Arch Wiki, but this (https://wiki.archlinux.org/index.php/HP_EliteBook_840_G1#UEFI_Setup) implies I would need to update my BIOS, and I am too much of a newbie to risk bricking my laptop when it works perfectly fine in legacy boot, and the EFI file picker is not too painful.

You should have a Manjaro grub bootloader file beneath /boot/efi/EFI, usually in a Manjaro directory, depending on Calmares or Architect install.

$ ll /boot/efi/EFI/Manjaro
total 204
drwxr-xr-x 2 root root   4096 Aug 11 03:47 .
drwxr-xr-x 4 root root   4096 Aug 11 03:47 ..
-rwxr-xr-x 1 root root 198656 Aug 11 03:47 grubx64.efi

I think this is the bootloader you need to copy into /boot/efi/EFI/boot, which is the machines default bootloader.

sudo cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/EFI/boot/bootx64.efi

Check efi boot order with

efibootmgr -v

That is interesting, as it seems to have a history stored there, despite the fact I did a full disk install:

$ efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* Notebook Hard Drive   BBS(HD,�,0x0).......................................................................
Boot0001* USB Hard Drive 1 - SanDisk Cruzer Blade       BBS(HD,�,0x900).......................................................................
Boot0002* Notebook Ethernet     BBS(128,�,0x0)........................A..............................................
Boot0003* USB Hard Drive 1 - Kingston DataTraveler G3   BBS(HD,�,0x900).......................................................................
Boot0004* ubuntu        HD(1,GPT,d9836d37-8b89-4ae7-8063-4acd740cdaff,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0005* Manjaro       HD(1,GPT,6ff99a6b-4958-4119-8114-05ca935feaeb,0x1001,0x96001)/File(\EFI\Manjaro\grubx64.efi)

I already had something there:

$ ls /boot/efi/EFI/boot/bootx64.efi

But I:

sudo cp /boot/efi/EFI/Manjaro/grubx64.efi /boot/efi/EFI/boot/bootx64.efi

And, no, I do not boot automatically, only by navigating the EFI File Hierarchy and picking an efi file (any one of them work just fine).

Boot order looks screwy.

Boot0004* ubuntu
Boot0005* Manjaro

Manjaro should be first if you want to boot Manjaro grub.

$ efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,3001,2001,2002,2003
Boot0001* Manjaro       HD(1,GPT,4f35c312-635b-4979-8f81-442f4e445eed,0x1001,0x96001)/File(\EFI\Manjaro\grubx64.efi)
Boot2001* USB Drive (UEFI)      RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)      RC
Boot3000* Internal Hard Disk or Solid State Disk        RC
Boot3001* Internal Hard Disk or Solid State Disk        RC
Boot3002* Internal Hard Disk or Solid State Disk        RC

Check the boot options and boot order in your BIOS.

Also do a forum search, @gohlip has many posts on fixing screwy efi boot order configs using efibootmgr.

I think that did it only once.
I removed all the other entries with (replacing all numbers except for my Manjaro number, starting with 0):

$ sudo efibootmgr -b 0 -B

Then set my next one to be Manjaro:

$ sudo efibootmgr -n 5

And put it first in order:

$ sudo efibootmgr -o 5

So now I have:

$ efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* Notebook Hard Drive   BBS(HD,�,0x0).......................................................................
Boot0005* Manjaro       HD(1,GPT,6ff99a6b-4958-4119-8114-05ca935feaeb,0x1001,0x96001)/File(\EFI\Manjaro\grubx64.efi)

And note the 0 came back.

What about your BIOS boot options and boot order?

First, I noted you have Ubuntu (just removed) efi in different partition from Manjaro efi {different uuid’s but same drive)

Boot0004* ubuntu        HD(1,GPT,d9836d37-8b89-4ae7-8063-4acd740cdaff,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0005* Manjaro       HD(1,GPT,6ff99a6b-4958-4119-8114-05ca935feaeb,0x1001,0x96001)/File(\EFI\Manjaro\grubx64.efi)

If you had totally removed Ubuntu OS and reformatted the $esp when installing Manjaro (looks like it), then it’s okay and lets’ move on. But if Ubuntu is still there, please explain if you have 2 $esp’s (Ubuntu and Manjaro). Also if you have 2 disks or more and one of them is removable (I don’t think so but just to be sure), let us know as uefi booting is more complicated and requires some additional handling.

Second, just to mention copying grubx64.efi is the same as copying core.img. grubx64.efi is itself a copy of core.img; I prefer to copy core.img because when problems arise, the copy of core.img to grubx64.efi may itself be the issue (particularly when the distro’s developers modify grub).

Now I think the issue @mparillo faces is due to HP uefi firmware itself. There are some topics here in our forum where some HP systems, Asus (earlier notebooks), Lenovo laptops and MX(?) gaming laptops have difficulty getting to set default bootorders or have convoluted ways to do it. So let’s try out if this is the case (if the above 2 conditions are not relevant).

When booting up system, check bootsetup (F10?) if there is a uefi submenu with boot priority bootorder.
Is there a “custom boot entry”? Click on it and see if it ask you to “enter path to file” (or something like that).

If there is, then we on to something. Reboot and go to bios setup (F9?), chose EFI-file, write down path after every click, to the directory \EFI\manjaro\grubx64.efi.

Reboot, and go to boot options F10(?).
move custom boot to the top of priorities and then typed in the exact path like \EFI\manjaro\grubx64.efi
Note use'\' instead of'/' for directories and sub directories.
Save changes and reboot.

Good luck.

ps: this procedure is from a Bodhi (and HP) user who PM’ed me on a topic because I asked him to clarify the procedure he suggested (which is not required by that OP to solve the issue). {So I cannot send the link.}.
Other systems (like MX gaming laptops) are equally or more convoluted.

[edit] - see this link also as the OP there also have a HP system and resolved it by saving setup twice.

1 Like

Thank you very much. I do have an older HP, and I tried to follow the directions (Trying to change efi boot order with efibootmgr: GRUB falls into rescue mode!) but I have OS Boot Manager instead of OS Boot Loader, and worse, I cannot enter a path, only change the sequence. The Arch Wiki (https://wiki.archlinux.org/index.php/HP_EliteBook_840_G1#UEFI_Setup) seems to suggest I might do that with a BIOS Upgrade, but since the laptop boots perfectly in legacy mode, and I can live with selecting an EFI file, I would not want to risk bricking the laptop.

P.S. As you suggested, I previously tried to install Kubuntu in UEFI mode, but that did not work either, so I did a full-disk install of Manjaro over it.

You’re welcome.

That would probably the best. Bios-legacy is still working quite well and is (in a way) simpler.
I still have 2 systems on bios-legacy running beautifully.

Cheers, take care and regards.

The OP in the link above just added new screen shots to aid those whose HP is similar.
Yes, you said your HP may be the older one, but may be worth to take another look if it might help.

Good luck.

ps: maybe the OP there saw this topic and tried to help. Good of him. :clap:

Thank you, but unlike his, mine does not have an arrow by OS Boot Manager, and I cannot drill down into its settings. I can only exchange its order with Notebook Upgrade Bay (UEFI).

This worked for me and solved this for EFI on old HP BIOS systems, where the path is hard-coded to Microsoft:

$ cd /boot/efi/EFI
$ sudo mkdir Microsoft
$ cd Microsoft
$ sudo mkdir Boot
$ cd Boot
$ sudo cp /boot/grub/x86_64-efi/core.efi  bootmgfw.efi

Now that may mean I cannot dual-boot without going back to manually picking an efi file.

Hat Tip:


Sorry for getting back so late, but this does not help you as you had ‘replaced’ windows’ bootmgfw.efi.
In the askubuntu link that you referred to, there is a command before the replacement which is

sudo cp /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Microsoft/bootmgfw.efi

This ensures that windows’ bootmgfw.efi is still somewhere around for this file to be picked up by grub or by the system uefi bios (though I’m not sure if HP uefi can still do this).

Anyway, it is an improvement over your previous predicament and good to hear you can do what you wanted to. Cheers.

ps: if windows’ bootmgfw.efi is still around try ‘update-grub’ if this picks it up, or manually create an entry to chainload to this file (copy down the old windows entry before ‘update-grub’ so that we can manually amend it if we need to).

I want to thank you for all your EFI help, not only to me, and seemingly to everybody else here.

In this case, I never wanted to dual-boot Windows and Manjaro. I just wanted EFI to find Manjaro at power-on without having to hit escape at exactly the right moment, select boot from an EFI file, and manually navigating a directory tree. By copying my Manjaro EFI file to:


It now seems to work. I assume because the old BIOS I have was hardcoded to only look there.

My dual-boot question was relating to dual-booting another Linux. Specifically Kubuntu. On Legacy, when Kubuntu over-writes GRUB, I need to:

But normally, I understand EFI separates the bootloaders, so I would generally not need to that, but because my BIOS seems to look for a single, specific, EFI file in a single specific location, I am not sure I can dual-boot that easily. But as you note, I am better off than before.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark