LazyAdminBuildingTrueCrypt
From JQuantLib
This article explains how TrueCrypt can be installed on Debian boxes. Richard Gomes
Overview
This procedure builds TrueCrypt from sources and generate an executable binary for Debian Etch. This procedure were not tested on Lenny or Sid. We are not building a .deb file neither. Your feedback building on those environments is much appreciated.
Download
Download dependencies
cd /usr/src # Make a dir for PKCS mkdir PKCS cd PKCS wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/cryptoki.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ct-kip.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/opt-pkcs11.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3d3.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t-consolidated-d1.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h.org cd /usr/src # Download wxKGT-2.8.7 and untar it wget http://kent.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-2.8.7.tar.gz tar xvzf wxGTK-2.8.7.tar.gz
Download TrueCrypt
Due to security reasons, we have to download TrueCrypt sources by hand. This section is provided as a sake of example. In reality, you need to visit TrueCrypt website and download sources by hand or once you see a download link in your browser, you can use it to download using wget, if you find it useful.
# download TrueCrypt an untar it cd /usr/src wget "http://www.truecrypt.org/downloads/transient/c985dae828/TrueCrypt 6.1a Source.tar.gz" -O truecrypt-6.1a-source.tar.gz tar xvzf truecrypt-6.1a-source.tar.gz
Build
Install kernel sources and fuse
# install kernel sources KVER=$(uname -r | sed 's/-.*//') apt-get install linux-source-$KVER linux-kbuild-$KVER -V --simulate apt-get install linux-source-$KVER linux-kbuild-$KVER # install needed packages for the build apt-get install build-essential dh-make fakeroot dmsetup pkg-config libfuse-dev libfuse2 fuse-utils # enable userspace programs to export filesystems to linux kernel (http://packages.debian.org/etch/libfuse-dev) modprobe fuse echo "fuse" >> /etc/modules
Compile TrueCrypt
# Go to truecrypt source cd $BASE_DIR/truecrypt-6.1-source cd /usr/src cd truecrypt-6.1a-source # let's compile the bugger make NOGUI=1 PKCS11_INC=../PKCS WX_ROOT=../wxGTK-2.8.7 wxbuild make NOGUI=1 PKCS11_INC=../PKCS WX_ROOT=../wxGTK-2.8.7 WXSTATIC=1
Test generated executable
cd /usr/src ./truecrypt-6.1a-source/Main/truecrypt --version
Install
chown bin:bin truecrypt chmod 755 truecrypt cp -p truecrypt /usr/bin
If you find mistakes in this script, please contribute to other visitors by sending me the fix.
Thanks a lot.
Richard Gomes 11:48, 12 January 2009 (UTC)

