[dm-crypt] /dev/md1 is not a valid LUKS device

Roscoe eocsor at gmail.com
Wed Jul 6 13:03:35 CEST 2011


Evening,

I'd start experimenting given the offset, I'd suggest either a backup
or to only do ro operations on the volume:

Perhaps something like this as a first try, all quantities are in
blocks. Quite untested so man * may be a good idea :)

OFFSET=2048
LENGTH=$(( $(blockdev --getsz /dev/sdb) - $OFFSET )
echo "0 $LENGTH linear /dev/sdb $OFFSET"|dmsetup create sdb_offset
cryptsetup luksDump /dev/mapper/sdb_offset
cryptsetup luksOpen /dev/mapper/sdb_offset plain_sdb_offset
fsck.ext4 -n /dev/mapper/plain_sdb_offset
mount -o ro /dev/mapper/plain_sdb_offset /mnt/test/


-- Roscoe

On Wed, Jul 6, 2011 at 8:22 PM, Arno Wagner <arno at wagner.name> wrote:
> Hi Louis-David,
>
> I cannot send you Email directly, since it seems the IP of my
> mailserver is on some internal blacklist of your ISP. As there
> is no information why it is on the list (and no SPAM was ever
> sent from my Mailserver, which is under my own control), I
> can only assume the postmaster incompetently blocked the
> whole subnet, not just the offending host. To make matters
> worse, there is no working contact email and I propose you
> switch ISPs to someone that knows how to run a mailserver.
>
> Anyways, here is my answer to your second hexdump:
>
> The header looks fine, but it is in the wrong place.
> It should start at 0x00000000. Is there soem mapping
> or offset specification missing?
>
> Arno
>
>
> On Wed, Jul 06, 2011 at 12:00:59PM +0200, Louis-David Mitterrand wrote:
>> On Wed, Jul 06, 2011 at 11:44:59AM +0200, Arno Wagner wrote:
>> > At least th eheader was not just overwritten and looks intact.
>> > I have no idea why you get this error message.
>>
>> Ooops, my bad, I sent you a hexdump from the wrong server. Here is the
>> correct one:
>>
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00100000  4c 55 4b 53 ba be 00 01  61 65 73 00 00 00 00 00  |LUKS....aes.....|
>> 00100010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> 00100020  00 00 00 00 00 00 00 00  63 62 63 2d 65 73 73 69  |........cbc-essi|
>> 00100030  76 3a 73 68 61 32 35 36  00 00 00 00 00 00 00 00  |v:sha256........|
>
>
>
>
>
> On Wed, Jul 06, 2011 at 11:44:59AM +0200, Arno Wagner wrote:
>> At least th eheader was not just overwritten and looks intact.
>> I have no idea why you get this error message.
>>
>> Arno
>>
>> On Wed, Jul 06, 2011 at 10:53:09AM +0200, Louis-David Mitterrand wrote:
>> > Hi Arno,
>> >
>> > I am resending this answer to the list, as I am not sure you got it.
>> > From the hexdump can you just tell me whether it is likely or not that I
>> > can recover my partition?
>> >
>> > Thanks,
>> >
>> > On Mon, Jul 04, 2011 at 11:10:24PM +0200, Arno Wagner wrote:
>> > > On Mon, Jul 04, 2011 at 05:45:23PM +0200, Louis-David Mitterrand wrote:
>> > > > Hi,
>> > > >
>> > > > After a hardware crash I now get this error:
>> > > >
>> > > >         root at grml ~ # cryptsetup isLuks /dev/md1
>> > > >         Device /dev/md1 is not a valid LUKS device
>> > > >
>> > > > Am I basically fucked?
>> > >
>> > > I assume you have no header backup?
>> >
>> > Alas no.
>> >
>> > > If so, possibly, but not necessarily. Is this on an SSD? There
>> >
>> > No SSD, md raid6 array on regular disks.
>> >
>> > > the LUKS header could be in the same "sector" as a data area
>> > > (due large SSD actual sector size)
>> > >
>> > > Can you send me the first 700 bytes of the partition as hexdump?
>> > > You can get them for example like this:
>> > >
>> > >   hd /dev/md1 | head -n 40
>> >
>> > 00000000  4c 55 4b 53 ba be 00 01  61 65 73 00 00 00 00 00  |LUKS??..aes.....|
>> > 00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000020  00 00 00 00 00 00 00 00  63 62 63 2d 65 73 73 69  |........cbc-essi|
>> > 00000030  76 3a 73 68 61 32 35 36  00 00 00 00 00 00 00 00  |v:sha256........|
>> > 00000040  00 00 00 00 00 00 00 00  73 68 61 31 00 00 00 00  |........sha1....|
>> > 00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000060  00 00 00 00 00 00 00 00  00 00 18 00 00 00 00 20  |............... |
>> > 00000070  08 61 ee d5 da 46 75 45  3a 26 b7 68 ee 3a 4c 65  |.a???FuE:&?h?:Le|
>> > 00000080  ce 97 79 5f 5e 5c 96 00  a3 e1 11 f2 83 74 e9 a6  |?.y_^\..??.?.t??|
>> > 00000090  97 d1 fe 67 0b 30 0e f0  24 cb 7c 27 4e d1 57 a8  |.??g.0.?$?|'N?W?|
>> > 000000a0  3e bc 9a d4 00 00 a6 81  32 39 63 61 32 63 31 32  |>?.?..?.29ca2c12|
>> > 000000b0  2d 64 64 32 62 2d 34 33  61 66 2d 61 33 33 30 2d  |-dd2b-43af-a330-|
>> > 000000c0  32 34 30 39 33 64 63 38  65 34 65 31 00 00 00 00  |24093dc8e4e1....|
>> > 000000d0  00 ac 71 f3 00 02 9a 2d  e3 83 7c e6 f6 a2 10 ad  |.?q?...-?.|???.?|
>> > 000000e0  53 72 23 25 82 22 80 8d  af 3b ea c8 0d 85 7a 18  |Sr#%."..?;??..z.|
>> > 000000f0  5e 59 b0 92 b6 ca 5d e6  00 00 00 08 00 00 0f a0  |^Y?.??]?.......?|
>> > 00000100  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000120  00 00 00 00 00 00 00 00  00 00 01 08 00 00 0f a0  |...............?|
>> > 00000130  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000150  00 00 00 00 00 00 00 00  00 00 02 08 00 00 0f a0  |...............?|
>> > 00000160  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000180  00 00 00 00 00 00 00 00  00 00 03 08 00 00 0f a0  |...............?|
>> > 00000190  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 000001b0  00 00 00 00 00 00 00 00  00 00 04 08 00 00 0f a0  |...............?|
>> > 000001c0  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 000001e0  00 00 00 00 00 00 00 00  00 00 05 08 00 00 0f a0  |...............?|
>> > 000001f0  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000210  00 00 00 00 00 00 00 00  00 00 06 08 00 00 0f a0  |...............?|
>> > 00000220  00 00 de ad 00 00 00 00  00 00 00 00 00 00 00 00  |..??............|
>> > 00000230  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > 00000240  00 00 00 00 00 00 00 00  00 00 07 08 00 00 0f a0  |...............?|
>> > 00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> > *
>> > 00001000  2d 51 43 53 eb 1b 55 ac  05 9a b1 5f 57 33 31 11  |-QCS?.U?..?_W31.|
>> >
>> >
>> > Thanks,
>> >
>>
>> --
>> Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno at wagner.name
>> GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
>> ----
>> Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
>>
>> If it's in the news, don't worry about it.  The very definition of
>> "news" is "something that hardly ever happens." -- Bruce Schneier
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt at saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
>>
>
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno at wagner.name
> GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
> ----
> Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
>
> If it's in the news, don't worry about it.  The very definition of
> "news" is "something that hardly ever happens." -- Bruce Schneier
> _______________________________________________
> dm-crypt mailing list
> dm-crypt at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>


More information about the dm-crypt mailing list