How to install TrueCrypt 4.3a on Fedora 7

We are going to compile TrueCrypt from source so first grab TrueCrypt's source code.

Extract the source code and navigate to the Linux folder

tar xfz truecrypt-4.3a-source-code.tar.gz
cd truecrypt-4.3a-source-code
cd Linux

Truecrypt needs to compile a kernel module during the build process. Unfortunately the kernel headers included with Fedora 7 (in the kernel-devel package) are missing the dm.h header file which is needed for compiling the kernel module.

We need to download the source RPM for the kernel and install it. I am using the release version of Fedora 7 so the rpm command would be...

su
rpm -ivh http://mirrors.kernel.org/fedora/releases/7/Fedora/source/SRPMS/kernel-2.6.21-1.3194.fc7.src.rpm
rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

This is roughly a 45MB download. Once we are done installing the source RPM we edit the build.sh file located in TrueCrypt's Linux folder.

Change the line

KERNEL_SRC=/lib/modules/$KERNEL_VER/source

to

KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.21/vanilla

save and run build.sh as root to start the build process

su
./build.sh

still logged in as root run the install script and modprobe the kernel module

./install.sh
/sbin/modprobe truecrypt

If the install script complains that modprobe is not found export the path to sbin to the path variable as follows

export PATH=/sbin:$PATH

We successfully installed truecrypt!


Didnt work for me...

/usr/src/redhat/BUILD/ is empty after installation of source. Used rpmbuild --rebuild command and source is now there.

Didnt work for me 2...

Well, I quickly found out that that directory disappears when the rpmbuild finishes so, doing this from a Terminal in superuser mode, terminated the rpmbuild after the vanilla directory appeared and rpmbuild had moved onto another file/folder by closing the window. It left the vanilla directory intact and installation of truecrypt was perfect. Thanks for getting me started in the right direction.

Ops! Forgot to add the rpm

Ops! Forgot to add the rpm build command :/
It's

rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

I edited the article with the rpmbuild command. Thanks for letting me know about this.

modprobe truecrypt error

Hi. I followed the article and almost everything works fine.
In the modprobe command I got the message:
FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3228.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Do you know what is that message. Did you get that message?

Thanks,
Douglas Chagas

A few updates...

I took your excellent instructions, and added a few comments of my own at :
http://platformedia.blogspot.com/2007/07/truecrypt-43-on-fedora-7-build-from.html

There are also some extra details about using truecrypt when an ordinary user...

FATAL: Error inserting truecrypt [truecrypt.ko: Unknown symbol]

Followed the following steps:

tar xfz truecrypt-4.3a-source-code.tar.gz
cd truecrypt-4.3a-source-code
cd Linux

wget path/kernel-2.6.21-1.3194.fc7.src.rpm
wget path/sparse-0.3-1.fc7.i386.rpm

sudo rpm -ivh kernel-2.6.21-1.3194.fc7.src.rpm
sudo rpm -ivh sparse-0.3-1.fc7.i386.rpm
sudo rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

Edit the build.sh file located in TrueCrypt's Linux folder and replace
KERNEL_SRC=/lib/modules/$KERNEL_VER/source
to
KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.21/vanilla

sudo ./install.sh
sudo /sbin/modprobe truecrypt

FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3194.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Zahid Hossain
http://search.com.bd/

Worked perfectly including volume creation but cannot mount it.

Having following error:

$sudo truecrypt test.tc test_mnt_dir

Enter password for '/home/me/test.tc':

insmod: error inserting '/usr/share/truecrypt/kernel/truecrypt-2.6.21.ko': -1 Unknown symbol in module
FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3194.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)
Failed to load TrueCrypt kernel module

Having problems...

I get right to the end of the installation and get this error:

[root@localhost Linux]# /sbin/modprobe truecrypt
FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3228.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

When I try to decrypt a TrueCrypt volume I get the following error:\

insmod: error inserting '/usr/share/truecrypt/kernel/truecrypt-2.6.21.ko': -1 Unknown symbol in module
FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3228.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)
Failed to load TrueCrypt kernel module

I'm assuming that the second error is a result of the first. Any ideas how to fix this?

I am on the same boat ...

I am on the same boat ... keep getting this error after following the instructions very closely. I checked my gcc environment and even made sure we had a plain install. I even tried compiling truecrypt using the makefile and the issue remains. I am installing on Ubuntu instead :(

Truecrypt does not work with Fedora 7 kernel 2.6.22

Hi,

your procedure does not work with the new kernel 2.6.22 as the rpm package is available only for 2.6.21.
Do you have any suggestion?

Thanks,
Dario

Sure it does

Sure it does

for the 2.6.22 kernel
from the instructions above replace
rpm -ivh http://mirrors.kernel.org/fedora/releases/7/Fedora/source/SRPMS/kernel-2.6.21-1.3194.fc7.src.rpm
with
rpm -ivh http://mirrors.kernel.org/fedora/updates/7/SRPMS/kernel-2.6.22.1-41.fc7.src.rpm

and replace
KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.21/vanilla
with
KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.22/vanilla

for the 2.6.23 kernel from the development repository
replace with
rpm -ivh http://mirrors.kernel.org/fedora/development/source/SRPMS/kernel-2.6.23-0.101.rc2.git5.fc8.src.rpm
and
KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.23/vanilla

I am using kernel

I am using kernel 2.6.22.1-41.fc7
and they no longer have the source for the above in the mirror.

they only have http://mirrors.kernel.org/fedora/updates/7/SRPMS/kernel-2.6.22.4-65.fc7.src.rpm

please help

i really need truecrypt

You've probably worked it

You've probably worked it out by now but if you Google "download kernel-2.6.21.1.41.fc7.src.rpm" you'll get several hits for it, but please check my typing.

No, it doesn't work with kernel-2.6.22.5-76.fc7.src.rpm

I have tried it. Precisely, I did this:

yum install sparse

rpm -ivh /mirror/fedora/mirror/core/updates/7/SRPMS/kernel-2.6.22.5-76.fc7.src.rpm
rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec
cp -p /boot/config-2.6.22.5-76.fc7 \
/usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.noarch/.config
cd /usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.noarch
make oldconfig
make clean
make && make modules

cd /usr/src
## to find dm.h:
ln -s redhat/BUILD/kernel-2.6.22/vanilla linux
rm -fr truecrypt-4.3a
tar zxf /backup/import/truecrypt-4.3a-source-code.tar.gz
mv truecrypt-4.3a-source-code truecrypt-4.3a
cd truecrypt-4.3a
cd Linux
### uncomment the first setting of KERNEL_SRC, to the one in
### /lib/modules/$KERNEL_VER/source, since dm.h doesn't exist there.
./build.sh
./install.sh
### take defaults

Problems with using comments

Using Konqueror to comment, I was asked to answer a simple math question. My answers were always wrong?? Anyway that is the message I got when I tried to preview or post. With firefox no questions are asked and it's easy to post a comment. Probably something to do with Java script which I keep off Konqueror.

Thanks! This post was very useful to me.

fatal error on modprobe

Thank you for a useful step-by-step guide. I am trying to open some Windows truecrypt volumes in Linux.

Like several other readers have written above, at the end of the above procedure I get the following error in response to "modprobe truecrypt":

FATAL: Error inserting truecrypt (/lib/modules/2.6.21-1.3194.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

In response to "dmesg | fgrep truecrypt" I get the following:
truecrypt: no version for "struct_module" found: kernel tainted.
truecrypt: disagrees about version of symbol dm_put_device
truecrypt: Unknown symbol dm_put_device
truecrypt: disagrees about version of symbol dm_unregister_target
truecrypt: Unknown symbol dm_unregister_target
truecrypt: disagrees about version of symbol dm_register_target
truecrypt: Unknown symbol dm_register_target
truecrypt: disagrees about version of symbol dm_table_get_mode
truecrypt: Unknown symbol dm_table_get_mode
truecrypt: disagrees about version of symbol dm_get_device
truecrypt: Unknown symbol dm_get_device
truecrypt: disagrees about version of symbol dm_put_device
truecrypt: Unknown symbol dm_put_device
truecrypt: disagrees about version of symbol dm_unregister_target
truecrypt: Unknown symbol dm_unregister_target
truecrypt: disagrees about version of symbol dm_register_target
truecrypt: Unknown symbol dm_register_target
truecrypt: disagrees about version of symbol dm_table_get_mode
truecrypt: Unknown symbol dm_table_get_mode
truecrypt: disagrees about version of symbol dm_get_device
truecrypt: Unknown symbol dm_get_device

Does this give you any clues as to possible fixes?

Thanks

Unkown symbol

I tried the above with a newly installed Fedora 7 and got
following the /sbin/modprode truecrypt

# /sbin/modprobe truecrypt
FATAL: Error inserting truecrypt (/lib/modules/2.6.22.9-91.fc7/extra/truecrypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

2.6.23 kernel

Many thanks for the guide. I must bookmark it as I depend on it every time a new kernel update is released and then spend a while wondering why truecrypt doesn't work.

A couple of tips for anyone struggling...

For the 2.6.23 kernel I had to use the following to get the source rpm...

rpm -ivh http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/updates/7/SRPMS/kernel-2.6.23.1-10.fc7.src.rpm

Also the 4.3a source doesn't compile against 2.6.23, but someone has posted a patch here...

http://andika-lives-here.blogspot.com/2007/10/truecrypt-43a-patch-for-kernel-2623-rcx.html

For those not up on patching (like me), I just copied the patch text down to the end of the last line and pasted it into a file (e.g. patch-2.6.23) and put that in the kernel directory under the truecrypt linux source, then ran 'patch -l -p0 < patch-2.6.23' from that directory.

Seemed to build then.

Phew. Whilst linux is certainly getting there with usability there are still a few little things like this which requires getting dirty. Really shouldn't have to mess about with kernel stuff, but anyway. What we really need is a truecrypt fedora package on livna or somewhere similar (any idea how you go about requesting that?).

Thanks for posting your

Thanks for posting your tips. I too believe there should be a truecrypt fedora package. I remember trying to make one once sometime ago but I was put off by the bureaucracy of becoming a package maintainer and the effort needed to maintain updates and creating a new kernel module every time a new kernel appears on the official repository. check out this page on livna if you're interested (http://rpm.livna.org/rlowiki/Contributors)

problems with fedora kernel 2.6.23.1-21.fc7

Hi,

yet another update from the fedora kernel (2.6.23.1-21.fc7) makes truecrypt not compile anymore with the above procedure.
Does anyone have any suggestion?

Thanks,
Dario

I posted the above tip (I

I posted the above tip (I can't seem to create an account here so I'm coming up anon). Anyway, so I just repeated what I did but with the updated kernel source.

i.e.

rpm -ivh http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/updates/7/SRPMS/kernel-2.6.23.1-21.fc7.src.rpm

The patch still seems to work, though I didn't re-run the patch as I still had the patched truecrypt source.

problems with fedora kernel 2.6.23.1-21.fc7

Hi,

Still I cannot install it properly. This is what I do:

rpm -ivh http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/updates/7/SRPMS/kernel-2.6.23.1-21.fc7.src.rpm
rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

I run build.sh,which contains the line KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.23/vanilla

I run install.sh

I run /sbin/modprobe truecrypt
FATAL: Error inserting truecrypt (/lib/modules/2.6.23.1-21.fc7/extra/truecrypt.ko): Invalid module format

I really do not know what else to do...

Thanks,
Dario

kernel-2.6.23.1-21.fc7.src.rpm

Hi all,

did anybody succeed in making truecrypt work with kernel-2.6.23.1-21.fc7.src.rpm?

It does not work for me, even with the patch posted above. It compiles but gives an error when I execute /sbin/modprobe truecrypt.

Cheers,
David

Have you done the 'export

Have you done the 'export PATH=/sbin:$PATH' before running install.sh ?

I think you can solve by yum install kernel-devel

On my linux box I solved by installing the kernel-devel!
Try! Rebuild & install.
Cheers
Crukko

drapLest

Thank you very much for this information. I like this site

Thanks matthew.
Regards,

Kameralı Sohbet ~ EnguzeLsohbet

Recent comments