This is not a request for help.
I am sharing what I did to fix my system for others to use as a reference.
This is a story about how I broke my Grub2 EFI Cryptodisk bootloader and then how I fixed it
Note: I don't know the proper name for the little Grub that unlocks LUKS partitions before loading the bigger GrubHow did I notice the problem?
I turned on my computer and was presented with the usual Grub2 EFI Cryptodisk unlock request
Welcome to GRUB!
Attempting to decrypt master key...
Enter passphrase for hd2,gpt2 (a3.....
Slot 0 opened
But then there was an error I had never seen before
error: file `/@snapshots/122/snapshot/boot/grub/x86_64-efi/normal.mod' not found.
I realize now that I deleted snapshot 122 and never updated Grub. The process below is an abridged version of what actually transpired. These are my notes that I typed into a second computer as I performed the fixing process.
# Useful articles I found on the Internet to educate myself on how Grub works
https://nixventure.blogspot.com/2015/08/grub-rescue-btrfs.htmlhttps://superuser.com/questions/1588626/grub-bootloader-with-luks-encryption-stuckhttps://www.linuxfoundation.org/blog/blog/classic-sysadmin-how-to-rescue-a-non-booting-grub-2-on-linux# We are starting in the EFI limited functionality Grub bootloader
# Use the set command to see settings
grub rescue> set
# Some minimal settings are provided
cmdpath=(hd2,gpt1)/EFI/siduction
prefix=(cryptouuid/####a_bunch_of_hex_codes/@snapshots/122/snapshot/boot.....
# Set the root to crypto0 because I already provided the LUKS password
grub rescue> set root=(crypto0)
# Set the prefix to where the grub bootloader is located
grub rescue> set prefix=(crypto0)/@/boot/grub/
# Load the normal module
# In normal mode, commands, filesystem modules, and cryptography modules
# are automatically loaded, and the full GRUB script parser is available.
grub rescue> insmod normal
# Call normal to load the full-service Grub
grub rescue> normal
# Now we are in the normal highly-functioning Grub bootloader
# Type the letter "C" to get to the Grub command line
c
# Show settings
grub> set
# a lot of settings are displayed here
# Prepare Grub by loading necessary modules
# I don't know if I need every one of these
# Loading more than needed will not hurt the process
# Loading fewer than needed will hurt the process
grub> insmod cryptodisk
grub> insmod luks
grub> insmod lvm
grub> insmod btrfs
grub> insmod part_msdos
# Instruct Grub to automatically mount all LUKS partitions
grub> cryptomount -a
# Provide my LUKS password here
# Set the root device
grub> set root=(crypto0)
# List the kernel and initrd files available
grub> ls /@/boot
# Decide which kernel to use
# Specify the kernel and initrd
# Do not fail to pass the root and rootflags to the kernel
# Notice the ro means to mount filesystems as read-only
grub> linux /@/boot/vmlinuz-6.3.8-2-siduction-amd64 root=/dev/dm-0 ro rootflags=subvol=@
grub> initrd /@/boot/initrd.img-6.3.8-2-siduction-amd64
# Boot
grub> boot
# If the process failed, then you will likely be dropped into the initramfs
# This is how I discovered the proper root device name to pass to the kernel
(initramfs) fdisk -l
/dev/dm-0 # This is the root filesystem
/dev/dm-1 # This is the swap partition
# The process worked, I am presented with the usual login screen
# Install and update Grub
$ sudo grub-install
$ sudo update-grub
# Reboot to see if the system has been fixed