Help to install bootloader on dual boot (windows 10/endeavouros)

Say /dev/sda2 is mounted at /efi.

I should think

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=EnOS --no-nvram

should work, creating a directory EnOS (next to Microsoft folder) containing grubx64.efi. Though no EFI boot entry will be created in nvram then.

Can I check that? or should I try reboot without the live iso in?

But where was it freezing trying to write to which? Or is it because it won’t write the entry in nvram that it freezes? :thinking:

Think it is because microsoft dont allow you to write in nvram

This is what I’m thinking also? :man_shrugging:

Writing to the ESP partition should work.

The trouble is writing the path to the boot file grubx64.efi into nvram fails

( efibootmgr -c -d /dev/sda -p 6 -w -L EnOS -l '\EFI\EnOS\grubx64.efi')

Yes … the boot portion?

Edit: boot sector!

I think this is the most possible reason.

IMHO, using systemd-boot might make things easier, for various reasons.

The current problem is that there is no Linux/Arch/EnOS bootloader file in the file system.
In one of the previously posted links, there was a suggestion to copy the Arch ISO bootloader (.efi file) to the Windows bootloader file (\EFI\Microsoft\Boot\bootmgfw.efi), overwriting it.
IIUC, systemd-boot has better discovery features than grub. As reported, if systemd-boot is loaded, this will make the firmware to show other NVRAM entries, even if I have no experience/knowledge to confirm it.

In the current status, there are two $ESP partititons, which make things more complicated.

I hope the above resumes possible choices, since I have no single solution. Testing and experimentation with patience are required. :person_shrugging:

I didn’t mean to suggest overwriting the Windows .efi with this:

If the information in the askubuntu link is correct, it should be possible to use e.g. \EFI\Linux\BOOTX64.efi

The path is also mentioned here:

What if you try it with efibootmgr -c -d /dev/sda -p 6 -w -L EnOS -l '\EFI\Linux\BOOTX64.efi'
instead?

Edit: Added missing code tag

Shouldn’t --removable flag with grub-install that OP tried have done that?

Perhaps worth a shot with setting the path with efibootmgr as well at this juncture.

–removable is placing the file (esp)/EFI/BOOT/BOOTX64.efi and that path is at least not mentioned in the askubuntu link. But (esp)/EFI/Linux/BOOTX64.efi is.

I don’t know if it works but it’s worth a try I think :person_shrugging:

Edit: In order to avoid everyone needing to click the link. According to the mentioned post in askubuntu these are thr valid paths for the .efi files for an Acer Aspire ES1-132 (same Acer series, different model):

\EFI\Linux\BOOTX64.efi (Linux)
\EFI\Microsoft\Boot\bootmgfw.efi (Windows Boot Manager)
\EFI\ubuntu\shim.efi (ubuntu SECURE)
\EFI\ubuntu\shim$cpu$.efi (ubuntu SECURE)
\EFI\ubuntu\grub.efi (ubuntu NORMAL)
\EFI\fedora\shim.efi (Fedora)
\EFI\android\bootx64.efi (Android)
\EFI\opensuse\grubx64.efi (topenSUSE)
\EFI\redhat\grub.efi (Red Hat Linux)
\EFI\SuSE\elilo.efi (SuSE Linux)
\EFI\ubuntu\grub$cpu$.efi (ubuntu NORMAL)

Edit edit: one could also just copy the .efi file that is created by grub to (esp)/EFI/Linux/BOOTX64.efi instead of using the efibootmgr

That’s fine. I was not referring to your suggestion. It is a known method (Archwki) for such cases.

IMHO, those paths may not exactly be reverse engineered, but calculated guessing. The actual paths are only known by the vendor firmware authors :person_shrugging: .

As I already said,

To overcome this, there are several possible trials that might work, and can only be verified/confirmed by the OP. Everything else is just random hypothetical suggestions.

If OP does not try each one at a time, but doing all together, it will only be confusing to him and everyone else watching :laughing: .

More loud thinking:

  • Each Acer model of that build time (2015-2016) may have different implementations/restrictions/conditions to overcome.
  • If this model can have a working Legacy mode, it might be easier to install Linux, since there is no bootloader file, but sector editing (MBR).
  • If the OP has another available PC, he can hook the laptop drive in that one and install, either in Legacy (if available in the laptop), or in UEFI. A successful UEFI installation will have a bootloader file on the disk, which can then be used/copied in one of the known override paths, in order to work with, when he replaces the disk into the laptop.
  • When --removable is used with grub-install command, while having two $ESP partitions, we suppose grub installs the generated file to the $ESP in the command line. After one such trial, efibootmgr did not show an NVRAM entry pointing at that path. Instead, it weirdly had two Windows entries, one for each $ESP.

I don’t know if OP tried to boot every possible boot entry (disks and Windows) after any actions.

  • A possible working workaround might by just copying a rEFInd bootloader file to a UEFI default, or Windows bootloader path. rEFInd is known to have excellent discovery features, among others. :wink:
  • One of GRUB’s great powers is its command line feature. If OP boots a media that uses grub as bootloader, he can manually search and boot to the installation on the laptop drive.
  • Whatever suggestions we make, it would be beneficial, if it was double-checked with Archwiki and manual pages, before adding more confusion for the OP. Not everything on the internets is really valuable and worth following blindly. I prefer man and Wikis :person_shrugging: .

If I were the OP, I would do a “tabula rasa” and start the whole thing from scratch.
I would also take note of each step to know what has been done and tried and what not.

As it is now, it all looks like a labyrinth without an exit :wink:

This is true…

I did some tests on my own Acer Aspire ES1-132 (I know, different model than OP, but at least the same series also the same age) not just for OP’s problem but because I wanted to know as well.

Result: The UEFI is not recognizing .efi files that are placed in the standard grub nor systemd-boot paths. That’s what I know from several installations on this laptop.
It does also NOT recognise the .efi in path (esp)/EFI/BOOT/BOOTX64.EFI
It does recognise the .efi files in (esp)/EFI/Microsoft/Boot/bootmgfw.efi and also in (esp)/EFI/Linux/BOOTX64.efi
I didn’t check all the other possibilities from this askubuntu link.

I just copied the .efi file from /boot/EFI/systemd/systemd-bootx64.efi to /boot/EFI/Linux/BOOTX64.efi (/boot is my esp) and now it’s showing up in my boot menu/UEFI as bootable device “Linux”.
systemd-boot of course still finds all the available .efi’s as bootable entries.

Besides hopefully being helpful for OP, I am really happy that after all these years I can boot “Linux” instead of “Windows Boot Manager” from UEFI/boot menu in order to get Arch started :partying_face:
Okay… it’s more a question of honor than function but still…

So, thanks OP for making me look at it again

Edit: So, @j_c in case you manage/managed (I lost the overview a bit) to install EndeavourOS with whatever bootloader please try and copy the .efi file that is created by grub or systemd-boot or refind to (esp)/EFI/Linux/BOOTX64.efi ((esp) to be replaced with your actual efi system partition, so usually either /boot or /efi or /boot/efi). After copying you should have the boot menu entry “Linux” in the UEFI/boot menu. If you boot that up the bootloader should start and be able to find also your Windows Boot Manager.

Edit edit: I went a bit back in the thread. So, you have installed grub successfully without freeze, right? You can try and

sudo cp /efi/EFI/BOOT/BOOTX64.EFI /efi/EFI/Linux/BOOTX64.efi

You can of course also copy the standard grubx64.efi instead of /efi/EFI/BOOT/BOOTX64.EFI. I just don’t know the exact location as I am currently on systemd-boot.
After that you should be able to boot “Linux” from boot menu/UEFI and it should launch grub

Just want to say thanks everybody for your great help of installing Endeavouros on this Acer Es1-533. But I didn’t succeed! Tried everything that was suggested and specially the last thread from PigOfDestiny was promising. I actually booted up in grub with grub prompt, but I could not get it to work, and in the end my windows partition was deleted so I had to start all over with that also. So for now I guess I’ll give up on this Acer laptop and leave it as it is…Thank you

Sorry to hear that. It seems like Acer is a bit tricky in that regards…
But if you managed to get grub booted, what went wrong then? Was Windows not present or did Linux not boot after all?

The windows partition was still there but now I was presented with the option to boot the windows boot manager and that booted up grub which only started up with a prompt, and linux didn’t boot…

Hmm, okay, but that sounds a bit like now one problem got solved and you would be able to get grub booted but something with the installation went wrong.
I mean, I understand that it’s probably quite frustrating. Technically you could now try to reinstall endeavour with grub or systemd-boot (doesn’t really matter) and then copy the .efi file to (esp)/EFI/Linux/BOOTX64.efi

From then “Linux” should be ready for booting and if the installation did go well the bootloader should find Windows as well.

I guess after all this tinkering and trying something in the Endeavour or bootloader installation might have gotten broken…

You are probably right, and yes quite frustrating when I think about how much time this is taking me…but maybe I’ll give it another try, can’t really decide.
The problem still is that I can only install endeavour without boot loader in the iso, otherwise the system freezes. And after that when I try to install boot loader --no-nvram , maybe I do something wrong, it gets complicated for me.