Re: can't open LUKS drive after upgrade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 20/07/18 17:17, brad wrote:
> I haven't had much success getting help from ubuntu forums, but I'll 
> keep trying.    Any help here is greatly appreciated.
> 
> No errors in syslog or kern.log
> Using the proper syntax (this time), I can open it:
> cryptsetup --debug luksOpen /dev/sdb dm-2
> [command successful, no warnings or errors in output]
> 
> If I try to mount it:
> Error mounting /dev/dm-2 at /media/brad/Maxtor1: can't read superblock 
> on /dev/mapper/dm-2.
> 
> cryptsetup --debug luksAddKey /dev/dm-2 /root/keyfile

It ishould be /dev/sdb, not /dev/dm-2 here. luksAddKey manipulates
with LUKS on the underlying device, not on the activatef plaintext device.
IOW:

# cryptsetup --debug luksAddKey /dev/sdb /root/keyfile

If you see IO errors, it should be also logged in syslog with more details
and I guess then there is really some bad block on the device, so hw error.

And you can see in lsblk the device stack hierarchy:

> dt1:lsblk
> NAME                                        MAJ:MIN RM   SIZE RO TYPE  
> sdb                                           8:16   0  93.4G  0 disk
> └─luks-3bddbc2d-6432-46df-9851-c86e15478ded 253:2    0  93.4G  0 crypt

To close an active device, you have to use its active name, so

# cryptsetup close luks-3bddbc2d-6432-46df-9851-c86e15478ded

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt




[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux