You are not logged in.

#1 2021-12-29 18:13:17

goldmund
Member
Registered: 2021-02-15
Posts: 73

[SOLVED] UEFI Shell after restoring previous BTRFS snapshot

Hi,

I've been messing around and learning about BTRFS on my VM as I'd like it to become my primary filesystem. I have followed the Wiki on Snapper to the letter and yet when I want to restore / to a previous snapshot from the USB, afterwards I reboot and end up inside UEFI Shell instead of in GRUB. I can get out of this shell by typing:

fs0:\EFI\GRUB\grubx64.efi

and then I see GRUB and all is fine.

If I arch-chroot using the USB stick and do grub-install, GRUB appears instantly. 

So my question is: since I haven't seen any advice on the Snapper Arch Wiki to reinstall GRUB after recovering a previous snapshot, I am wondering if it's a normal requirement. Or have I just misconfigured something in my GRUB config?

(my / snapshot is stored inside /.snapshots in its own subvolume @snapshots)

I am a newbie to GRUB, I've been happily using systemd-boot until I learnt it can't do BTRFS.

Thanks!

Last edited by goldmund (2021-12-29 22:45:56)

Offline

#2 2021-12-29 21:25:51

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] UEFI Shell after restoring previous BTRFS snapshot

goldmund wrote:

If I arch-chroot using the USB stick and do grub-install, GRUB appears instantly.

Did you check the NVRAM entries (with efibootmgr) beforehand? The motherboard might just be losing the boot entries.

If so then try adding the --removable option to the grub-install command.

goldmund wrote:

my GRUB config

That's just the configuration file for grub-mkconfig. It's better to share /boot/grub/grub.cfg instead, and perhaps /etc/fstab as well. The output of these commands would also be useful:

efibootmgr -uv
lsblk -f

Jin, Jîyan, Azadî

Offline

#3 2021-12-29 22:28:23

goldmund
Member
Registered: 2021-02-15
Posts: 73

Re: [SOLVED] UEFI Shell after restoring previous BTRFS snapshot

Head_on_a_Stick wrote:

Did you check the NVRAM entries (with efibootmgr) beforehand?

Thanks for your reply. I am not really familiar with efibootmgr, so I am just trying to sift through and understand the Wiki. However, a search for "NVRAM" in efibootmgr manual doesn't return anything. Would you be so kind and post me a specific command how to check the NVRAM entries? You probably don't mean bcfg inside the UEFI shell?

Head_on_a_Stick wrote:

That's just the configuration file for grub-mkconfig. It's better to share /boot/grub/grub.cfg instead, and perhaps /etc/fstab as well. The output of these commands would also be useful:

efibootmgr -uv
lsblk -f

/boot/grub/grub.cfg
# efibootmgr -uv
# lsblk -f

Offline

#4 2021-12-29 22:35:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] UEFI Shell after restoring previous BTRFS snapshot

goldmund wrote:

post me a specific command how to check the NVRAM entries? You probably don't mean bcfg inside the UEFI shell?

Just the plain 'efibootmgr' command will show the NVRAM entries, as will 'bcfg boot dump -v' from the UEFI shell.

The output you have shared does indeed seem to show a lack of boot entries so try adding --removable to the grub-install command. That will copy GRUB's EFI loader to /EFI/Boot/bootx64.efi on the EFI system partition, which should be booted if no NVRAM entries are present (or if the relevant device is selected from the UEFI firmware boot menu).


Jin, Jîyan, Azadî

Offline

#5 2021-12-29 22:44:59

goldmund
Member
Registered: 2021-02-15
Posts: 73

Re: [SOLVED] UEFI Shell after restoring previous BTRFS snapshot

Head_on_a_Stick wrote:

Just the plain 'efibootmgr' command will show the NVRAM entries, as will 'bcfg boot dump -v' from the UEFI shell.

The output you have shared does indeed seem to show a lack of boot entries so try adding --removable to the grub-install command. That will copy GRUB's EFI loader to /EFI/Boot/bootx64.efi on the EFI system partition, which should be booted if no NVRAM entries are present (or if the relevant device is selected from the UEFI firmware boot menu).

Nice! Adding --removable to the grub-install command worked! Thanks for your patience, much appreciated! Happy New Year!

Offline

Board footer

Powered by FluxBB