This was wholesale copied from the (German) blog at http://fedorawiki.de/index.php/Truecrypt

Set up yum

# yum install yum-utils  
# yum install rpm-build redhat-rpm-config unifdef  

`

yumdownloader –source kernel –enablerepo core-source –enablerepo updates-source

### Install Kernel Sources

  

mkdir /usr/src/redhat # due to packaging problem, I guess

rpm -ivh kernel-$(uname -r).src.rpm

`  
# cd /usr/src/redhat/SPECS  
# rpmbuild -bp --target $(uname -m) kernel-2.6.spec  

Copy dm.h into the right place

# cp /usr/src/redhat/BUILD/kernel-2.6.19/linux-2.6.19.$(uname -p)/drivers/md/dm.h  /usr/src/kernels/$(uname -r)-$(uname -m)/drivers/md/  

Get and unpack truecrypt sources

Get truecrypt source.

# tar xfz truecrypt-4.2a-source-code.tar.gz -C /tmp  

Patch the truecrypt source to cope with dm.h ‘issues’

Patch is
truecrypt-4.2a-Dm-target.c–kernel-2.6.18-and-2.6.19.patch
, put this in the main truecrypt-4.2a directory (which contains the Linux directory).

# cd /tmp  
# mv truecrypt-4.2a-Dm-target.c--kernel-2.6.18-and-2.6.19.patch truecrypt-4.2a/  
# cd truecrypt-4.2a/  
# patch -p1 < truecrypt-4.2a-Dm-target.c--kernel-2.6.18-and-2.6.19.patch  
# cd Linux  

Build truecrypt for real

Using /usr/src/kernels/$(uname -r)-$(uname -m)/ as location of linux sources when prompted

# cd Linux  
# ./build.sh  

Install truecrypt module

# su - # to get /sbin/modprobe into path  
# ./install.sh  

Load truecrypt module

# /sbin/modprobe truecrypt  
  
# /sbin/lsmod |grep truecrypt  
truecrypt             163588  0   
dm_mod                 63449  3 truecrypt,dm_mirror,dm_multipath  


Martin Andrews

{Finance, Software, AI} entrepreneur, living in Singapore with my family.