Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Recovering Encrypted Home Partition

  1. #11
    Join Date
    Aug 2008
    Beans
    78

    Re: Recovering Encrypted Home Partition

    Quote Originally Posted by DZ* View Post
    Can you access these locations prior to running 'mounter' (from the same terminal)?

    sudo ls /media/12345abcd-1234-1234-1234-123456abcdefg
    sudo ls /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/.Private
    sudo ls /mnt

    I think the problem might be that you have 'chroot'-ed to /mnt .
    Thanks DZ for your continual assistance. I am not sure how to check if I have 'chroot'-ed to /mnt, but I did restart the computer just now to try it again. I am getting the same problem. Below is the output for the ls commands. It seems like the .Private directory cannot be accessed because it is a locked directory. I can navigate in Nautilus up until /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/ I can see the .Private directory, but it has an X on it.

    ls command output
    Code:
    ubuntu@ubuntu:~/Desktop sudo ls /media/12345abcd-1234-1234-1234-123456abcdefg
    chris lost+found
    ubuntu@ubuntu:~/Desktop sudo ls /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/.Private
    ls: cannot access /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/.Private: No such file or directory
    ubuntu@ubuntu:~/Desktop sudo ls /mnt
    ubuntu@ubuntu:~/Desktop
    EDIT: I am running all this from a live cd as I cannot boot up normally. I am afraid to install Ubuntu over my current install until I back up my data.
    Last edited by 1awesomeguy; May 5th, 2010 at 02:43 AM.

  2. #12
    Join Date
    Dec 2009
    Beans
    121
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Recovering Encrypted Home Partition

    Quote Originally Posted by 1awesomeguy View Post
    Code:
    ubuntu@ubuntu:~/Desktop sudo ls /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/.Private
    ls: cannot access /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris/.Private: No such file or directory
    Well, this seems to be the problem.
    I'd try to
    Code:
    sudo -i
    to switch to root and cd to /media/12345abcd-1234-1234-1234-123456abcdefg/home/.ecryptfs/chris

    Then check (ls -la) permissions of .Private. Can you cd to it?

    If it is something funny, change to, say 'chmod 755 .Private' and if you can cd to it now, try to run the script again.
    Last edited by DZ*; May 5th, 2010 at 04:41 AM.

  3. #13
    Join Date
    Aug 2008
    Beans
    78

    Re: Recovering Encrypted Home Partition

    Thanks again DZ. I did what you said:
    sudo -i, then cd to .../.ecryptfs/chris directory

    Permisions
    .Private: drwx--x--x
    .ecryptfs: drwx------

    I first changed .Private to 755 and tried ./mounter. It failed. Same error. I then, changed .ecryptfs and again ./mounter failed... I also tried 'sudo ./mounter'.

    I can now navigate in Nautilus inside the .Private directory though all files are encrypted.

    Output from ./mounter
    Code:
    ubuntu@ubuntu:~/Desktop$ ./mounter
    Passphrase: 
    Inserted auth tok with sig [xxxxxxxxxxxxxxx] into the user session keyring
    Inserted auth tok with sig [yyyyyyyyyyyyyyyy] into the user session keyring
    Attempting to mount with the following options:
      ecryptfs_unlink_sigs
      ecryptfs_fnek_sig=yyyyyyyyyyyyyyyy
      ecryptfs_key_bytes=16
      ecryptfs_cipher=aes
      ecryptfs_sig=xxxxxxxxxxxxxxx
    Error mounting eCryptfs: [-2] No such file or directory
    Check your system logs; visit <http://launchpad.net/ecryptfs>
    Anyone know what is going on here? I've been at this for two days already. Any help would be really appreciated!

  4. #14
    Join Date
    Aug 2008
    Beans
    78

    Re: Recovering Encrypted Home Partition

    Quote Originally Posted by 1awesomeguy View Post
    I've tried this solution (from this page):

    Code:
    ubuntu@ubuntu:~$ sudo mount /dev/sda4 /mnt
    ubuntu@ubuntu:~$ sudo mount -o bind /dev /mnt/dev
    ubuntu@ubuntu:~$ sudo mount -o bind /dev/shm /mnt/dev/shm
    ubuntu@ubuntu:~$ sudo mount -o bind /proc /mnt/proc
    ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
    ubuntu@ubuntu:~$ sudo chroot /mnt
    root@ubuntu:~$ su - kirkland
    kirkland@ubuntu:~$ ecryptfs-mount-private
    Enter your login passphrase:
    Warning: Using default salt value (undefined in ~/.ecryptfsrc)
    Inserted auth tok with sig [xxx] into the user session keyring
    kirkland@ubuntu:~$ cd $HOME
    kirkland@ubuntu:~$ ls -alF
    My /home, /boot, /, and swap are all separate partitions if that makes any difference.

    Any help would be really appreciated.

    I completed these steps again and am able to mount my /home directory, but all files and directories begin with ECRYPTFS_FNEK_ENCRYPTED... and cannot be read.

    I also tried adding in this before the ecryptfs-mount-private step:

    Code:
    ecryptfs-add-passphrase --fnek
    Passphrase:
    Error: Your kernel does not support filename encryption
    Same error as when I started.
    Last edited by 1awesomeguy; May 5th, 2010 at 05:54 AM.

  5. #15
    Join Date
    Dec 2009
    Beans
    121
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Recovering Encrypted Home Partition


  6. #16
    Join Date
    Aug 2008
    Beans
    78

    Re: Recovering Encrypted Home Partition

    Quote Originally Posted by DZ* View Post
    Thanks a bunch DZ! After many many hours, I have solved my problem.

    The exact solution that helped was https://bugs.launchpad.net/ubuntu/+s...709/comments/3

    By Dustin Kirkland:
    Martin-

    Okay, try this ...

    Code:
    ecryptfs-unwrap-passphrase /home/.ecryptfs/kirkland/.ecryptfs/wrapped-passphrase
    (record this as your MOUNTPW)
    
    keyctl clear @u
    keyctl list @u
    (should be empty)
    ecryptfs-insert-wrapped-passphrase-into-keyring /home/.ecryptfs/kirkland/.ecryptfs/wrapped-passphrase
    keyctl list @u
    (should see 2 sigs, one for file contents, one for filenames)
    SIG1=$(head -n1 /home/.ecryptfs/kirkland/.ecryptfs/Private.sig)
    SIG2=$(tail -n1 /home/.ecryptfs/kirkland/.ecryptfs/Private.sig)
    mount -t ecryptfs -o rw,relatime,ecryptfs_fnek_sig=<SIG2>,ecryptfs_sig=<SIG1>,ecryptfs_cipher=aes,ecryptfs_key_bytes=16 /home/.ecryptfs/kirkland/.Private /mnt
    ls /mnt
    cat /mnt/.profile
    This is working for me... Can you give this a shot?

    Note that we're using mount -t ecryptfs here, rather than mount.ecryptfs.

    ustin
    Note (this confused me):
    When asked for a Passphrase from the ecryptfs-unwrap-passphrase command, enter your user account's password, but when asked for a Passphrase from the 'mount -t ecryptfs' command, enter the output from the ecryptfs-unwrap-passphrase command.

  7. #17
    Join Date
    May 2010
    Beans
    6

    Re: Recovering Encrypted Home Partition

    I, too, have been trying to recover my /home for the past two days after a failed upgrade. I tried most of the steps you did (except for all that mount -o sys /mount/sys and such, I went right to ecryptfs-unwrap-passphrase) and I had been getting the same error mounting eCryptfs. I'm not sure what's so different about this method (I didn't think putting options would make that much of a difference).

    Thanks a lot for the repost 1awesomeguy!

  8. #18
    Join Date
    Aug 2008
    Beans
    78

    Re: Recovering Encrypted Home Partition

    Quote Originally Posted by kylekobe View Post
    I, too, have been trying to recover my /home for the past two days after a failed upgrade. I tried most of the steps you did (except for all that mount -o sys /mount/sys and such, I went right to ecryptfs-unwrap-passphrase) and I had been getting the same error mounting eCryptfs. I'm not sure what's so different about this method (I didn't think putting options would make that much of a difference).

    Thanks a lot for the repost 1awesomeguy!
    Try running this command before:

    Code:
    sudo su
    If I do that, it works every time. If I don't do that, it will only work sometimes. Not sure why...

  9. #19
    Join Date
    Aug 2008
    Location
    United States of America
    Beans
    36
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Recovering Encrypted Home Partition


Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •