PDA

View Full Version : [SOLVED] compressed, encrypted read-only filesystem for dvd archiving


kyuso
22nd November 2007, 10:43 PM
I've been archiving my user directories into cdrom/dvdrom using gzip+tar+gnupg into a single file, then store in a iso9660 to burn.

I'd like to go a little further and have an encrypted, compressed file system stored raw in the cdrom/dvdrom, with all timestamp/user+permission intact, so that other users can access it without having to go through manual gunzip/untar/un-gnupg to access individual files.

Couple of questions:

1. Can I store any filesystem format into cdrom/dvdrom and have fedora 7 or above detect and automount it? Basically, should I just burn a filesystem raw file into a dvdrom? I am not accessing the dvd from any other OS, so iso9660 may not be necessary.

2. Is there a filesystem that combines encryption and compression, preferably read-only? Otherwise I'll have to manually compress each and every file in an encrypted filesystem, or store a compressed filesystem user file in an encrypted filesystem.

I was able to make an encrypted filesystem on an external usb drive using dmcrypt and luks extension, which was auto-detected and mounted by Fedora 7, so I'm sure there must be a way for dvd archiving too.

huw-l
23rd November 2007, 11:31 AM
one of the filesystems based on fuse may do what you need

http://fuse.sourceforge.net/wiki/index.php/ArchiveFileSystems

I haven't used any of these so I don't know if they actually work.

kyuso
29th November 2007, 06:10 AM

Thank you for the response.

I found a solution that already exists in Fedora 7, and here is a site I started with:

http://www.niemueller.de/software/scripts/cryptodvd/

I used cryptsetup from cryptsetup-luks to create an encrypted filesystem. I also used mkzftree from zisofs-tools to compress a directory for iso9660. Pretty nifty tool, since files are stored as compressed and displayed uncompressed on the fly by iso9660 format.

It seems to work ok so far, although there were some issues:

1. gnome does not properly auto-mount read-only encrypted filesystem, so I have to manually open it. I traced the problem to cryptsetup causing an error if the device is read-only, so I have to add -r option.

2. after random reading from dvd, sometimes I/O error occurs, and sometimes unmount hangs. I know this is not a hardware problem since I compared the media against disk image and they all check out. I guess cryptsetup with non-standard iso9660 is not 100% stable. I couldn't even kill the processes. Well, as long as the media is correctly written, I wouldn't worry too much, since software can always be updated.

3. not related to encryption/compression, but I couldn't create a standard iso9660 since some filenames couldn't be written at all, so I used -U option in genisoimage. I hope this was not the cause for issue #2 above.