PDA

View Full Version : Help getting TrueCrypt running...



386
10th November 2006, 11:26 PM
I'm basically at the first step... compiling, as the the RPM on their site doesn't work with 2.6.18.

# ./build.sh
Checking build requirements...
Linux kernel (2.6.18-1.2200.fc5smp) source directory [/usr/src/linux]:


For this I need to get and install kernel-2.6.18-1.2200.fc5.src.rpm?


I tried that, stuff was placed into /usr/src/redhat/. But it seems something needs to be done to those files? As there is a config file in /usr/src/redhat/SOURCES/...

386
13th November 2006, 06:43 AM
No one can help? :confused:

nick.stumpos
13th November 2006, 06:58 AM
you need the kernel-devel packages
yum instal kernel-devel

386
13th November 2006, 11:31 PM
yum instal kernel-devel

Okie dokie. Done.

But what do I put in at this point:


# ./build.sh
Checking build requirements...
Linux kernel (2.6.18-1.2200.fc5smp) source directory [/usr/src/linux]:

What is the correct source directory it expects on FC5?

emamm
13th November 2006, 11:41 PM
Hello

Unfortunately that didn't help me.

What follows is part of the email I sent to truecrpyt (a piece of software for the brave!) forum
http://forums.truecrypt.org/viewtopic.php?p=22139#22139

/build.sh
Checking build requirements...
Linux kernel (2.6.18-1.2239.fc5) source directory [/usr/src/linux]: /usr/src/kernels/2.6.18-1.2239.fc5-i686/
Error: Kernel source code is incomplete - drivers/md/dm.h not found.

I have also tried

rpmbuild --rebuild truecrypt-4.2a-3.EL.FC5.src.rpm
Installing truecrypt-4.2a-3.EL.FC5.src.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 2dd54f07
warning: user lassauge does not exist - using root
warning: group lassauge does not exist - using root
warning: user lassauge does not exist - using root
warning: group lassauge does not exist - using root
warning: user lassauge does not exist - using root
warning: group lassauge does not exist - using root
warning: user lassauge does not exist - using root
warning: group lassauge does not exist - using root
error: Failed build dependencies:
kernel-devel-i386 = 2.6.18-1.2239.fc5 is needed by truecrypt-4.2a-3.i386


Before trying the commands listed above, I did:
a) yum install yum-utils
b) yumdownloader --source kernel --enablerepo core-source --enablerepo updates-source
c) rpm -ivh kernel-2.6.18-1.2239.fc5.src.rpm
d) rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec

Have I missed something?

Many thanks

Ed

PS. I couldn't find any rpm for the lastest kernel (not in rpmfarm anyway).

emamm
13th November 2006, 11:45 PM
Just a note. If you are using 2200, go to http://rpmfarm.free.fr/ and grap truecrypt rpm and kmod-truecrypt. They work for 2200 but not for the lastest kernel 2239,

nick.stumpos
13th November 2006, 11:45 PM
do a rpm -qa | grep kernels im betting you dont have the same kernel devel as the kernel you are running

emamm
13th November 2006, 11:48 PM
do a rpm -qa | grep kernels im betting you dont have the same kernel devel as the kernel you are running

Unfortunately I do

[root@ut-eacghome Linux]# rpm -qa | grep kernel
kernel-devel-2.6.18-1.2200.fc5
kernel-2.6.18-1.2200.fc5
kernel-2.6.18-1.2239.fc5
kernel-devel-2.6.18-1.2239.fc5


I am willing to try anything, so any suggestions?

Ed

nick.stumpos
13th November 2006, 11:54 PM
since you know it is installed, you could edit the spec file in the src rpm to not need the kernel-devel. It may work

emamm
14th November 2006, 12:02 AM
Bingo!

rpmbuild -ba truecrypt.spec --target "$(uname -m)" --define "ksrc /lib/modules/$(uname -r)/build"

Wrote: /usr/src/redhat/SRPMS/truecrypt-4.2a-3.src.rpm
Wrote: /usr/src/redhat/RPMS/i686/truecrypt-4.2a-3.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/kmod-truecrypt-2.6.18-1.2239.fc5-4.2a-3.i686.rpm


Many thanks

Ed

emamm
14th November 2006, 12:35 AM
That was for src.rpm if you want ot build from source, that is, with build.sh use

/lib/modules/2.6.18-1.2239.fc5/build

386
14th November 2006, 01:13 AM
emamm, can you please explain the process more step by step?

My system:


# uname -r
2.6.18-1.2200.fc5smp

# rpm -qa | grep kernel
kernel-devel-2.6.18-1.2200.fc5
kernel-smp-2.6.15-1.2054_FC5
kernel-smp-2.6.18-1.2200.fc5
kernel-smp-devel-2.6.18-1.2200.fc5

I have source TrueCrypt in a /home/user/truecrypt-4.2a...

emamm
14th November 2006, 03:16 PM
Hi 386

I have tried to compile truecryot from build.sh inside Linux dir, didn't you? Build asks for a path. Just use

/lib/modules/2.6.18-1.2200.fc5/build

Ed

386
14th November 2006, 11:33 PM
That's the part that doesn't work, the path...


# ls -l /lib/modules/2.6.18-1.2200.fc5smp/build
lrwxrwxrwx 1 root root 51 Nov 8 16:56 /lib/modules/2.6.18-1.2200.fc5smp/build - > ../../../usr/src/kernels/2.6.18-1.2200.fc5-smp-i686


# ./build.sh
Checking build requirements...
Linux kernel (2.6.18-1.2200.fc5smp) source directory [/usr/src/linux]: /lib/modules/2.6.18-1.2200.fc5smp/build
Error: /lib/modules/2.6.18-1.2200.fc5smp/build does not exit


# ./build.sh
Checking build requirements...
Linux kernel (2.6.18-1.2200.fc5smp) source directory [/usr/src/linux]: /lib/modules/2.6.18-1.2200.fc5smp
Error: Kernel source version in /lib/modules/2.6.18-1.2200.fc5smp is not 2.6.18-1.2200.fc5smp

Any ideas?

386
15th November 2006, 11:57 PM
Is this really a complicated thing I'm trying to do here?

nick.stumpos
16th November 2006, 12:01 AM
try /usr/src/kernels as your src path

386
16th November 2006, 03:04 AM
/usr/src/kernels

That I do not have.

I do have /usr/src/redhat, then 2 folders inside SOURCES and SPECS. :confused:

nick.stumpos
16th November 2006, 03:15 AM
if you dont have that then you do not have the kernel -devel
what does rpm -qa | grep kernel give you

nick.stumpos
16th November 2006, 03:42 AM
sorry i didnt read the first page i guess you do, let me think for a sec

emamm
16th November 2006, 10:54 AM
Hello

To be honest I don't know. I tried a couple of times and eventually it worked.

Did you install the kernel sources (not headers)? If not follow the steps lised on my first email. Then check if the kernel files are under /lib/modules/ Finally try build again.

Out of curiosity, have you tried the rpms from rpmfarm?

Cheers

Ed

386
17th November 2006, 12:00 AM
emamm, I did run the command you mentioned previously...

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

...then installed the downloaded RPM...

But the next command failed...


#rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kern el-2.6.spec
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2110
+ umask 022
+ cd /usr/src/redhat/BUILD
/var/tmp/rpm-tmp.2110: line 21: cd: /usr/src/redhat/BUILD: No such file or direc tory
error: Bad exit status from /var/tmp/rpm-tmp.2110 (%prep)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.2110 (%prep)

emamm
19th November 2006, 10:00 PM
Hi 386

I am sorry but I have no idea what is going on. It worked for me.

Have you tried the rpms from rpofarm? Maybe that can be your way out.

Cheers

Ed