On June 21, 2005 10:07 am, Carlos Martin wrote: > On 20/06/05, Robert Connolly <[EMAIL PROTECTED]> wrote: > > Hi. I have a 10GB partition, /dev/hda2, and I want to mount just the > > first 2GB of it (long story). > > It's got to be really interesting. Please tell :)
I want to use the first 2GB as a decoy install. The remaining 8GB would be mounted as a loop device and encrypted. By default the system would boot the decoy, but if that ever happened the encrypted system wouldn't appear to exist (it would be hidden in freespace), and it may be overwritten by new files. In normal use an initrd would mount the 8GB of freespace and use it as a system, the first 2GB could be mounted later by hand, to /mnt/decoy, so that upgrades could be installed.. but they would be contained to the first 2GB of the real partition. A decoy /home partition might also be set up, so that the decoy can boot with a read-only / to avoid accidental damage to the encrypted system, with /tmp and /var/tmp mounted to tmpfs. The point of this is that, without the initrd, the encrypted system could be denied to exist... it would look like cryptographically random data written all over the free space, which looks exactly like a disk wipe with urandom (which is done before the decoy is installed so that everything is consistant). I already know about steganography, but it's unmaintained in linux, it has many limitations, and it places the cryptographic data randomly all over the drive and that its more bizzare than having it consistantly over the whole drive/freespace. I think my above method is more robust and just as good or better than steganography. > > Any of you know what else I could try? mount does not let me use the > > size= option with ext2, only with tmpfs. > > Have you thought about dd? Someting like > > dd if=/dev/hda2 of=$HOME/hda2-part bs=1024k count=2048 > > should copy the first 2GB of it (using the 2**10 conversion, use 1000 > and 2000 if you're talking about vendor-math). You may then be able to > mount it with > > mount -o loop -t ext2 $HOME/hda2-part /mnt/2 > > Just make sure you have enough size on your hard drive. > > About the dissapearing file I don't know. Maybe because the first one > is mounted on a loop device, but it shouldn't happen, methinks. This might work, but its not very elegant, and its slow. I'll think about it. robert -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
