2012-04-12 23:37:54

by Dale Amon

[permalink] [raw]
Subject: cryptsetup stopped working

Here is a trace of shell script I am working on. I got
through the cryptsetup earlier this evening but for some
reason it just stopped working.

Just in case, I've rebooted to see if anything needed
tidied up. Nope.

I also tried using loop1 instead. Also no difference.

When the cfdisk ran, I gave it a single Primary
partition that takes all the space and is not marked

At the point of failure /dev/mapper/loop9p1 exists and
I can 'cat' it, so the kpartx is happy enough with the file.

Ideas welcome...


+ dd if=/dev/zero of=/MyDisk/foo.raw count=2097152
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB) copied, 28.2482 s, 38.0 MB/s
+ losetup /dev/loop0 /MyDisk/foo.raw
+ badblocks -c 10240 -s -w -t random -v /dev/loop0
Checking for bad blocks in read-write mode
>From block 0 to 1048575
Testing with random pattern: done
Reading and comparing: done
Pass completed, 0 bad blocks found.
+ cfdisk /dev/loop0

+ kpartx -a /dev/loop0
+ cryptsetup --verbose --verify-passphrase luksFormat /dev/mapper/loop0p1

This will overwrite data on /dev/mapper/loop0p1 irrevocably.

Are you sure? (Type uppercase yes): yes
Command failed with code 22: Invalid argument

2012-04-12 23:43:22

by Dale Amon

[permalink] [raw]
Subject: Re: cryptsetup stopped working

Never mind. I typed 'yes' instead of 'YES'
and the error message I was getting was
utterly misleading.