Return-Path: Received: from blaine.gmane.org (unknown [195.159.176.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Thu, 18 May 2017 20:24:55 +0200 (CEST) Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dBQ6Q-0004zn-Ql for dm-crypt@saout.de; Thu, 18 May 2017 20:24:46 +0200 From: Robert Nichols Date: Thu, 18 May 2017 13:24:39 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: Content-Language: en-DK Subject: Re: [dm-crypt] Shipping/Cloning encrypted disks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 05/18/2017 08:26 AM, vasili@keemail.me wrote: > 1.: Filesystem image with non-encrypted boot and encrypted main filesystem. > The image should be dd'ed to a hdd or usb drive and resized to fill the whole drive. Then the master key will be changed with cryptsetup-reencrypt. That's going to take at least 3 times as long as it needs to. The cryptsetup-reencrypt operation is slow. Because it's reading and writing the same disk, it takes about 2X the time it took to copy the original image. Format the LUKS destination container, then open the source and destination containers and "dd" from one to the other. You've already got a new master key and whatever passphrase you chose at the destination. You can resize the filesystem after you've done the copying. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.