/home empty in decrypted partition

Hello,

I am trying to recover the data in /home from a failed 15.2 to 15.3 upgrade.
By using the rescue disk, I can see the computer’s HDD and its 2 partitions:

/dev/nvme0n1p2, fat 16, flags: boot, esp
/dev/nvme0n1p2, encrypted lvm2 pv, mount point system, flags: lvm

I then mounted nvme0n1p2 using crypsetup luksOpen /dev/nvme0n1p2 foo

I can now access all the files in the hard drive, but the /home folder has no files in it. The HDD was messed up by the system update, and that does not delete any file in /home, so what am I missing?
How can I get access to /home again?

Any help would be greatly appreciated

Show /etc/fstab from your root partition.

“/home” is a subvolume. You will need to separately mount that subvolume to see what’s there.

How do I mount a subvolume? after

crypsetup luksOpen /dev/nvme0n1p2 foo

I haver tried:
mount /dev/mapper/foo/home /mnt/hdd

but it does not work, it gives the error:
special device /dev/mapper/foo/home does not exist (a path prefix is not a directory)

which address should I use for the subfolder?

I’m not sure of the details, as I am not using “btrfs”. That’s why you were asked for content of “/etc/fstab” for the mounted system.

It is something like:


mount -o subvol=@home /dev/nvme0n1p2 /mnt/home

where “/mnt” should be replaced by wherever you mounted the root file system. But check the “fstab” in the mounted system for other details.

that unfortunately generates the error unknown filesystem type ‘crypto_LUKS’
So I guess now the question is how to mount a BTRFS encrypted subvolume?

this is my fstab:


/dev/system/swap  swap                    swap   defaults                      0  0
/dev/system/root  /                       btrfs  defaults                      0  0
/dev/system/root  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
/dev/system/root  /var                    btrfs  subvol=/@/var                 0  0
/dev/system/root  /usr/local              btrfs  subvol=/@/usr/local           0  0
/dev/system/root  /tmp                    btrfs  subvol=/@/tmp                 0  0
/dev/system/root  /srv                    btrfs  subvol=/@/srv                 0  0
/dev/system/root  /root                   btrfs  subvol=/@/root                0  0
/dev/system/root  /opt                    btrfs  subvol=/@/opt                 0  0
/dev/system/root  /home                   btrfs  subvol=/@/home                0  0
/dev/system/root  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
/dev/system/root  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=41D6-3391    /boot/efi               vfat   defaults                      0  2


The “fstab” info tells you:


mount /dev/system/root -o subvol=/@/home /mnt/home

except change the “/mnt” part to wherever you mounted the root partition.

Yes, that solved the issue, thanks a lot!