Using cryptsetup - hangs


I have a LUKS partition created with a previous distro that is no longer installed. The command to unlock it was always

sudo cryptsetup luksOpen /dev/sda7 myfolder

Which created the device /dev/mapper/myfolder, which I could then mount.

However under Ubuntu Mate, the cryptsetup command simply hangs after I have entered the LUKS passphrase. It doesn’t lock up the computer, it just stops doing anything (zero CPU usage), I can’t Ctrl-C out of it, I can only close the terminal.

The odd thing is that if I then do a status request, it appears to have worked:

sudo cryptsetup status myfolder
/dev/mapper/myfolder is active.
  type:    LUKS1
  cipher:  aes-xts-plain64
  keysize: 256 bits
  device:  /dev/sda7
  offset:  4096 sectors
  size:    90166376 sectors
  mode:    read/write

But then if I try to mount it:

sudo mount /dev/mapper/myfolder /myfolder
mount: special device /dev/mapper/myfolder does not exist

Indeed, in /dev/mapper, there is no “myfolder”, just a file named “control”. Even though the cryptsetup status command says it is active…?

The thoughts of the team would be appreciated :slight_smile:


Fixed. I noticed that Ubuntu’s cryptsetup version is 1.6.6 whereas the most recent is 1.7. So I decided to sudo apt-get install cryptsetup, it installed a couple of packages for me… I still have version 1.6.6, but now it works!

Most odd. I’ll leave this here in case anyone else has the same problem.

hi @quartz
Was that on a fully updated Ubuntu MATE 16.04 system?
If so, maybe it’d be interesting to take a look at the Ubuntu bug tracker on Launchpad.

Hi @ouroumov,

Yes, it was a fresh install of Ubuntu Mate 16.04, with all updates installed.
As I say it’s working now - thanks.

I’ve had similar problem on vanila Ubuntu. While mounting volume for first time I got message that I need to install cryptsetup-bin. I did that but mount was hanging up. Turns out that you actually have to install cryptsetup not cryptsetup-bin!