[clug] Can't mount an encrupted backup file system

jhock jhock at iinet.net.au
Sun Jun 10 21:17:42 MDT 2012


Hi Brett,

Thanks for your reply. Please see results and comments in line below:

I then thought that I needed to add a luks key so I did:

# cryptsetup luksAddKey /dev/sdd FRED
# cryptsetup luksOpen /dev/sdd FRED

and still got:

# cryptsetup status FRED
/dev/mapper/FRED is inactive.

I moved the memory stik to another USB drive (/dev/sdc) and then tried
again with no luck.

I then thought that I need to encrypt the /dev/sdc memory stick so I
did:

# cryptsetup --verbose --verify-passphrase luksFormat /dev/sdc 
WARNING!
========
This will overwrite data on /dev/sdc irrevocably.

Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase: 
Verify passphrase: 
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/sdc.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
more info).
Command failed with code 5: Failed to setup dm-crypt key mapping for
device /dev/sdc.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
more info).


I then did checked to see if an existing encrypted device worked such as
my swap:

# cryptsetup status /dev/mapper/cryptswap1 
/dev/mapper//dev/mapper/cryptswap1 is active:
  cipher:  aes-cbc-essiv:sha256
  keysize: 256 bits
  device:  /dev/sda5
  offset:  0 sectors
  size:    5957632 sectors
  mode:    read/write

This indicates to me that the system does know about the
aes-cbc-essiv:sha256 cyper as it is used for the swap.

I then tried to unmount the memory stick:

~# umount /media/BA21-890E/
umount: /media/BA21-890E: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

It appeared that Banshee was trying to run on some of the files on the
memory stick. Probably because I doubled click on some test files that
didn't have ".txt" endings.  I killed the Banshee processes until I was
able to unmount the memory stick and then tried to do the cryptsetup
stuff again:

# cryptsetup luksOpen /dev/sdd FRED
Device /dev/sdd doesn't exist or access denied.

# df

shows that the memory stick is not mounted.

I pulled out the memory stick and put is back into the USB port and the
"Enter a password to unlock the volume." prompt box popped up. I entered
the passphrase that I used to encrypt the memory stick and then got the
following error box:

"Unable to mount 1.5 MB Encrypted

Error unlocking device: cryptsetup exited with the exit code 255: No key
availalbe with this passphrase.

I used the syslog viewer to see what might be the problem. The syslog
kept on showing:

Jun 11 13:13:20 johns-eeePC brltty[4248]: USB device open error 13:
Permission denied.
Jun 11 13:13:20 johns-eeePC brltty[4248]: USBFS open
error: /dev/bus/usb/001/012: Permission denied

time a time again every three seconds.  

# df

doesn't show the /dev/sdc device.

So now it looks like I have encrypted my 1.5 GB memory stick but can't
mount it on the old eeePC.

I hope that this is enough information to help. Meanwhile I'll search
the web for something about the error.

Thanks in advance for any help.

John


On Sun, 2012-06-10 at 20:48 +1000, Brett Worth wrote:
> On 10/06/12 17:25, jhock wrote:
> > Hi David et al,
> >
> > I have been busy with work so today is the first I have been able to get
> > back to this.
> >
> > I grabbed an old 1GB memory stick and was able to on the old eeePC
> > (old):
> >
> > # cryptsetup luksAddKey /dev/sdc<passphrase>
> > # cryptsetup luksOpen -d<passphrase>  /dev/sdc /media/BA21-890E
> 
> John,
> 
> The last option on this command is a name for the opened partition.  I'm not sure it would 
> like having "/" in this name because it implies that the dm would have to create a 
> directory in /dev/mapper.
> 
> Try doing:
> 
> # cryptsetup luksOpen /dev/sdc FRED
> 
> You should get prompted for a passphrase at that point.
> 

No prompt for passphrase.

> Then do:
> 
> # cryptsetup status FRED
> 

/dev/mapper/FRED is inactive.

> And maybe:
> 
> # mount /dev/mapper/FRED /mnt

mount: special device /dev/mapper/FRED does not exist

> # df -h /mnt

Filesystem            Size Used Avail Use% Mounted on
/dev/sda1             144G   33G  105G  24% /

> 
> Brett
> 



More information about the linux mailing list