All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] What does it mean “not a valid LUKS device”? Can I start over and not destroy the drive?
@ 2012-06-15 16:18 neon_ bikini
  2012-06-15 18:11 ` .. ink ..
  2012-06-15 20:59 ` [dm-crypt] What does it mean ?not a valid LUKS device?? " Arno Wagner
  0 siblings, 2 replies; 4+ messages in thread
From: neon_ bikini @ 2012-06-15 16:18 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]



    






    
    
    

          
    
          
    
        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?


     		 	   		  

[-- Attachment #2: Type: text/html, Size: 1171 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] What does it mean “not a valid LUKS device”? Can I start over and not destroy the drive?
  2012-06-15 16:18 [dm-crypt] What does it mean “not a valid LUKS device”? Can I start over and not destroy the drive? neon_ bikini
@ 2012-06-15 18:11 ` .. ink ..
  2012-06-15 20:59 ` [dm-crypt] What does it mean ?not a valid LUKS device?? " Arno Wagner
  1 sibling, 0 replies; 4+ messages in thread
From: .. ink .. @ 2012-06-15 18:11 UTC (permalink / raw)
  To: neon_ bikini, dm-crypt

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

> 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?
>
>
> It means what it says.A luks device has what is called a "luks header".The
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.

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] What does it mean ?not a valid LUKS device?? Can I start over and not destroy the drive?
  2012-06-15 16:18 [dm-crypt] What does it mean “not a valid LUKS device”? Can I start over and not destroy the drive? neon_ bikini
  2012-06-15 18:11 ` .. ink ..
@ 2012-06-15 20:59 ` Arno Wagner
  2012-06-16  8:01   ` Milan Broz
  1 sibling, 1 reply; 4+ messages in thread
From: Arno Wagner @ 2012-06-15 20:59 UTC (permalink / raw)
  To: dm-crypt


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 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] What does it mean ?not a valid LUKS device?? Can I start over and not destroy the drive?
  2012-06-15 20:59 ` [dm-crypt] What does it mean ?not a valid LUKS device?? " Arno Wagner
@ 2012-06-16  8:01   ` Milan Broz
  0 siblings, 0 replies; 4+ messages in thread
From: Milan Broz @ 2012-06-16  8:01 UTC (permalink / raw)
  To: dm-crypt

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 <device> - 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-17 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 16:18 [dm-crypt] What does it mean “not a valid LUKS device”? Can I start over and not destroy the drive? neon_ bikini
2012-06-15 18:11 ` .. ink ..
2012-06-15 20:59 ` [dm-crypt] What does it mean ?not a valid LUKS device?? " Arno Wagner
2012-06-16  8:01   ` Milan Broz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.