1

So i have an SSD with the following partitions:

1. fat32 - /boot/efi - 190MB boot,esp
2. ext4 / 65.19 GB
3. linux-swap 1.40Gb
4. ext4 /home 398.98 Gb

I bought a new SSD and would like to clone everything from the old one, but make partitions all ext4 encrypted.

What's the best way to go about that? I've read different manuals, specifically this one https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks#h2-1-debian-ubuntu, but it is unclear what will will happen after I clone data to the encrypted partition.

Will the system boot and ask me for the password upon booting, as it does when I choose encrypted partitions on a regular Ubuntu install?

orion3
  • 405
  • 2
    You cannot really clone. I normally suggest a clean install anytime you have a new drive. And then copy /home and data. Only if you have installed server apps may you have some folders in / that you would also copy. You should do clean install and restore from your normal backups. That then is a test that your backups are complete. And you still have old drive to find anything missing from backup. – oldfred Dec 18 '18 at 19:43
  • Why can't I clone? – orion3 Dec 18 '18 at 20:16
  • You might succeed, but there are several obstacles, so I agree with @oldfred's advice, to make a fresh installation. See the following link about things that can make cloning go wrong, Cloning from one drive to another drive. If you want to try cloning anyway, I would recommend Clonezilla, which is both faster and safer compared to dd. – sudodus Dec 18 '18 at 21:00
  • An encrypted install uses LVM or volumes, not partitions, so totally different system configuration. Full-system encryption with manual control and dual-booting Paddy Landau https://ubuntuforums.org/showthread.php?t=2357627 also if UEFI/gpt you can only easily clone an entire drive. gpt has GUIDs in primary partition table, back up partition table & partition. They must be in sync & many clone tools will not do that if just trying to clone a partition. – oldfred Dec 18 '18 at 21:48
  • @oldfred Another agreement and you should post that as an answer and I'll come back and upvote after you ping me. 0:-) – Fabby Dec 19 '18 at 00:12

0 Answers0