I have some files in Trash folder which can’t be deleted (neither like root). I would like to check the home directory by fsck to deal with the files. It is the standard home directory encryption set by the installation process (I suppose an encrypted LUKS container).
I’ll experiment with that, but it will be a few days before I can start experimenting. I mostly use an encrypted partition, rather than an encrypted home directory. I briefly experimented with encrypted home directory a while back, but I did not check that particular detail.
My current view is that “ecryptfs” provides a better way of setting up an encrypted home directory. This is the ubuntu way of doing it, but not fully supported with opensuse. Instead, you would have to install and setup a user first, then later switch that user to an ecryptfs home directory.
The image was heavily corrupted, but luckily the fsck fix it. Is it save to run the fsck on home partition (where the image file is)? I’m bit afraid, that it could corrupt the consistency of the image.
Okay. I wondered about that possibility (that the LUKS key was encrypted in another file). I’m glad you were able to track that down.
The image was heavily corrupted, but luckily the fsck fix it. Is it save to run the fsck on home partition (where the image file is)? I’m bit afraid, that it could corrupt the consistency of the image.
It should be safe, as “fsck” on a file system mainly deals with metadata, rather than file content. But I guess there’s still a slight risk.
If you want to play it extra safe, then boot with live media. Then mount your home partition read-only (to not further corrupt it). Then copy the container file to elsewhere (say an external drive).
Then umount the partition, and run fsck. If all goes well, you can delete the backup of the container file. If there’s a problem, you can copy it back from your backup.