From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from op7.codingninjas.org (op7.codingninjas.org [209.222.52.116]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Tue, 25 Aug 2009 09:07:34 +0200 (CEST) Received: from sschai.localnet (CPE0080c6e9d913-CM000f9f4fecc0.cpe.net.cable.rogers.com [99.249.56.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by op7.codingninjas.org (Postfix) with ESMTPSA id 106AF4E2275 for ; Tue, 25 Aug 2009 03:07:33 -0400 (EDT) From: test532@codingninjas.org Date: Tue, 25 Aug 2009 03:06:04 -0400 References: <20090824100211.5c162f1a@Computername> <20090824180857.GB31701@tansi.org> <20090825030849.GA4485@tansi.org> In-Reply-To: <20090825030849.GA4485@tansi.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200908250306.04408.test532@codingninjas.org> Subject: Re: [dm-crypt] Broken header of a luks-partition - more than once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Or, to prevent any chance of the BIOS swapping the disk order, you could refer to your device by id instead. I know my friends motherboard does that, it randomly sometimes swaps the disk order for no reason when booting, just some bug in the bios. So, to refer to disks in a way that are guaranteed to always point the the exact physical disk you want, regardless of what order they are, check in the /dev/disk/by-id directory. In here the kernel creates files that point to your disks just like /dev/sda, /dev/sdb, etc, do, except that instead of some arbetrary name like /dev/sda, the name is based upon the interface, the make of the drive, and its serial number. Regards, Sam > I was too hasty, this should have gone to the list... > > On Mon, Aug 24, 2009 at 08:08:57PM +0200, Arno Wagner wrote: > > On Mon, Aug 24, 2009 at 05:55:37PM +0200, Milan Broz wrote: > > > spamzad@googlemail.com wrote: > > > > Something must have overwritten the header (posted it at the bottom) > > > > - and I have no clue what. > > > > That's exactly my question now: might it be a bug in cryptsetup or > > > > can i rule that out? > > > > > > Cryptsetup never write empty first sectors except explicit LUKS format. > > > (Of course this can very rarely happen if hw/driver problem appears...) > > > > > > But see crypttab here - you have tmp device created as regular > > > encrypted device > > > with random key - are you sure that kernel _cannot_ swap sda & sdb and > > > your system just formats temp device here? > > > > I had that happen to me. Nasty. The BIOS seemd to modify disk order > > when booting from a different drive via the bootup boot device > > selection. > > > > One simple way to get around this is to create one-drive RAID1 > > devices and then use them. No moving by the kernel on these. > > > > Arno > > > > > > # > > > > home /dev/sdb2 none luks > > > > ctmp /dev/sda2 /dev/urandom > > > > tmp,cipher=aes-cbc-essiv:sha256 > > > > cswap /dev/sda5 /dev/urandom > > > > swap,cipher=aes-cbc-essiv:sha256 > > > > > > Milan > > > -- > > > mbroz@redhat.com > > > > > > _______________________________________________ > > > dm-crypt mailing list > > > dm-crypt@saout.de > > > http://www.saout.de/mailman/listinfo/dm-crypt >