From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Thu, 18 Feb 2016 13:53:12 +0100 (CET) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aWO50-0006de-LB for dm-crypt@saout.de; Thu, 18 Feb 2016 13:53:10 +0100 Received: from c-50-158-72-35.hsd1.il.comcast.net ([50.158.72.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Feb 2016 13:53:10 +0100 Received: from rnicholsNOSPAM by c-50-158-72-35.hsd1.il.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Feb 2016 13:53:10 +0100 From: Robert Nichols Date: Thu, 18 Feb 2016 06:53:04 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: Subject: Re: [dm-crypt] yet another header reconstruction question List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 02/18/2016 02:51 AM, Florian Dotzer wrote: > I tried dd on files to replace the first 512 bytes of a file , but > the target file was completely replaced with this command : > > dd if=512_bytes_with_fixed_header of=file_with_first_64_MB_of_md0 bs=512 count=1 When the target is a file, you need to include "conv=notrunc" so that the file will not be truncated to zero length when it is opened. That is not an issue when the target is a block device, but there is no harm in using "conv=notrunc" there, too. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.