Slightly less Random Ramblings

July 19, 2010

Automounting Truecrypt in Linux

Filed under: computing, encryption, linux, Truecrypt, ubuntu — Tags: , , — Robert Wicks @ 12:35 am

I have a dual boot system with Windows 7 and Ubuntu 10.04. In order to secure the system, I have system encryption with Truecrypt and encrypted LVM in Ubuntu. I need to access my Windows files from within Ubuntu. After a bit of searching around the Internet, I pieced together this command line, which I put in /etc/rc.local. Since my system is fully encrypted and used by only me, I’m not concerned about the password being in /etc/rc.local. I installed the Truecrypt console version.

I added the following line to /etc/rc.local:

echo “MyTruecryptPassPhrase” | /usr/local/bin/truecrypt -t -m system -k “” -p ”” –protect-hidden=no –fs-options=rw,noatime,umask=000 –filesystem=ntfs-3g /dev/<windows partition> /<local mount point>

By echoing the passphrase and piping it to the Truecrypt command, we avoid having it show up in the ‘ps -ef’ command. The filesystem will be mounted with 0777 permissions.

I have found that it is even possible to mount outer partitions (with hidden partitions inside) using this method, and protecting the hidden partition. The command is as follows:

echo “HiddenPartitionPassphrase\n\nOuterPartitionPassphrase” | /usr/bin/truecrypt -t -k “” -p “”  –protect-hidden=yes –fs-options=rw,noatime,umask=000  /dev/sda2 /windows

By using the hidden OS feature in Truecrypt, it is possible to triple boot your computer, with all data on the drive except for the /boot partition in Linux being encrypted. Since no secret information is stored in /boot, this is not a problem.

January 11, 2009

Sharing all your music with Firefly Media Server

Filed under: DAAP, firefly, linux, mp3, songbird, ubuntu — Robert Wicks @ 12:27 am

I have a cross-platform household. My wife and daughter use Windows, I use Windows for work and Ubuntu for meaningful things ;). I have a lot of music and audiobooks, mostly in mp3 format, but a few things in ogg, flac, and mp4. Everyone likes to listen to something, but how to share all the files? There are many solutions, of course, but the most convenient one for me was the one which allowed my wife to easily access the music with iTunes. The solution was the Firefly Media Server. Installing this under Ubuntu could hardly be simpler. From a command line, as root, type:

apt-get install mt-daapd ffmpeg

This will get you the software you need. After the packages are installed, edit the /etc/mt-daapd.conf file and change the location of your media files to wherever you keep them. After saving the file, issue

/etc/init.d/mt-daapd restart

I have occasionally found cases where Ubuntu starts services immediately after installing them. Restart means it will stop the process first, if there is an active one.

Wait a couple of minutes, for Firefly to scan your media files, and they should be accessible via DAAP. iTunes will discover the new server automatically, if the computer is on the same subnet as the server. I am told that Songbird works well with Firefly as well.

Blog at WordPress.com.

%d bloggers like this: