1

TLDR: upgrade to 15.10 from 15.04 appears to have altered my access to sda5 encrypted system. Ubuntu recognises the password as correct, but fails to access. Ultimately, I'd like to be able to access this system again.

I upgraded from 15.04 to 15.10 yesterday. When I enter my sda5_crypt password (but only my correct password - if I enter an incorrect password I'm told incorrect password and prompted to re-enter), I'm met with a message of

cryptsetup: unknown fstype, bad password or options?

followed by

cryptsetup: sda5_crypt set up successfully

At which point system checks begin. Here the problems outlined are:

/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Reading all physical volumes. This may take a while...
Found volume group "ubuntu-vg" using metadata type lvm2
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
2 logical volume(s) in group "ubuntu-vg" now active
device-mapper: remove ioctl on sda5_crypt failed: Device or resource busy
[previous line repeats 24 times]
Device sda5_crypt is still in use.
fsck from util-linux 2.62.2
/dev/mapper/ubuntu--vg-root: recovering journal
/dev/mapper/ubuntu--vg-root: clean, 369962/45268992 files, 129447388/181049344 blocks
[**FAILED**]Failed to activate swap /dev/mapper/ubuntu--vg-swap_1.
See 'systemctl status "dev-mapper-ubuntu\\x2d\\x2dvg\\x2dswap_1.swap"' for details
[**DEPEND**] Dependency failed for Swap.
[  OK  ] Found device WDC_WD7500BPKX-22HPJT0 1.
[  OK  ] Started GNOME Display Manager.... and deal with any system changes.signatures....ut down.....

At which point startup ceases.

Advanced options for boot give me two kernel options; 3.16.0-34-generic fails to find kernel, while the version 4 kernel freezes before entering the GUI. Can access GRUB, however.

Mounting the hard drive to another computer running 15.04 shows the full disk, but the password for sda5_crypt is unable to access the information, though I can access the GRUB section of the disk.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
M McCl
  • 21
  • After I upgraded from 15.04 to 15.10 I started experiencing the same behavior as you up to the fsck from util-linux 2.62.2 line, after which it boots normally. – Richard Hansen Oct 30 '15 at 18:47
  • Do you have a "recovery mode" option in the "Advanced options for Ubuntu" submenu? – Richard Hansen Oct 30 '15 at 18:50
  • I do have the "advanced options for Ubuntu" submenu, which presents me with "Ubuntu, with Linux 4.2.0-17-generic", followed by (upstart) and (recovery mode) options, and then the same trio with 3.16.0-34-generic options. – M McCl Nov 03 '15 at 18:50
  • I've opened the 4.2.0-17-generic recovery mode, and was able to use # cryptsetup -v luksOpen /dev/sda5 sda5_crypt to get into the drive, which i then mount using # mkdir /tmp/disk and mount /dev/sda5 /tmp/disk, which lets me look into the disk, but when I get into the home directory, and look at my profile, ls gives me back Access-Your-Private_Data.desktop and README.txt. cat README.txt presents with THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA. From the graphical desktop, click on: "Access Your Private Data" or From the command line, run: ecryptfs-mount-private. – M McCl Nov 03 '15 at 19:07
  • Since I'm running in terminal, I went the ecryptfs-mount-private method, but was met with ERROR: Encrypted private directory is not setup properly. Not sure how to proceed from here. – M McCl Nov 03 '15 at 19:09
  • 1
    related Ubuntu bug report: https://bugs.launchpad.net/bugs/1481536 – Richard Hansen Dec 03 '15 at 00:44

1 Answers1

1

All right. I've managed to recover what seems to be all of the information from the encrypted portion of my hard drive. I was able to use information from this page and this page to do so. I will describe the process below.

First, I booted my machine, with the problem hard drive in place, using Sytem Rescue CD. I was able to use # cat /proc/partitions to find the encrypted portion was sda5, which I confirmed with # cryptsetup -v luksDump /dev/sda5.

I then opened the encrypted disk using # cryptsetup -v luksOpen /dev/sda5 sda5_crypt and entered my password to unlock the volume. # lvdisplay now revealed /dev/ubuntu-vg/root and /dev/ubuntu-vg/swap1. I change the volume groups for these with # vgchange -a y ubuntu-vg, and then made a mount point with # mkdir /tmp/disk and # mount /dev/ubuntu-vg/root /tmp/disk.

This allowed me to get into the drive, but not my private information in my profile. In /tmp/disk/home/USERNAME/ I can see a /.Private, which is where all of my information is hiding. # ecryptfs-recover-private prompted me for my password, then created a new /tmp/ directory. At this point, I mounted an external hard drive:
# mkdir /tmp/disk2
# mount /dev/sdc2 /tmp/disk2
# cd /tmp/disk2
# mkdir restore

It was then a simple case of using # cp -r /tmp/ecrypt.N1something /tmp/disk2/restore. I believe I might have been able to just remove the encryption from the disk using my specific variations of this, but I just wanted a backup of everything (which I know I should have done before, anyway) and I was able to use my profiles and files in a fresh intall.

M McCl
  • 21