1

I discovered this topic 'How to migrate an encrypted LVM install to a new disk' which was useful for creating lvm volumes on my new SSD. Nevertheless, my original Ubuntu 14.04 has just a /home encrypted (with ecryptfs) and the part showing the decrypt of /dev/sda5 is not appropriate to my case.

I would like to know in which order do the things, I mean, here is my lsblk :

stee@stee-OptiPlex-760:~$ lsblk
NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                     8:0    0   149G  0 disk  
├─sda1                  8:1    0  89,8G  0 part  /
├─sda2                  8:2    0     1K  0 part  
└─sda5                  8:5    0     2G  0 part  
  └─cryptswap1 (dm-0) 252:0    0     2G  0 crypt [SWAP]
sr0                    11:0    1  1024M  0 rom  

I can't see where is my home, on sda1 or sda5 ??

Do i need to copy my crypted swap ?

Here is my /etc/fstab :

# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=eef61317-fd02-4eee-85ce-8a00b20ef131 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
#UUID=da79fe68-814e-48e0-9fe8-bac41f1ffcbb none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

ANd my /etc/crypttab :

cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

Ubuntuly

1

eCryptfs doesn't encrypt an entire partition like LUKS/dm-crypt does, your home is stored (encrypted) in a regular folder, apparently somewhere on your sda1 root partition in your case.

Making a regular backup of your home while you're logged in (and it's mounted/decrypted) would be a good method to migrate it to another location (keeping the backup copy encrypted along the way, if desired).

Or investigate the ecryptfs-recover-private command/script, to view/copy your encrypted home if it's not automatically mounted/decrypted, after migrating perhaps.

  • Also (after you backup the encrypted data), don't just copy/migrate your data to the SSD. You want a clean install of Ubuntu that has been configured (at install time) to use SSD as primary media. – david6 Apr 29 '15 at 10:57
  • I'll give 'ecryptfs-recover-private' a try once booted on my usb key.<br>I guess finally that my cryptswap isn't necessary to recover and in fact i was going in the bad direction. I keep you informed. Thanks – alaakaazaam Apr 29 '15 at 12:55
  • @david6 : yeah it's my goal, switching from my old sata to ssd primary drive, i already made it on my laptop but starting from scratch, i.e : reinstalling all the stuff, hope this new way will make it :) – alaakaazaam Apr 29 '15 at 15:14
  • Finally, i formated my whole ssd to create a big sdb1 partition + an extended of 4G. Then through gparted, i just copied sda1 to sdb1 and made a good coffee til it accomplished (by the way my crypted home went in sdb1), then started the tricky part when it came to change uuid of sdb1 (take a look here : askubuntu.com/questions/132079/…). I then restarted and faced a 'time-has-stopped' grub prompt from which i started thanks to this grateful post : linux.com/learn/tutorials/…. – alaakaazaam Apr 29 '15 at 16:39
  • my lsblk :</br> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT</br> sda 8:0 0 111,8G 0 disk</br> ├─sda1 8:1 0 96,7G 0 part /</br> ├─sda2 8:2 0 1K 0 part </br> └─sda5 8:5 0 2G 0 part </br> └─cryptswap1 (dm-0) 252:0 0 2G 0 crypt [SWAP]</br> sr0 11:0 1 1024M 0 rom </br> – alaakaazaam Apr 29 '15 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.