There are 3 basic steps involved in installing the kernel source.
1. Download the desired kernel source (matching your current kernel if required)
sudo yum install yum-utils
yumdownloader --source kernel
2. Installing the SRC.RPM package
sudo rpm -ivh kernel-2.6.23.1-21.fc7.src.rpm
3. Using rpmbuild to prepare the source into a usable state
sudo rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec
Now, it's ready for the truecrypt part.
4. Edit truecrypt's truecrypt-4.3a-source-code/Linux/build.s
KERNEL_SRC=/usr/src/redhat/BUILD/kernel-2.6.2
5. Edit line 659 of truecrypt-4.3a-source-code/Linux/Kernel/D
But alas!!
# modprobe truecrypt
FATAL: Error inserting truecrypt (/lib/modules/2.6.23.1-21.fc7/extra/true
So I did a 'dmesg' and the error was: truecrypt: version magic '2.6.23.1-21.fc7 SMP mod_unload PENTIUM4 4KSTACKS ' should be '2.6.23.1-21.fc7 SMP mod_unload 686 4KSTACKS '
This is because even though I downloaded and configured the kernel sources (above). It still "looked" at kernel-devel for the kernel config etc. It so happened that when I ran make config in /usr/src/kernels/2.6.23.1-21.fc7 i changed the processor type to Pentium4. Not knowing what else I had changed, I decided to uninstall/reinstall "kernel-devel". When I rebuilt it, and modprobed truecrypt it worked fine.
