You are not logged in.
Hi all,
Please bear with me. I am at the tty and cannot easily use the paste-bin to show you outputs. I have to do it manually. Anyhow, here we go. Today I run fwupdmgr to get a BIOS and Thunderbolt3 updates in my Lenovo X1. Everything went seemingly well, but after installing the updates and rebooting I could not get into grub anymore. Following https://wiki.archlinux.org/index.php/Fw … FI_upgrade it seems to me that I need to reinstall my bootloader. I disabled secure boot to in order to boot from my USB, mounted my partitions, chrooted into them and tried to run efibootmgr to rebuild the bootloader.
grubx64.efi is located here: /boot/EFI/EFI/grub_uefi/
Instructions on how to use efibootmngr here (https://wiki.archlinux.org/index.php/Un … efibootmgr) were not very clear about the path so I created two entries as follows:
1) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/EFI/grub_uefi/grubx64.efi --label="Grub A" --verbose
and
2) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/grub_uefi/grubx64.efi --label="Grub B" --verbose
I can see those two entries when I start the computer (along with the common suspects, USB, HDD) but unfortunately both fail to get me to grub (regardless of secureboot being enabled or not)
Apparently they are pointing at:
1) /File(\EFI\\boot\EFI\grub.efi)/EFI/EFI/grub_uefi/grubx64.efi
2) /File(\EFI\\boot\EFI\grub.efi)/EFI/grub_uefi/grubx64.efi
Honestly they both look weird to me with the double \\ and grub.efi which does not exist in my system. Does anyone know what could possibly be going on here ?
Solution was:
1) reinstall grub with bootloader: i.e. grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
2) another possible solution involved invoking efibootmgr but I did not manage to get this one working (see comments below too see the mistakes I made here)
Last edited by fistrosan (2020-06-20 18:03:14)
Offline
I am at the tty and cannot easily use the paste-bin to show you outputs
https://wiki.archlinux.org/index.php/li … in_clients
I really should add that link to my signature like seth has...
Instructions on how to use efibootmngr here (https://wiki.archlinux.org/index.php/Un … efibootmgr) were not very clear about the path so I created two entries as follows:
1) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/EFI/grub_uefi/grubx64.efi --label="Grub A" --verbose
and
2) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/grub_uefi/grubx64.efi --label="Grub B" --verbose
You forgot to use the --loader option before giving the path to grubx64.efi
Any reason why you didn't just use the grub-install command instead? That will create a new NVRAM entry for you.
And if you copy grubx64.efi to $ESP/EFI/BOOT/BOOTX64.EFI then that should be booted even without any NVRAM entries. The --removable option for the grub-install command will do the same thing.
Jin, Jîyan, Azadî
Offline
Hi Head_on_a_Stick,
Thanks for chipping in. I was hoping you would since you were leading the discussion on the veracity of the efibootmgr commands
Aynhow, you are absolutely right I forgot to add "-loader". Big mistake. Let me try again and I will report back to you.
Cheers.
fistrosan wrote:I am at the tty and cannot easily use the paste-bin to show you outputs
https://wiki.archlinux.org/index.php/li … in_clients
I really should add that link to my signature like seth has...
fistrosan wrote:Instructions on how to use efibootmngr here (https://wiki.archlinux.org/index.php/Un … efibootmgr) were not very clear about the path so I created two entries as follows:
1) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/EFI/grub_uefi/grubx64.efi --label="Grub A" --verbose
and
2) efibootmgr --create --disk /dev/nvme0n1p1 /EFI/grub_uefi/grubx64.efi --label="Grub B" --verbose
You forgot to use the --loader option before giving the path to grubx64.efi
Any reason why you didn't just use the grub-install command instead? That will create a new NVRAM entry for you.
And if you copy grubx64.efi to $ESP/EFI/BOOT/BOOTX64.EFI then that should be booted even without any NVRAM entries. The --removable option for the grub-install command will do the same thing.
Offline
Hi again. It is now working. Here is a brief summary.
1) Adding the forgotten --loader did not work.
2) Copying grubx64.efi into the path you gave me did not work either. I assumed it was all capitalized. I tried both /boot/EFI/BOOT/BOOTX64.EFI and /boot/EFI/EFI/BOOT/BOOTX64.EFI.
3) Running grub-install did the trick for me. The reason I did not try this one to begin with was because it was not listed as a possibility in the fwupd wiki. However, it now loads directly the LTS kernel without even asking me. Should I run mkinitcpio -p linux to get it to load the latest (5.7 I believe) kernel ?
Thanks again !
Last edited by fistrosan (2020-06-19 23:16:44)
Offline
Adding the forgotten --loader did not work.
Yeah that's because you specified a partition for the --disk option instead of the disk. Use the --part option to specify the partition (which should just be a number) but it defaults to 1 (one) so you can just omit that for your system. I missed that error, sorry.
Copying grubx64.efi into the path you gave me did not work either. I assumed it was all capitalized. I tried both /boot/EFI/BOOT/BOOTX64.EFI and /boot/EFI/EFI/BOOT/BOOTX64.EFI.
Are you sure the ESP was actually mounted under /boot/EFI? Not all UEFI firmwares will actually load $ESP/EFI/BOOT/BOOTX64.EFI even though it is specified by the standard.
Running grub-install did the trick for me. The reason I did not try this one to begin with was because it was not listed as a possibility in the fwupd wiki. However, it now loads directly the LTS kernel without even asking me. Should I run mkinitcpio -p linux to get it to load the latest (5.7 I believe) kernel ?
The mkinitcpio command will just regenerate the initramfs image, to change GRUB's configuration edit /etc/default/grub and then run grub-mkconfig if you use that (see https://www.gnu.org/software/grub/manua … figuration for the documentation) or change /boot/grub/grub.cfg if you created your own manually.
Last edited by Head_on_a_Stick (2020-06-19 23:51:51)
Jin, Jîyan, Azadî
Offline