Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old March 24th, 2006   #1
Matthai
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 33
Arrow HOWTO GUIDE: TrueCrypt on new version of Ubuntu

TrueCrypt is Free open-source disk encryption software for Windows XP/2000/2003 and Linux.
Main Features:
* Creates a virtual encrypted disk within a file and mounts it as a real disk.
* Encrypts an entire hard disk partition or a device, such as USB flash drive.
* Encryption is automatic, real-time (on-the-fly) and transparent.
* Provides two levels of plausible deniability, in case an adversary forces you to reveal the password:
1) Hidden volume (steganography).
2) No TrueCrypt volume can be identified (volumes cannot be distinguished from random data).

* Encryption algorithms: AES-256, Blowfish (448-bit key), CAST5, Serpent, Triple DES, and Twofish.
Mode of operation: LRW (CBC supported as legacy).



How to install TrueCrypt on NEW version of Ubuntu, including new version of Ubuntu Breezy kernel (this is important, since Breezy updated kernel through security updates).

Download TrueCrypt code at: http://www.truecrypt.org/downloads.php (tar.gz version) to your home directory. Assume you have version 4.1 (of TrueCrypt)

cd
tar xvfz truecrypt-4.1-source-code.tar.gz

Check the version of our Linux kernel:

uname -r

For instance, it is 2.6.12-10-386 - so we have to install source for 2.6.12:

sudo apt-get install linux-source-2.6.12
cd /usr/src/
sudo tar xvjf linux-source-2.6.12.tar.bz2

Create symbolic link:

sudo ln -s linux-source-2.6.12 linux

Install tools needed for compiling:

sudo apt-get install build-essential

Check wit which version our kernel was compiled:

cat /proc/version

output is something like that:

Linux version 2.6.12-10-386 (buildd@terranova) (gcc version 3.4.5 20050809 (prerelease) (Ubuntu 3.4.4-6ubuntu8.1)) #1 Sat Mar 11 16:13:17 UTC 2006

So we need gcc 3.4 (subversion 3.4.x is not important). Let's install it:

sudo apt-get install gcc-3.4


Let's use it and compile the modules (everything should be set to default - so answer with pressing "enter" key):

export CC=gcc-3.4
sudo make -C /usr/src/linux-source-2.6.12 config modules

Now, install TrueCrypt:

cd
cd truecrypt-4.1-source-code/Linux/
sudo ./build.sh

sudo ./install.sh

You should set this also:

Install man page to [/usr/local/man]: /usr/share/man

That's it.

Now the funniest part: mounting TC volume from the USB key to /mnt:
sudo truecrypt /media/MATTHAI/TrueCrypt/mobile.tc /mnt/
Enter password for '/media/MATTHAI/TrueCrypt/mobile.tc':

List all mounted TrueCrypt partitions:

sudo truecrypt -vl
/dev/mapper/truecrypt0:
Volume: /media/MATTHAI/TrueCrypt/mobile.tc
Type: Normal
Size: 15728128 bytes
Encryption algorithm: AES
Mode of operation: LRW
Read-only: No
Hidden volume protected: No

Let's check the encrypted files:

cd /mnt/
ls

password.txt secret.txt System Volume Information

Unmount the drive:

cd
sudo truecrypt -d

Check if it is really unmounted:

ls -l /mnt/
total 0

Have fun and also check the documentation: http://www.truecrypt.org/documentation.php
Matthai is offline   Reply With Quote
Old April 5th, 2006   #2
alaaji
5 Cups of Ubuntu
 
alaaji's Avatar
 
Join Date: Mar 2006
Location: Morocco (born in the USA)
Beans: 33
Ubuntu 9.04 Jaunty Jackalope
Send a message via Yahoo to alaaji
Talking Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

I really appreciate the guide. Thanks a bunch b/c I was having trouble getting my encrypted volume mounted.
alaaji is offline   Reply With Quote
Old April 21st, 2006   #3
Mr.Auer
A Carafe of Ubuntu
 
Join Date: Jun 2005
Location: Finland
Beans: 89
Ubuntu 9.10 Karmic Koala
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

Does this howto also work with Dapper as it is? And if I update the kernel later, do I have to redo this?
I mean, can I use the Breezy .deb, or should I compile it myself under Dapper..Breezy used different version of gcc right? So it means I need to compile, and then do like your howto says?

Last edited by Mr.Auer; April 21st, 2006 at 10:02 AM..
Mr.Auer is offline   Reply With Quote
Old April 24th, 2006   #4
Nais
First Cup of Ubuntu
 
Join Date: Jul 2005
Beans: 8
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

Quote:
Originally Posted by Mr.Auer
Does this howto also work with Dapper as it is? And if I update the kernel later, do I have to redo this?
This method works fine in Dapper, I've done it myself. However, I too would like to know if there's any way to avoid having to compile all the modules each time I update the kernel.

Edit: Seems like you don't have to recompile at all. Not sure if it's because I update to the newest version.

Last edited by Nais; April 25th, 2006 at 12:56 AM.. Reason: new information
Nais is offline   Reply With Quote
Old April 26th, 2006   #5
flyingbrass
A Carafe of Ubuntu
 
Join Date: Sep 2005
Beans: 118
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

I'm running 2.6.12-10-686 in Breezy. Truecrypt's module won't load unless forced. Dmesg shows:
Quote:
truecrypt: version magic '2.6.12 586 gcc-3.4' should be '2.6.12-10-686 686 gcc-3.4'
Truecrypt works if I force load the module. Where is it getting "2.6.12 586"?
flyingbrass is offline   Reply With Quote
Old April 26th, 2006   #6
flyingbrass
A Carafe of Ubuntu
 
Join Date: Sep 2005
Beans: 118
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

This fixed it. Found in the Truecrypt forum:
Quote:
rm -rf linux-source-2.6.12
tar xfvj linux-source-2.6.12.tar.bz2
cd linux-source-2.6.12
make oldconfig && make modules

(for some reason make clean didn't do it?)

THEN recompiled truecrypt
flyingbrass is offline   Reply With Quote
Old April 30th, 2006   #7
flyingrhino
5 Cups of Ubuntu
 
Join Date: Apr 2006
Beans: 17
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

Hi all,
I'm new to this linux thing, is there any way I can do an apt-get install
to make truecrypt work ? Or is there a package I can just install with dpkg ?
I have kubuntu dapper installed and am not very confident in doing all the kernel stuff you originally mentioned.

Now if I just want to manually fire up truecrypt and mount a container, isn't there
a way of just running an executable and getting it to work ?
flyingrhino is offline   Reply With Quote
Old May 9th, 2006   #8
ken_fallon
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 5
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

I'd like to confirm this works on Dapper (Kubuntu) running kernels 2.6.15-22-386, 2.6.15-21-386, 2.6.15-20-386 and on 2.6.15-19-386 (different compile for each )

For 2.6.15-22-386 I replaced 2.6.12 with 2.6.15 throughout

As "cat /proc/version" reported "Linux version 2.6.15-22-386 (buildd@vernadsky) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 PREEMPT Sun May 7 15:49:09 UTC 2006", I replaced export CC=gcc-3.4 with export CC=gcc-4.0

Finally as I didn't want to hit enter all the time I used make oldconfig instead of just make config:
sudo make -C /usr/src/linux-source-2.6.12 config modules with
sudo make -C /usr/src/linux-source-2.6.15 oldconfig modules
ken_fallon is offline   Reply With Quote
Old May 9th, 2006   #9
ken_fallon
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 5
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

Quote:
Originally Posted by flyingrhino
Hi all,
I'm new to this linux thing, is there any way I can do an apt-get install
to make truecrypt work ? Or is there a package I can just install with dpkg ?
I have kubuntu dapper installed and am not very confident in doing all the kernel stuff you originally mentioned.

Now if I just want to manually fire up truecrypt and mount a container, isn't there
a way of just running an executable and getting it to work ?
The version of truecrypt you run is different for each Kernel version. I also run Kubuntu Dapper and there have been four kernel updates in the last two months alone and each time TrueCrypt needs to be updated. Until TrueCrypt is added to a repository your options are to wait for someone to make a package for you or compile it yourself.

I'll admit that the instructions are a bit daunting the first time you do it but it's not actually that difficult because you don't need to make any decisions during the kernel compile. Epically if you use the make oldconfig instead of make config). If you're willing to give it a try then I can make custom instructions for you.

I'll need to know your kernel version and the version of gcc (the compiler that will make a running TrueCrypt version) that you have installed.


The following commands will make a text file on your Desktop called output.txt that has the kernel version you are using and the version of build-essentials and gcc you have installed if any.
Please open a terminal window and paste the following commands:
cat /proc/version >> ~/Desktop/output.txt
aptitude show build-essential gcc >> ~/Desktop/output.txt

Then post the contents of the file output.txt

If you're not ready to do this then post the output anyway and wait and see if some nice person may make a debian package for you.
ken_fallon is offline   Reply With Quote
Old May 14th, 2006   #10
monkman
A Carafe of Ubuntu
 
Join Date: May 2005
Beans: 140
Re: HOWTO GUIDE: TrueCrypt on new version of Ubuntu

Hello!

How do i uninstall truecrypt using this howto? is it just deleteing the man pages and the binary?

Thanks!

Last edited by monkman; May 14th, 2006 at 07:41 AM..
monkman is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:04 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry