Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

How to share TrueCrypted drive for OSX and Linux with write perms Storage Devices
Let's say you have hard drive encrypted with TrueCrypt with HFS+ filesystem on it and you want to use it under both: OSX and Linux. That's no problem because TrueCrypt works great on both systems. But when you want to WRITE to such drive under Linux you'll get an error. That's because Linux do not support writing to journaled HFS. This is how to remove journaling from such drive.

Disabling journalingu on Mac is simple:
  • connect encrypted hard drive (e.g. TC-Disk) with TrueCrypt and then
  • open Terminal and type:
    diskutil disableJournal /Volumes/TC-Disk
Disabling journaling on Linux is slightly more complicated. Open up a shell window and do the following (comments are in parentheses, the # is the prompt):
  • # truecrypt --filesystem=none /dev/sda (TrueCrypt connects drive without knowledge of filesystem type.)
  • # truecrypt -l (Look for the mount path of the drive.)
  • You should see something similar to:
    /dev/mapper/truecrypt1 /dev/sda
  • then:
    # fsck.hfs -fy /dev/mapper/truecrypt1 (The fsck.hfs command to turn journaling OFF.)
  • And now you can mount TC-Disk under Linux with read-write permissions:
    # mount -t hfsplus -o rw /dev/mapper/truecrypt1 /mnt/my_encrypted_drive


[crarko adds: I haven't tested this one. OK, it's a little obscure but it might help someone.]
    •    
  • Currently 3.25 / 5
  You rated: 4 / 5 (4 votes cast)
 
[9,043 views]  

How to share TrueCrypted drive for OSX and Linux with write perms | 3 comments | Create New Account
Click here to return to the 'How to share TrueCrypted drive for OSX and Linux with write perms' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to share TrueCrypted drive for OSX and Linux with write perms
Authored by: afingal on Jan 21, '11 07:54:37AM

Thanks for the tip. This is something I may want to do. What I'm worried about, however, is that journaling is a good idea with an encrypted volume. When an encrypted volume becomes corrupted, you may be out of luck and journaling helps to prevent that. I wonder if it is better to use some format other than HFS+. Maybe ext3 would be a better bet? You can install support for it on a Mac but I don't know whether you get full support with journaling.



[ Reply to This | # ]
How to share TrueCrypted drive for OSX and Linux with write perms
Authored by: leamanc on Jan 21, '11 12:59:21PM

Are you sure that Linux cannot write to journaled HFS+ drives? It seems from my experience that for every other user but root, they do mount as read only, but if you mount the drive as root, you get full read/write permissions. Alternately, if the disk is always going to be there, load up its mountpoint in the fstab, and it will be mounted by the system at boot, and available as r/w to everyone.

This is based on my recollection of using Linux to recover some files off of HFS+ disks a while back. I am *pretty sure* they were journaled, but maybe I'm remembering wrong. Anyone else have any experience with HFS+ and Linux? HFS+ is definitely not my filesystem of choice if I am going to be using a disk amongst many different platforms.



[ Reply to This | # ]
How to share TrueCrypted drive for OSX and Linux with write perms
Authored by: sean.peters on Jan 22, '11 02:08:37PM

I also seem to remember being able to mount up and read/write to journaled HFS+ drives from linux... but I can't remember what was required other than that it wasn't especially straightforward. Not too helpful, I know.

WRT filesystems for sharing: the general state of affairs here is pretty crappy. Windows essentially can't mount up anything but NTFS or FAT32, and Mac is only a little better. Linux is the gold standard here, being able to mount up practically anything. I like both ext3 and HFS+ as filesystems, but if the goal is interoperability between different operating systems, you almost have to hold your nose and go with NTFS, because Windows can't read anything else.



[ Reply to This | # ]