[NBLUG/talk] Crypt Filesystems

Walter Hansen gandalf at sonic.net
Wed Jul 26 20:10:54 PDT 2006


Tried this:

hydra:/mnt# head -c 2925 /dev/random | uuencode -m - | head -n 66 | tail
-n 65 | gpg --symmetric -a > /etc/loopkey.gpg
hydra:/mnt# head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n
1 | losetup -p 0 -e AES128 /dev/loop3 /dev/sdd1
hydra:/mnt# dd if=/dev/zero of=/dev/loop3 bs=4k conv=notrunc 2>/dev/null


hydra:/mnt# losetup -d /dev/loop3
hydra:/mnt# losetup
usage:
  losetup [-e encryption] [options] loop_device file  # setup
  losetup -F [options] loop_device [file]   # setup, read /etc/fstab
  losetup loop_device                       # give info
  losetup -a                                # give info of all loops
  losetup -d loop_device                    # delete
options:  -o offset  -s sizelimit  -p passwdfd  -S pseed  -H phash
          -I loinit  -T  -K gpgkey  -G gpghome  -C itercountk  -v  -r
hydra:/mnt# losetup -a
hydra:/mnt# losetup -e AES128 /dev/loop3 /dev/sdd1
Password:
hydra:/mnt# losetup -a
/dev/loop3: [000b]:63005 (/dev/sdd1) encryption=AES128
hydra:/mnt# mkfs -t ext2 /dev/loop3
mke2fs 1.37 (21-Mar-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30654464 inodes, 61277926 blocks
3063896 blocks (5.00%) reserved for the super user
First data block=0
1871 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
 4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
hydra:/mnt# losetup -d /dev/loop3
hydra:/mnt# losetup -a
hydra:/mnt# mount /dev/sdd1 -o loop=/dev/loop3,encryption=AES128
/mnt/backup/ -t ext2
Password:
mount: unknown filesystem type 'ext2'
hydra:/mnt# mount /dev/sdd1 -o loop=/dev/loop3,encryption=AES128
/mnt/backup/ -t ext3
Password:
mount: wrong fs type, bad option, bad superblock on /dev/loop3,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

hydra:/mnt# mount /dev/sdd1 -o loop=/dev/loop3,encryption=AES128 /mnt/backup/
Password:
mount: unknown filesystem type 'ext2'




More information about the talk mailing list