My current laptop won't power on at all. It's not just the battery, pretty sure the motherboard is fried. (Assume it's irreparable.)
The hard drive on the laptop (SSD, in case that matters) was encrypted when I installed Ubuntu 16.04. Unfortunately for me, my external hard drive died about a month ago and I had yet to set up a new backup external when this laptop bit the dust. So at present I'm missing about a month of work.
How can I retrieve the data off of the dead laptop's encrypted hard drive and transfer it to a new laptop? (Assume the hard drive is intact and there are no problems there.)
I am assuming that you used the "Encrypt the new Ubuntu installation" or its manual equivalent; that is, your hard disk is encrypted by LUKS and in the encrypted container you have an LVM volume group.
Before starting, make sure that you have
cryptsetup
andlvm2
installed; if not, install them:Take the drive out and put it into a USB enclosure.
Connect it to a working computer running Ubuntu or any other Debian derivative; you can even use a live DVD or USB flash drive for this. Say that the disk is seen by the system as
/dev/sdb
.Find out which partition on the disk is the LUKS container:
For example, suppose that you found out that
/dev/sdb2
is a LUKS container. Open it:LVM should automatically detect the logical volumes; see if it did so with
If not, you may have to trigger LVM recognition with
sudo vgchange -aay
.Now you have the logical volumes in
/dev/mapper
. Mount them onto some directories.Connect the drive to your new computer (after removing it from your defect notebook, obviously). There are cheap USB connectors for sata or msata drives. When the drive is recognized you can mount it (if you have the password).