From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4v-P7rH7oXmX for ; Fri, 15 Jun 2012 18:23:26 +0200 (CEST) Received: from snt0-omc1-s35.snt0.hotmail.com (snt0-omc1-s35.snt0.hotmail.com [65.55.90.46]) by mail.saout.de (Postfix) with ESMTP for ; Fri, 15 Jun 2012 18:23:25 +0200 (CEST) Message-ID: Content-Type: multipart/alternative; boundary="_0f942a29-0f66-4fa6-a1b3-f7862a17fb1c_" From: neon_ bikini Date: Fri, 15 Jun 2012 16:18:18 +0000 MIME-Version: 1.0 Subject: [dm-crypt] =?windows-1252?q?What_does_it_mean_=93not_a_valid_LUKS?= =?windows-1252?q?_device=94=3F_Can_I_start_over_and_not_destroy_the_drive?= =?windows-1252?q?=3F?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de --_0f942a29-0f66-4fa6-a1b3-f7862a17fb1c_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable =20 =20 =20 =20 =20 =20 =20 =20 During an upgrade from Fedora 15 to 17=2C I installed into an=20 existing LUKS encrypted partition. I'm sure I borked the boot loader=20 options=2C because the new system boots to GRUB and there is no sign of=20 grub.conf.=20 When I attempt to fix the problems from the boot cd and run cryptsetup luksOpen /dev/sda3=20 cryptLVM=2C I get =93not a valid LUKS device=94. Can I simply reformat Luks? What are my concerns right now if I don't need = to save data? = --_0f942a29-0f66-4fa6-a1b3-f7862a17fb1c_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
=20 =20 =
=20

=20 =20 During an upgrade from Fedora 15 to 17=2C I installed into an=20 existing LUKS encrypted partition. I'm sure I borked the boot loader=20 options=2C because the new system boots to GRUB and there is no sign of=20 grub.conf.


When I attempt to fix the problems from the boot cd and run cryptsetup luksOpen /dev/sda3=20 cryptLVM=2C I get =93not a valid LUKS device=94.



Can I simply reformat Luks? What are my concerns right now if I don't need = to save data?

= --_0f942a29-0f66-4fa6-a1b3-f7862a17fb1c_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wfc4Van45faA for ; Fri, 15 Jun 2012 20:11:03 +0200 (CEST) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Fri, 15 Jun 2012 20:11:02 +0200 (CEST) Received: by yhjj63 with SMTP id j63so3156186yhj.37 for ; Fri, 15 Jun 2012 11:11:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 15 Jun 2012 14:11:01 -0400 Message-ID: From: ".. ink .." Content-Type: multipart/alternative; boundary=e89a8ff1c7ca23b3eb04c286bd65 Subject: Re: [dm-crypt] =?windows-1252?q?What_does_it_mean_=93not_a_valid_LUKS?= =?windows-1252?q?_device=94=3F_Can_I_start_over_and_not_destroy_th?= =?windows-1252?q?e_drive=3F?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: neon_ bikini , dm-crypt@saout.de --e89a8ff1c7ca23b3eb04c286bd65 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable > When I attempt to fix the problems from the boot cd and run cryptsetup > luksOpen /dev/sda3 cryptLVM, I get =93not a valid LUKS device=94. > > > > Can I simply reformat Luks? What are my concerns right now if I don't nee= d > to save data? > > > It means what it says.A luks device has what is called a "luks header".Th= e header contains information necessary to open the volume.The header in that device is corrupt and hence the volume is no longer a luks volume. Latest versions of cryptsetup has an ability to correct some corruptions but not all.You can try to see if it can repair your corrupted volume. Did you create a luks header backup? If not then your data is toasted and lost forever. You can simply reformat and move on but your old data will be gone. Make a back up of the header after you reformat.Restoring a header from a backup is the only way to recover from the error you got. --e89a8ff1c7ca23b3eb04c286bd65 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
When I attempt to fix the problems from the boot cd and run cryptsetup luksOpen /dev/sda3=20 cryptLVM, I get =93not a valid LUKS device=94.



Can I simply reformat Luks? What are my concerns right now if I don't n= eed to save data?


It means what it says.A luks device has what is calle= d a "luks header".The header contains information necessary to op= en the volume.The header in that device is corrupt and hence the volume is = no longer a luks volume.

Latest versions of cryptsetup has an ability to correct some corruption= s but not all.You can try to see if it can repair your corrupted volume.
Did you create a luks header backup? If not then your data is toasted = and lost forever. You can simply reformat and move on but your old data wil= l be gone.

Make a back up of the header after you reformat.Restoring a header from= a backup is the only way to recover from the error you got.
= =A0

--e89a8ff1c7ca23b3eb04c286bd65-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sxMQkEPkLE3D for ; Fri, 15 Jun 2012 22:59:46 +0200 (CEST) Received: from v4.tansi.org (ns.km33513-03.keymachine.de [87.118.94.3]) by mail.saout.de (Postfix) with ESMTP for ; Fri, 15 Jun 2012 22:59:46 +0200 (CEST) Received: from gatewagner.dyndns.org (84-74-164-202.dclient.hispeed.ch [84.74.164.202]) by v4.tansi.org (Postfix) with ESMTPA id 698D3205DE0 for ; Fri, 15 Jun 2012 22:59:45 +0200 (CEST) Date: Fri, 15 Jun 2012 22:59:44 +0200 From: Arno Wagner Message-ID: <20120615205944.GA1218@tansi.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dm-crypt] What does it mean ?not a valid LUKS device?? Can I start over and not destroy the drive? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de crytptestup only works within the specified target device, no effect oytside of it. Hence your other partitions will be unaffected, baring some strange set-ups. If you do not care about the data in the old LUKS container (partition), you can just luksFormat the device. However you should be sure /dev/sda3 is not used in any other way (something did erase or damage the header after all, may have been a filesystem, raid-superflock or other thing), and may damage your new header. It may be a good thing to check the partition is not maunted and you could also check ehat kind of header is in it, e.g. with hd or by trying to mount it. As to grub.conf, Grub legacy uses menu.lst, and grub 2 uses grub.cfg, so I am not really sure what you are talking about. Arno On Fri, Jun 15, 2012 at 04:18:18PM +0000, neon_ bikini wrote: > > > > > > > > > > > > > > > > > > During an upgrade from Fedora 15 to 17, I installed into an > existing LUKS encrypted partition. I'm sure I borked the boot loader > options, because the new system boots to GRUB and there is no sign of > grub.conf. > > > > > > When I attempt to fix the > problems from the boot cd and run cryptsetup luksOpen /dev/sda3 > cryptLVM, I get ?not a valid LUKS device?. > > > > > Can I simply reformat Luks? What are my concerns right now if I don't need to save data? > > > > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision. -- Bertrand Russell From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GzUjpnSIJtVR for ; Sun, 17 Jun 2012 17:51:34 +0200 (CEST) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mail.saout.de (Postfix) with ESMTP for ; Sun, 17 Jun 2012 17:51:34 +0200 (CEST) Received: by wibhn6 with SMTP id hn6so1215087wib.1 for ; Sun, 17 Jun 2012 08:51:33 -0700 (PDT) Message-ID: <4FDC3D5B.105@gmail.com> Date: Sat, 16 Jun 2012 10:01:31 +0200 From: Milan Broz MIME-Version: 1.0 References: <20120615205944.GA1218@tansi.org> In-Reply-To: <20120615205944.GA1218@tansi.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] What does it mean ?not a valid LUKS device?? Can I start over and not destroy the drive? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 06/15/2012 10:59 PM, Arno Wagner wrote: > If you do not care about the data in the old LUKS container > (partition), you can just luksFormat the device. However > you should be sure /dev/sda3 is not used in any other > way (something did erase or damage the header after all, may > have been a filesystem, raid-superflock or other thing), > and may damage your new header. Exactly. Anaconda (the Fedora installer) sometimes wipes devices during install, I would not be surprised that this can happen even during upgrade. (In install, it usually appends device to LVM, so be sure that this device is really not in use or luksFormat break your system even more.) Usually you should do: 1) blkid -p - check what is not on that disk (partition table added, lvm, mdraid, fs... ?) 2) check if the device is not use - lsblk, pvs, lvs -o+devices ... I am afraid that if device was wiped, no way to get you data back (without LUKS header backup). So, once you are sure, just reformat the drive. Maybe you will have to setup UUID (check fstab/crypttab) - you can set UUID on the device itself (see man cryptsetup luksUUID) or just fix files mentioned above (if they contain UUID reference). > As to grub.conf, Grub legacy uses menu.lst, and grub 2 > uses grub.cfg, so I am not really sure what you are talking > about. Upgrade F15...F17 seems to switch grub->grub2 (I had to fix 3 borked systems after upgrade already so will not better comment it anymore:-) Whatever, grub2-mkconfig is very useful tool... also see http://fedoraproject.org/wiki/Common_F17_bugs and other pages, just search Google Milan