You are not logged in.
Pages: 1
I'm using a UEFI system, with GRUB.
I find that I can reliably reproduce the following steps:
1. Install Arch Linux with GRUB, UEFI, reboot and verify it works
2. Power off the machine
3. Remove the disk
4. Boot up the machine, and expect no OS could be found
5. Power off the machine
6. Put the disk back
7. Boot up the machine, and now GRUB is lost (not in the UEFI entries)
I'd like to know how this happened.
Are the UEFI entries stored somewhere in the motherboard,
and when it is detected that a entry is no longer valid, the motherboard removes it?
Thank you.
Offline
Are the UEFI entries stored somewhere in the motherboard,
and when it is detected that a entry is no longer valid, the motherboard removes it?
Yes they are, you will want to read up on NVRAM. And that is likely what is happening, how this is implemented is of course motherboard specific and it looks like removing the entries upon not seeing the disc is what your UEFI firmware does.
Offline
Note that you have not really lost grub. You've lost the firmware entry for grub. Grub is still there, just where it was before.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Grub's .efi loader can be copied to the EFI system partition at /EFI/BOOT/BOOTX64.EFI, this should be booted automatically even in the absence of any NVRAM entries and so will allow you to remove and replace the drive without having to create a new NVRAM entry.
See also http://www.rodsbooks.com/efi-bootloader … ive-naming
Offline
Thanks all, now it makes sense!
Just learned something new about NVRAM.
/EFI/BOOT/BOOTX64.EFI seems also to be used by archiso
Offline
Grub's .efi loader can be copied to the EFI system partition at /EFI/BOOT/BOOTX64.EFI, this should be booted automatically even in the absence of any NVRAM entries and so will allow you to remove and replace the drive without having to create a new NVRAM entry.
As I understand it, this is permitted by the spec, but not required. While it usually works, therefore, it can't be guaranteed.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
While it usually works, therefore, it can't be guaranteed.
The Arch ISO image boots with the same method (albeit via PreLoader.efi) so it will probably work
Offline
cfr wrote:While it usually works, therefore, it can't be guaranteed.
The Arch ISO image boots with the same method (albeit via PreLoader.efi) so it will probably work
I agree it will probably work. But removable devices are treated differently and I think this *is* part of the spec in this case, though I'm not certain. See the refind web pages for details.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1