• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
We have new content about Hotkey issue, Click here to check it out!
HP Recommended
bp093no
Linux

Hello, I come here in desperate help after having been trying everything I have seen posted in different forums and wikis.

 

I used to have a dualboot with Ubuntu and Windows 10 in my HP notebook, until today when I decided to replace my Ubuntu with Manjaro.

 

The instalation completed successfully but to my surprise, it did not manage to boot. The system was trying to boot to the old Ubuntu entry in the UEFI table, which obviously would not work anymore and would simply prompt me to an empty grub screen.

 

I manually select the file to load from by chosing the option "boot from EFI file" in the f9 booting option menu.

 

I boot into manjaro and I attempt to modify the bootloader with efibootmgr, and yes, efivars was mounted with proper RW properties. 

 

I delete some entries and everything seems to be working properly until I reboot. Once rebooted, it all had stayed the same.

 

I install efi shell so I have a closer interface to the hardware by using bcfg in case efibootmgr was buggy or not functioning well, but same results. It all seemed to work when in efibootmgr, but as soon as I rebooted, everything went back to what it was.

 

I booted once again manually into manjaro, and from there moved the old /boot/efi/EFI/ubuntu folder into somewhere else, and Voila, when rebooting the ubuntu entry is gone and it boots straight to windows 10, good progress.

 

I manage to boot into the EFI shell, and with instructions from the bcfg command i successfully add manualy an entry to the EFI tables, that WILL show in the f9 menu, but WILL NOT show in the boot manager options in the boot settings in the BIOS (Where only windows 10 will show as a way to boot)

 

And now, I still am stuck, trying to change the boot order but struggling with changes that reset after every single reboot.

 


Thank you for reading, I hope HP can help me with this one.

 

PD: I also updated today to the latest BIOS version.

 

 

EDIT: 10/05/2018

 

 

I have read that deleting /sys/firmware/efi/efivars/... Would delete the efi variables, and if the UEFI is well implemented, they would generate by default after reboot. Unfortunately, if it is not implemented properly, I will definitely brick my laptop. No BIOS to boot to, no rescue menu, nothing, apparently

 

So I am unsure of what to do at this point

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

I managed to fix this, and it finally worked, this is how it was solved.

TO SAVE TIME, THE INSTRUCTIONS AND THE TL;DR IS AFTER MY TROUBLESHOOTING EXPLAINATION

I booted into Windows, and decided to use another tool that was not linux related, so I tried downloading EasyUEFI from www.easyuefi.com.

To begin with I was happy that the program had seen the Manjaro entry, so I thought this was going to work. I tried re-ordering the boot entries so that Manjaro would lie at the beginning of them all, but it did not work. As soon as I restarted my computer everything was back to normal (not good normal) and booting into Windows 10.

I explored what more options the program had and apparently it had an option to restore the whole EFI partition. So I tried that.

WARNING, SOMETHING I DID NOT REALISE. This apparently did work and deleted all the other entries and all the other files in the EFI partition, only leaving Windows entries. This meant I could not get back into Manjaro, but at least verified that my NVRAM was still accepting changes and so on.

I made another Manjaro live USB and reinstalled Manjaro just as always, but before rebooting I decided to check if there had been any entry created in the UEFI bootloader. First I mounted /dev/sda1 to /mnt/boot and verified that the installer had indeed copied the boot correctly by finding them in  /mnt/boot/EFI/Manjaro , but later running efibootmgr -v command, revealed that it had not created an entry for it.

Having been "researching" I saw that I did not have the latest version for efibootmgr, since the Manjaro installer came with 15.1 version of efibootmgr and the latest one in the Red Hat Bootloader Team's github is version 16, so I decided to clone the git repository and install that version of efibootmgr.

After having done so I used the new version of efibootmgr to add a new entry to the UEFI menu thing, linked to the Manjaro folder and checked that the boot order was correct. So, I gave it one more shot and restarted my computer.

Eventhough the boot seemed  correct, it still booted straight away into Windows, which kinda disappointed me, but when rebooting into the BIOS setup, this time I could see it be displayed in the boot order options, where I simply put it on the top.

This time when I rebooted, it worked. It booted straight into Manjaros grub and everything loaded correctly, even when selecting Windows 10 in the grub itself.


Note: The reason I suspect the entry created in the EFI shell with bcfg didnt show up in the BIOS/UEFI boot order menu is because (at least according to efibootmgr) the new entry was marked at PXE and this latest one, did mark it as HD (Hard Drive I assume).




INSTRUCTIONS && TL;DR

 


Boot into Windows (if you have it, sorry if you dont, but you might have to find a way on how to do this in linux) and download and install easyUEFI from www.easyuefi.com

Followingly you will go to the option that will rebuild your partition. You select the necessary drives and you click rebuild.

 

HIS WILL ONLY LEAVE YOUR WINDOWS LOADER, YOU WONT BE ABLE TO BOOT INTO THE INSTALLED VERSION OF LINUX. (But we fix that soon)

 

 

Boot into your live distro, in my case Manjaro it is.

You can either follow the steps of your respective distro to reinstall the boot files or reinstall the system like I did.

Once installed, verify that /sys/firmware/efi/efivars is mounted as read and write

# mount | grep efivars

If it is not mounted, mount it by:

# mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars


if you cannot do any of this you are probably not booted in UEFI mode or the module didnt load for some reason.

 

 

Also verify that the boot files have been copied successfully and exist in the EFI partition.

(you can mount the partition into /mnt/boot and check inside the EFI folder)

Download and install the latest version of efibootmgr from this github repository

https://github.com/rhboot/efibootmgr.git

 

$ git clone https://github.com/rhboot/efibootmgr.git

go into it

$ cd {clonedfolder}/src

compile and install

# make && make install

Check that the current version corresponds with the one printed by:

 

 

 

$ efibootmgr --version


Then finally add the boot entry with the following command (Obvioulsy modified to fit your needs)

# efibootmgr -c -d /dev/sda -p 1 -L "Manjaro" -l "\EFI\Manjaro\grubx64.efi"


So, efibootmgr is the command

 


-c is the create function


-d is the ENTIRE EFI partition (in my case its /dev/sda/


-p is the partition number of the EFI partition, in my case it is 1 since /dev/sda1 is my UEFI partition


-L is supposed to write a tag to the entry, in my case it was supposed to write out Manjaro, it wrote out linux I don't know why.


-l is the location of the boot file. Write the correct location and remember to use backwards slashes for the directories.

Check everything looks correct by running

# efibootmgr -v

 

-v stands for verbose

Perhaps you might want to change the boot order, it didn't work for me and I had to do it from BIOS, but you might want to try with the command:

# efibootmgr -o  xxxx, yyyy, zzzz, aaaa

Where -o means order and the rest are the hex codes for the boot options you might have, like for example

# efibootmgr -o 0004, 0001, 0003, 0002


finally, reboot and voila.

 

View solution in original post

4 REPLIES 4
HP Recommended

@alsetema, welcome to the forum.

 

I suggest that you go to the Manjaro Forums here.  You will be more likely to get your answer from the experts on their Forum.

 

Please click the Thumbs up + button if I have helped you and click Accept as Solution if your problem is solved.



I am not an HP Employee!!
Intelligence is God given. Wisdom is the sum of our mistakes!!
HP Recommended
Hello. Thank you for your answer, I will also ask for help in their forums, but, sincd UEFI is OS independent and for what I have read, it heavily depends on the laptop's brand I will still seek for help here since I wouldnt care fixing this through windows for instance
HP Recommended
I have to add that since not even bcfg in the EFI shell managed to keep any settings after a reboot, I strongly believe this has more to do with some settings being overriden by something outside of any OS's power
HP Recommended

I managed to fix this, and it finally worked, this is how it was solved.

TO SAVE TIME, THE INSTRUCTIONS AND THE TL;DR IS AFTER MY TROUBLESHOOTING EXPLAINATION

I booted into Windows, and decided to use another tool that was not linux related, so I tried downloading EasyUEFI from www.easyuefi.com.

To begin with I was happy that the program had seen the Manjaro entry, so I thought this was going to work. I tried re-ordering the boot entries so that Manjaro would lie at the beginning of them all, but it did not work. As soon as I restarted my computer everything was back to normal (not good normal) and booting into Windows 10.

I explored what more options the program had and apparently it had an option to restore the whole EFI partition. So I tried that.

WARNING, SOMETHING I DID NOT REALISE. This apparently did work and deleted all the other entries and all the other files in the EFI partition, only leaving Windows entries. This meant I could not get back into Manjaro, but at least verified that my NVRAM was still accepting changes and so on.

I made another Manjaro live USB and reinstalled Manjaro just as always, but before rebooting I decided to check if there had been any entry created in the UEFI bootloader. First I mounted /dev/sda1 to /mnt/boot and verified that the installer had indeed copied the boot correctly by finding them in  /mnt/boot/EFI/Manjaro , but later running efibootmgr -v command, revealed that it had not created an entry for it.

Having been "researching" I saw that I did not have the latest version for efibootmgr, since the Manjaro installer came with 15.1 version of efibootmgr and the latest one in the Red Hat Bootloader Team's github is version 16, so I decided to clone the git repository and install that version of efibootmgr.

After having done so I used the new version of efibootmgr to add a new entry to the UEFI menu thing, linked to the Manjaro folder and checked that the boot order was correct. So, I gave it one more shot and restarted my computer.

Eventhough the boot seemed  correct, it still booted straight away into Windows, which kinda disappointed me, but when rebooting into the BIOS setup, this time I could see it be displayed in the boot order options, where I simply put it on the top.

This time when I rebooted, it worked. It booted straight into Manjaros grub and everything loaded correctly, even when selecting Windows 10 in the grub itself.


Note: The reason I suspect the entry created in the EFI shell with bcfg didnt show up in the BIOS/UEFI boot order menu is because (at least according to efibootmgr) the new entry was marked at PXE and this latest one, did mark it as HD (Hard Drive I assume).




INSTRUCTIONS && TL;DR

 


Boot into Windows (if you have it, sorry if you dont, but you might have to find a way on how to do this in linux) and download and install easyUEFI from www.easyuefi.com

Followingly you will go to the option that will rebuild your partition. You select the necessary drives and you click rebuild.

 

HIS WILL ONLY LEAVE YOUR WINDOWS LOADER, YOU WONT BE ABLE TO BOOT INTO THE INSTALLED VERSION OF LINUX. (But we fix that soon)

 

 

Boot into your live distro, in my case Manjaro it is.

You can either follow the steps of your respective distro to reinstall the boot files or reinstall the system like I did.

Once installed, verify that /sys/firmware/efi/efivars is mounted as read and write

# mount | grep efivars

If it is not mounted, mount it by:

# mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars


if you cannot do any of this you are probably not booted in UEFI mode or the module didnt load for some reason.

 

 

Also verify that the boot files have been copied successfully and exist in the EFI partition.

(you can mount the partition into /mnt/boot and check inside the EFI folder)

Download and install the latest version of efibootmgr from this github repository

https://github.com/rhboot/efibootmgr.git

 

$ git clone https://github.com/rhboot/efibootmgr.git

go into it

$ cd {clonedfolder}/src

compile and install

# make && make install

Check that the current version corresponds with the one printed by:

 

 

 

$ efibootmgr --version


Then finally add the boot entry with the following command (Obvioulsy modified to fit your needs)

# efibootmgr -c -d /dev/sda -p 1 -L "Manjaro" -l "\EFI\Manjaro\grubx64.efi"


So, efibootmgr is the command

 


-c is the create function


-d is the ENTIRE EFI partition (in my case its /dev/sda/


-p is the partition number of the EFI partition, in my case it is 1 since /dev/sda1 is my UEFI partition


-L is supposed to write a tag to the entry, in my case it was supposed to write out Manjaro, it wrote out linux I don't know why.


-l is the location of the boot file. Write the correct location and remember to use backwards slashes for the directories.

Check everything looks correct by running

# efibootmgr -v

 

-v stands for verbose

Perhaps you might want to change the boot order, it didn't work for me and I had to do it from BIOS, but you might want to try with the command:

# efibootmgr -o  xxxx, yyyy, zzzz, aaaa

Where -o means order and the rest are the hex codes for the boot options you might have, like for example

# efibootmgr -o 0004, 0001, 0003, 0002


finally, reboot and voila.

 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.