Unable to restore bootloader for LUKS file system

Hi, team
My Fedora 35 with LUKS fs can’t start with this error in emergency mode:

cannot open access to console, the root account is locked.
See sulogin(8) man page for more details

I know about the solution here
but after i mount my LUKS drive with this command and try to see group names, it returns nothing

sudo cryptsetup luksOpen /dev/nvme0n1p3 myvolume
sudo vgscan

so i can’t follow further instructions and restore bootloader.
Why doesn’t it show group names?

After you enter passphrase on cryptsetup you could also check with lsblk and find what beneath the myvolume. If there something mentioning for examplefedora_live-a and fedora_live-b means fedora_live is what you looking for.

Are you sure you are running lvm? I don’t think newer installs use lvm by default anymore.

I believe the default now is an ext4 /boot and a btrfs root.

The btrfs root contains two subvolumes. root mounted at / and home mounted at /home

1 Like

After i entered passphrase lsblk shows me this:

NAME         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0          7:0    0   1.8G  1 loop  /run/media/liveuser/disk
loop1          7:1    0   7.5G  1 loop  
├─live-rw    253:0    0   7.5G  0 dm    /
└─live-base  253:1    0   7.5G  1 dm    
loop2          7:2    0    32G  0 loop  
└─live-rw    253:0    0   7.5G  0 dm    /
sda            8:0    1  28.9G  0 disk  
├─sda1         8:1    1   1.9G  0 part  /run/initramfs/live
├─sda2         8:2    1   9.9M  0 part  
└─sda3         8:3    1  20.8M  0 part  
zram0        252:0    0     8G  0 disk  [SWAP]
nvme0n1      259:0    0 476.9G  0 disk  
├─nvme0n1p1  259:1    0   600M  0 part  
├─nvme0n1p2  259:2    0     1G  0 part  
└─nvme0n1p3  259:3    0 475.4G  0 part  
  └─myvolume 253:2    0 475.3G  0 crypt

So after i decrypt my volume with this command:

sudo cryptsetup luksOpen /dev/nvme0n1p3 myvolume

I should mount like this:

mount /dev/nvme0n1p1 /mnt/boot
mount /dev/mapper/myvolume /mnt

And then do this?
sudo chroot /mnt

If you have a UEFI system, it would probably be something more like this:

sudo cryptsetup luksOpen /dev/nvme0n1p3 myvolume
sudo mount /dev/mapper/myvolume /mnt -o subvol=root
sudo mount /dev/nvme0n1p1 /mnt/boot
sudo mount /dev/nvme0n1p2 /mnt/boot/efi
sudo mount -o bind /dev  /mnt/dev
sudo mount -o bind /sys  /mnt/sys
sudo mount -o bind /proc /mnt/proc
sudo chroot /mnt

Make sure you verify that /dev/nvme0n1p2 is your efi partition.

Notes:

  • If you are legacy/bios booting and you don’t have an efi partition, you can just skip the command that mounts /boot/efi.
  • We aren’t mounting /home here but you shouldn’t need it to rescue the system in a chroot