You are not logged in.
TrueCrypt has finally been released for GNU/Linux. I tried to compile it, but got an error (i'm using the arch stock kernel26). A working PKGBUILD would be great.
Offline
Could you post the PKGBUILD you used and the error message?
Offline
I didn't use any PKGBUILD at all, i just ran the build.sh script as described in the readme file.
This is what happens:
Checking build requirements...
Building kernel module... /var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:16:16: error: dm.h: No such file or directory
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'truecrypt_ctr':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:119: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:126: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:135: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:143: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:148: error: 'SECTOR_FORMAT' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:148: error: (Each undeclared identifier is reported only once
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:148: error: for each function it appears in.)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:150: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:154: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:154: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:156: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:166: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:175: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:182: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:190: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:203: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:210: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:217: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:224: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:231: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:238: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:246: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:252: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'truecrypt_dtr':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:279: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'dereference_bio_ctx':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:301: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'work_process':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:316: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'truecrypt_endio':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:346: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:351: error: syntax error before 'SECTOR_FORMAT'
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'truecrypt_map':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:389: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:396: error: syntax error before 'SECTOR_FORMAT'
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:427: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:440: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:523: error: syntax error before 'SECTOR_FORMAT'
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: At top level:
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:531: error: syntax error before 'status_type_t'
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: In function 'truecrypt_status':
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:533: error: 'ti' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:535: error: 'type' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:537: error: 'STATUSTYPE_INFO' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:538: error: 'result' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:541: error: 'STATUSTYPE_TABLE' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:544: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:544: error: dereferencing pointer to incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:545: error: 'maxlen' undeclared (first use in this function)
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:545: error: syntax error before 'SECTOR_FORMAT'
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c: At top level:
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:563: error: variable 'truecrypt_target' has initializer but incomplete type
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:564: error: unknown field 'name' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:565: error: unknown field 'version' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:565: error: extra brace group at end of initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:565: error: (near initialization for 'truecrypt_target')
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:566: error: unknown field 'module' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:567: error: unknown field 'ctr' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:568: error: unknown field 'dtr' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:569: error: unknown field 'map' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:570: error: unknown field 'status' specified in initializer
/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.c:639: error: syntax error before 'DM_NAME'
make[2]: *** [/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel/Dm-target.o] Error 1
make[1]: *** [_module_/var/abs/local/truecrypt/truecrypt-4.0/Linux/Kernel] Error 2
make: *** [truecrypt] Error 2
Error: Failed to build kernel module
Looks like a missing header file?
Offline
erm it needs to point at /usr/src/linux for the kernel headers...
if youre not doing a pkgbuild why are you in /var/abs/local ?
no real benefit....
Offline
I was going to write a PKGBUILD, just wanted to see if it would compile first. I'm afraid i don't know how to point it to the header files, were you able to build it?
Offline
Have you read the read me file......
build was straight forward.....
although a pkg would be awkward...
Offline
Well, the readme file doesn't say anything else than that you should run the build.sh script. Which is excactly what i have done.
Offline
it tells you to cd linux
then run ./build.sh
then run ./install.sh ...
the linux it refers to is the one in /usr/src/
unpack the tarball there then run it
Offline
Hi all,
OK, I downloaded the last TrueCrypt source code and tried to build. This is what happened:
# ./build.sh
Checking build requirements...
Error: Kernel source code is incomplete - header file dm.h not found.
I have the kernel headers, but dm.h is not included. Any ideas where I should get it?
Thnx,
Jan
Offline
yep gonna have to grab them from http://kernel.org .....
make sure you grab the version your running dont worry about the ARCH part just make sure the numbers match up EXACTLY then untar it to /usr/src
make the symlink
ln -sf /usr/src/Kernelversion linux
Offline
yep gonna have to grab them from http://kernel.org .....
Well, I copied the drivers/md directory from the kernel.org tarball to /usr/src/linux-2.6.15-ARCH/drivers (that's where the dm.h should be) and was able to build truecrypt.
But now thinking of making a PKGBUILD -- downloading the whole kernel source in order to obtain just one header file is a very ugly solution. Why isn't dm.h in /usr/src/linux-2.6.15-ARCH/drivers/md already? I am still using 2.6.15.1, perhaps it is there in 2.6.15.2 but somewhat I doubt it.
Some more problems with making PKGBUILD -- the source download of truecrypt is made "convenient" by some dropdown menus and button-pressing, but there is no explicit URL. Can someone help guessing it?
And the last problem -- truecrypt does not use ./configure && make && make install, is uses custom build.sh and install.sh scripts. The first one does probably not need modifications and the latter one is probably easy to hack, but it is still a hack. Does anyone have a nice idea how to hack it in a clean way?
Jan
Offline
Why isn't dm.h in /usr/src/linux-2.6.15-ARCH/drivers/md already?
Because there has been no need for it so far. Submit a feature request on Flyspray.
there is no explicit URL. Can someone help guessing it?
Here's my guess.
Does anyone have a nice idea how to hack it in a clean way?
sed -i "s#usr/local#usr#;s#DIR=/#DIR=$startdir/pkg/#" install.sh
I'll try this now and see how it goes.
Offline
Actually, I can't - I don't have the required dm-mod module in my custom kernel. The stock kernel has it, though, so maybe someone else could have a go at a PKGBUILD - that sed command does the job fine here.
Offline
janwil wrote:Why isn't dm.h in /usr/src/linux-2.6.15-ARCH/drivers/md already?
Because there has been no need for it so far. Submit a feature request on Flyspray.
OK, so I did. But it may take some time before such a low-priority action is taken. Any ideas how to do building in the meantime? Copying the necessary headers manually somewhere? Where then?
Jan
Offline
Here's a PKGBUILD, cooked up with today's breakfast . I reckoned it was better to forget about the install.sh script, and do it this way - there are only three files in the package, anyway:
# Contributor: Tom K <tomk@runbox.com>
pkgname=truecrypt
pkgver=4.1
pkgrel=1
pkgdesc="Free open-source disk encryption software"
depends=('device-mapper')
source=(http://www.$pkgname.org/downloads/$pkgname-$pkgver-source-code.tar.gz)
url="http://www.truecrypt.org/"
build() {
cd $startdir/src/$pkgname-$pkgver-source-code/Linux
./build.sh
mkdir -p $startdir/pkg/{usr/bin,usr/man/man1,lib/modules/`uname -r`/extra}
install -m 600 Kernel/truecrypt.ko $startdir/pkg/lib/modules/`uname -r`/extra
install -m 755 Cli/truecrypt $startdir/pkg/usr/bin
install -m 644 Cli/Man/truecrypt.1 $startdir/pkg/usr/man/man1
}
Of course, this will only build if you have the dm.h header, as mentioned above. For custom kernel users, this won't be a problem, but anyone using the stock or archck packages will need to ask for it to be added. I also need to do a . install file, but that won't take too long.
<edit>
Sorry, janwil - I started this post a while ago, but there's a lot of distractions here at the moment.
Offline
Here's a bit of not-so-good news from the TrueCrypt forum:
Currently, it is not possible to create TrueCrypt volumes under Linux. Such an ability will be implemented in a future version.
So if you dual-boot with Windoze, you can create your volumes there for the moment, and then access them in Linux.
Here's what it says on TrueCrypt's Future page:
The following features are planned to be implemented in a future version:
* Parallelized/pipelined read/write
* Support for external authentication modules
* Support for more platforms
* Ability to create TrueCrypt volumes on Linux
* GUI for Linux versions of TrueCrypt
* 'Raw' CD/DVD volumes
* TrueCrypt API
and more.
Maybe we'll have kernel support by the time he adds Linux support.
Offline
Folks, I am running encrypted volumes on Arch 0.7.1, stock kernel, no TrueCrypt, right now.
Here is a recipe for doing it.
Step 1: create a file to use as a container for the encrypted volume. If you want a 1 GB encrypted volume, you need a 1 GB file.
# dd if=/dev/urandom of=ev1G.vol bs=1M count=1024
In this example, I have called my 1G encrypted volume file the obvious name of ev1G.vol. This command prefills this volume with random data (/dev/urandom) so that it is never obvious to someone looking at the file with a hex editor where the actual volume data ends and free space begins
Just a note to the wise - this step may take 5 minutes or longer - filling a 1G file takes time!
Step 2: Create an encrypted loopback connection to the file
# losetup -e aes-128 /dev/loop2 ev1G.vol
This example uses AES 128 bit encryption. I am sure that others are supported by Arch, but I tried this one and it worked, so I did not search any farther.
With this sort of a connection to the file, everything that is written to it, both low level and high level, is encrypted.
I have used /dev/loop2 - you can use any available loop device.
Step 3: Create a file system
# mkreiserfs /dev/loop2
I have used Reiser - you can use whatever system you like.
Step 4: Disconnect the volume - you are done and ready to use it
# losetup -d /dev/loop2
Step 5: Mount Your Volume and Use It!
# mount -t reiserfs -o loop=/dev/loop2,encryption=aes-128 ev1G.vol /mnt/ev1G
In this example, I created a new mount point /mnt/ev1G for use with my volume. You may use any convenient mount point.
/mnt/ev1G is now available for reading, writing, using just like any other volume. Everything is encrypted and decrypted on the fly, transparently. It looks and feels just like a real volume, except that everything is encrypted and when you unmount it, it is no longer visible.
I have set up /etc/sudoers to allow ordinary non root users to mount and unmount my encrypted volumes, so that I don't have to change into root every time, and I have hooked up the mount and unmount commands to conveniently named scripts, to save typing the commands every time.
Step 6: When You are Done, Unmount Your Volume - Your Data is Safe
# umount /mnt/ev1G
That's it! It works very well. Steps 1-4 are one time only, as you set up the encrypted volume. After that, just repeat Steps 5 and 6 each time.
Cast off the Microsoft shackles Jan 2005
Offline
Can't speak for everyone, but I am aware of this method. The more the merrier, I say.
Thanks anyway.
Offline
TrueCrypt v4.2 has been released.
http://www.truecrypt.org/history.php
New features: * TrueCrypt volumes can now be created under Linux..."
More info at the webpage.
Offline
Thanks judfilm. It will be in the AUR shortly.
<edit>
OK - there we go.
Offline