Fail to reinstall grub in dual boot system after crash

The grub boot menu is lost after crash and cannot locate RL 9.1 to boot in.
In BIOS, it didn’t show the RL (on the same disk different partition as Window that was shown before crash.).


After boot in by USB and lsblk, it looks like

fdisk like below (the /dev/sda is data disk)

I tried below to reinstall grub:

mount /dev/mapper/live-rw /mnt #also tried mount /dev/mappe/rl_localhost--live-root /mnt
mount /dev/sdb2 /mnt/boot
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
mount -o bind /run /mnt/run

chroot /mnt/
dnf reinstall shim-* grub2-efi-* grub2-common
grub2-mkconfig -o /boot/EFI/rocky/grub.cfg

The error msg is
/usr/sbin/grub2-probe: error: failed to get canonical path of ‘/dev/mapper/live-rw’

I’d tried to mount /dev/sdb6; /dev/mapper/live-base (this mount become read only) to /mnt respectively and doesn’t help.

After exit chroot, tried to deactiveate Volume group
vgchange -an rl_localhost-live
Logical volumen rl_localhost-live/swap in use
Can’t deactive volume group “rl_localhost-live” with 1 open logical volume
Then
lvchange -an /dev/rl_localhost-live/swap
Logical volume /dev/rl_localhost-live/swap in use.

Hope that someone can provide hints on how to restore the RL instead of reinstall it from scratch. Thank you.

That is incorrect path for RL9. The correct path is:

grub2-mkconfig -o /boot/grub2/grub.cfg

The grub.cfg in …/EFI/rocky/ is a stub file that points to your boot partition UUID.
Here is mine:

search --no-floppy --fs-uuid --set=dev 7277c17d-6897-497b-9390-1153c9bff018
set prefix=($dev)/boot/grub2
export $prefix
configfile $prefix/grub.cfg

So you’ll have to delete rocky/grub.cfg and recreate it with the above contents substituting your /boot UUID for the one after “–set=dev” then run grub2-mkconfig with the correct path again.

Thank you for the hint. Unfortunately, the same error
/usr/sbin/grub2-probe: error: failed to get canonical path of ‘/dev/mapper/live-rw’
block the update to grub file.

In my /boot/EFI/rocky/grub.cfg file, cannot find the line with “search … -set=dev …” just plenty lines of “search … --set=root…”

That’s because you over wrote it with your prior grub2-mkconfig command. What I posted above are the entire contents of the EFI/rocky/grub.cfg stub file. It needs to point to the /boot partition UUID. The error message, which I am not familiar with may be related to it not finding /boot when you are trying to fix this. I didn’t see that you mounted that partition in the initial post. I don’t know how to mount volumes, someone else will have to show the way.

Thank you! You had help me on the correct location of the grub.cfg.
I’m still fighting with the error message which looks like relate to LVM problem.
Looks like reinstalling the RL is the only way out.