maximbaz / arch-secure-boot

UEFI Secure Boot for Arch Linux + btrfs snapshot recovery
ISC License
126 stars 8 forks source link

Recovery.nsh does not show snapshots. #30

Closed bkmo closed 3 months ago

bkmo commented 3 months ago

I am at a loss getting recovery to list snapshots. In /efi I have both snapshots.text and recovery.nsh. When I execute recovery.nsh all I see is "No snapshot descriptions available" and it exits. I am using the included secure-boot-efi-shell.efi. Any direction would be appreciated.

maximbaz commented 3 months ago

Hello! It prints that warning when there's no snapshots.txt available in the current directory:

https://github.com/maximbaz/arch-secure-boot/blob/2909c3d0759edbc6697dfcd906aad819fb1a306f/recovery.nsh#L5

My best guess is that the script switches to this hardcoded FS0... location (?) to get to the location of the snapshots.txt:

https://github.com/maximbaz/arch-secure-boot/blob/2909c3d0759edbc6697dfcd906aad819fb1a306f/recovery.nsh#L2

Could it be that in your case the location is for whatever reason different? Maybe it is FS1, for example?

bkmo commented 3 months ago

Thanks, I found it to be FS2: I edited the script and it opened the list. I selected a snapshot, rebooted, and it booted into my default @ subvol. I have reverted my system for now.

maximbaz commented 3 months ago

If it booted in the incorrect subvolume, I'd check the content of CMDLINE in your recovery.nsh, maybe some more parameters need to be adjusted?

https://github.com/maximbaz/arch-secure-boot/blob/2909c3d0759edbc6697dfcd906aad819fb1a306f/recovery.nsh#L19