Didn't encrypt / Can't access private data

Hello everyone.

Just finished installing ArchLabs but I encountered problem after mounting one of the partitions (my former /home). Found there two files inside: Access-Your-Private-Data.desktop and README.txt. Trying to run ecryptfs-mount-private produced ERROR: Encrypted private directory is not setup properly. Which is the reason I’m making this topic. Anyone has any clue how to get my data back?

Thanks in advance for the answers.

Nevermind. I’m just going to format the whole partition. But I’m still confused what and when encrypted homuser folder.

We use dm_crypt for the encryption

The following is the actual encryption code

luks_password() {
    dialog --backtitle "$BTITLE" --title " $_PrepLUKS " --clear --insecure \
        --passwordbox "$_LuksPassBody" 0 0 2> $ANS || prep_menu
    PASSWD=$(cat $ANS)
    dialog --backtitle "$BTITLE" --title " $_PrepLUKS " --clear --insecure \
        --passwordbox "$_PassNUsrBody2 $LUKS_ROOT_NAME" 0 0 2> $ANS || prep_menu
    PASSWD2=$(cat $ANS)
    if [[ $PASSWD != "$PASSWD2" ]]; then
        dialog --backtitle "$BTITLE" --title " $_ErrTitle " --msgbox "$_PassErrBody" 0 0
        luks_password
    fi
}

luks_open() {
    LUKS_ROOT_NAME="" INC_PART='part\|crypt\|lvm'
    umount_partitions
    find_partitions
    dialog --backtitle "$BTITLE" --title " $_LuksOpen " \
        --menu "$_LuksMenuBody" 0 0 7 $PARTS 2>$ANS || luks_menu
    PART=$(cat $ANS)
    dialog --backtitle "$BTITLE" --title " $_LuksOpen " \
        --inputbox "$_LuksOpenBody" 10 50 "cryptroot" 2>$ANS || luks_menu
    LUKS_ROOT_NAME=$(cat $ANS)
    luks_password
    dialog --backtitle "$BTITLE" --title " $_LuksOpen " --infobox "$_PlsWaitBody" 0 0
    echo "$PASSWD" | cryptsetup open --type luks "$PART" "$LUKS_ROOT_NAME" 2>"$ERR"
    check_for_error
    lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINT "$PART" \
        | grep "crypt\|NAME\|MODEL\|TYPE\|FSTYPE\|SIZE" > /tmp/.devlist
    dialog --backtitle "$BTITLE" --title " $_DevShowOpt " --textbox /tmp/.devlist 0 0
    luks_menu
}

luks_setup() {
    modprobe -a dm-mod dm_crypt
    INC_PART='part\|lvm'
    umount_partitions
    find_partitions
    dialog --backtitle "$BTITLE" --title " $_LuksEncrypt " \
        --menu "$_LuksEncryptBody" 0 0 7 $PARTS 2>$ANS || luks_menu
    PART=$(cat $ANS)
    dialog --backtitle "$BTITLE" --title " $_LuksEncrypt " \
        --inputbox "$_LuksOpenBody" 10 50 "cryptroot" 2>$ANS || luks_menu
    LUKS_ROOT_NAME=$(cat $ANS)
    luks_password
}

luks_default() {
    dialog --backtitle "$BTITLE" --title " $_LuksEncrypt " --infobox "$_PlsWaitBody" 0 0
    sleep 2
    echo "$PASSWD" | cryptsetup -q luksFormat "$PART" 2>"$ERR"
    echo "$PASSWD" | cryptsetup open "$PART" "$LUKS_ROOT_NAME" 2>"$ERR"
    check_for_error
}

luks_key_define() {
    dialog --backtitle "$BTITLE" --title " $_PrepLUKS " \
        --inputbox "$_LuksCipherKey" 0 0 "-s 512 -c aes-xts-plain64" 2>$ANS || luks_menu
    dialog --backtitle "$BTITLE" --title " $_LuksEncryptAdv " --infobox "$_PlsWaitBody" 0 0
    sleep 2
    echo "$PASSWD" | cryptsetup -q "$(cat $ANS)" luksFormat "$PART" 2>"$ERR"
    check_for_error
    echo "$PASSWD" | cryptsetup open "$PART" "$LUKS_ROOT_NAME" 2>"$ERR"
    check_for_error

}

luks_show(){
    echo -e "$_LuksEncryptSucc" >/tmp/.devlist
    lsblk -o NAME,TYPE,FSTYPE,SIZE "$PART" \
        | grep "part\|crypt\|NAME\|TYPE\|FSTYPE\|SIZE" >>/tmp/.devlist
    dialog --backtitle "$BTITLE" --title " $_LuksEncrypt " --textbox /tmp/.devlist 0 0
    luks_menu
}

Without more info I dont think there is much I can answer

I think I may have mis-understood the original post, my mistake.

Did you not select encryption at all during installation?

@nate I’m wondering that too. Are you using pamdrive? I know I am shooting in the dark but I’m trying to get a handle on this. A system doesn’t just encrypt on its own. As far as I know, these are the only two ways that it could occur. But I’ll do some research.

was your former /home encryted?

Is this still an issue, would like to see it resolved

If you have a pre-existing encrypted partition that you wish to mount you will need to:

  • Open the “LUKS Encryption” menu entry during installation setup
  • Once there select the “Open Encrypted Partition”
  • Enter the name of the existing crypt “cryptroot” (or other)
  • Lastly enter the password used to originally encrypt it

If successful after this you should see a message basically stating
"The partition was opened and is ready to mount"

You can now continue on to the mounting step.

To skip formatting the partition (assuming you want your data) when mounting the partition during choosing given options for which filesystem (ext3, ext4, etc…) select the top option,
“Skip / No Format”. The next step you’ll be asked to enter where you want it mounted
(/boot, /home, /usr, etc…)

Hope this helps a little bit

Cheers