You are not logged in.

#1 2005-11-02 11:47:43

Mordrek
Member
From: Norway
Registered: 2005-03-10
Posts: 14

[request] TrueCrypt

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

#2 2005-11-02 18:29:23

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [request] TrueCrypt

Could you post the PKGBUILD you used and the error message?

Offline

#3 2005-11-02 18:54:26

Mordrek
Member
From: Norway
Registered: 2005-03-10
Posts: 14

Re: [request] TrueCrypt

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

#4 2005-11-02 19:23:59

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: [request] TrueCrypt

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

#5 2005-11-02 19:42:53

Mordrek
Member
From: Norway
Registered: 2005-03-10
Posts: 14

Re: [request] TrueCrypt

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

#6 2005-11-02 21:09:35

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: [request] TrueCrypt

Have you read the read me file......

build was straight forward.....

although a pkg would be awkward...

Offline

#7 2005-11-02 21:28:27

Mordrek
Member
From: Norway
Registered: 2005-03-10
Posts: 14

Re: [request] TrueCrypt

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

#8 2005-11-02 21:32:48

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: [request] TrueCrypt

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

#9 2006-02-03 14:58:17

janwil
Member
From: Tartu, Estonia
Registered: 2003-08-15
Posts: 88

Re: [request] TrueCrypt

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

#10 2006-02-03 15:59:40

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: [request] TrueCrypt

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

#11 2006-02-03 22:34:28

janwil
Member
From: Tartu, Estonia
Registered: 2003-08-15
Posts: 88

Re: [request] TrueCrypt

mpie wrote:

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

#12 2006-02-04 00:27:07

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

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.

janwil wrote:

there is no explicit URL. Can someone help guessing it?

Here's my guess. wink

janwil wrote:

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

#13 2006-02-04 01:21:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

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

#14 2006-02-04 10:26:38

janwil
Member
From: Tartu, Estonia
Registered: 2003-08-15
Posts: 88

Re: [request] TrueCrypt

tomk wrote:
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

#15 2006-02-04 10:55:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

Here's a PKGBUILD, cooked up with today's breakfast smile . 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

#16 2006-02-04 11:22:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

Here's a bit of not-so-good news from the TrueCrypt forum:

Syncon, TrueCrypt Developer / Designer wrote:

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.  roll

Offline

#17 2006-02-13 22:28:32

mac57
Member
From: St. Somewhere
Registered: 2006-01-06
Posts: 302
Website

Re: [request] TrueCrypt

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

#18 2006-02-13 23:12:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

Can't speak for everyone, but I am aware of this method. The more the merrier, I say. wink

Thanks anyway.

Offline

#19 2006-04-18 06:06:44

judfilm
Member
Registered: 2004-02-12
Posts: 229

Re: [request] TrueCrypt

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

#20 2006-04-18 07:44:13

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [request] TrueCrypt

Thanks judfilm. It will be in the AUR shortly. smile

<edit>
OK - there we go.

Offline

Board footer

Powered by FluxBB