Well, I spoke too soon. After I burnt the image, all the files were named correctly. I'm not sure what mkisofs was doing. Also, I was encrypting the data, so I had to send the output to my loopback device.
By the way, I asked about making fully encrypted CD's before, but no one had an answer. Well, I figured it out. Please let me know if this helps you.
touch /PathToEncrypted/file.iso
dd if=/dev/urandom of=/PathToEncrypted/file.iso bs=1M count=$size
These two commands make a .iso image filled with random bits. You will need to calculate before hand how large of a .iso file you will need.
losetup -T -e aes256 /dev/loop1 /PathToEncrypted/file.iso
Start your cryptographic loop. The -T option makes it ask for your password twice.
mkisofs -r -v -o /dev/loop1 -graft-points "/=./directory"
This will take all contents in the directory specified (assuming we placed these files in the current working directory) and runs them through the loopback.
mount -t iso9660 -o loop=/dev/loop2 /dev/loop1 /mnt/cdrom
This will mount file.iso. From here you can look through the contents.
umount /mnt/cdrom
losetup -d /dev/loop1
Unmount and kill the encrypted loopback so we can burn without the risk of modifications during the burn process.
growisofs -Z /dev/hdd=file.iso
This will burn the encrypted image. To mount the image do the following
losetup -e aes256 /dev/loop1 /dev/cdrom
mount -t iso9660 /dev/loop1 /mnt/cdrom
It may be complicated, but it is still totally cool.
|