eternaltyro / cryptsetup

Since Google code is shuttering...
http://code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

Ubuntu 12.04, 1.6.6 can NOT open truecrypt disc/partition/container. #232

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install cryptsetup 1.6.6 under ubuntu 12.04 based on instructions from the 
package.
2. 'sudo cryptsetup open --type tcrypt /dev/sda sda' where sda is a truecrypt 
disk.
3. After asking the passphase, it says"Command failed with code 22: Invalid 
argument" if using -v option or, just quit without any thing if no -v option is 
used.

What is the expected output? What do you see instead?
Command failed with code 22: Invalid argument, wish '-v' option.

What version of the product are you using? On what operating system?
ubuntu 12.04 (the default version is 1.4.1 that doesn't support truecrypt 
format)

Please provide any additional information below.
1. I used the same way to install 1.6.6 in Linuxmint 17, it works fine with 
truecrypt disk/partition.

2. I used 'sudo make check', in ubuntu, it says 2 tests fail. In Linuxmint, it 
says 1 test fail.

3. Under linuxmint, it could open disc (/dev/sda), or, partition (/dev/sda1) 
or, container file in truecrypt format.

4. Under ubuntu 12.04, it can't open any of the above.

5. I have not tried other ubuntu versions.

Original issue reported on code.google.com by hanz.zh...@gmail.com on 18 Nov 2014 at 6:26

GoogleCodeExporter commented 9 years ago
Please can you paste output of the command with added --debug switch?

Anyway, this seem like a misconfiguration. Are you sure you are using proper 
libcryptsetup? (And not old version from old install package?)

There is a cryptsetup 1.6.6 build for Debian, could you update to this version 
instead of own rebuild?

Original comment by gmazyl...@gmail.com on 18 Nov 2014 at 6:49

GoogleCodeExporter commented 9 years ago

---Command with --debug

# cryptsetup 1.6.6 processing "cryptsetup --debug open --type tcrypt /dev/sda 
sda"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating crypt device /dev/sda context.
# Trying to open and read device /dev/sda.
# Initialising device-mapper backend, UDEV is enabled.
# Detected dm-crypt version 1.11.1, dm-ioctl version 4.22.0.
# Interactive passphrase entry requested.
Enter passphrase: 
# Trying to load TCRYPT crypt type from device /dev/sda.
# Releasing crypt device /dev/sda context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code 22: Invalid argument

------How to make sure the proper libcryptsetup is used? This might be the 
reason as Linuxmint has default 1.6.1 and there is no problem opening truecrypt 
formats. This is also true after upgrading to 1.6.6. Ubuntu 12.04 used to have 
1.4.1 and that is not supporting truecrypt format. 

------Where to find the 1.6.6 deb package? 

Thanks.

Original comment by hanz.zh...@gmail.com on 18 Nov 2014 at 7:12

GoogleCodeExporter commented 9 years ago
This really looks like your cryptsetup uses old libcryptsetup (which doesn't 
support TCRYPT format at all).

Please make sure that you do not have any old libcryptsetup in path.

Check "ldd cryptsetup" and remove old libcryptsetup it is pointing to.

You should see sometjing loke this in debug output:
...
Enter passphrase: 
# Trying to load TCRYPT crypt type from device 
tcrypt-images/tc_5-rmd160-xts-aes.
# Crypto backend (gcrypt 1.6.2) initialized.
# Detected kernel Linux 3.16.3 x86_64.
# Reading TCRYPT header of size 512 bytes from device ...

(Debian packages are tracked here 
https://packages.qa.debian.org/c/cryptsetup.html I have no idea if anyone build 
1.6.6 directly for Ubuntu, ask on distro supprt list please.)

Original comment by gmazyl...@gmail.com on 18 Nov 2014 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks. Solved. 

I just purged the old cryptsetup-bin and libcrypsetup4. 

Then I could mount the tcrypt option. 

Might need to add this to the package to remind people to purge before fresh 
install. 

Your support is very helpful and very on-time manner. AAA+++

Original comment by hanz.zh...@gmail.com on 18 Nov 2014 at 8:02

GoogleCodeExporter commented 9 years ago
Actually this is my mistake in library version handling, the new build should 
require only new library version. I made it compatible but apparently it causes 
more troubles.

Anyway, problem solved, thanks :) 

Original comment by gmazyl...@gmail.com on 18 Nov 2014 at 8:51