#!/bin/bash
# dd if=/dev/zero of=encrypted_filesystem bs=1M count=100 100+0 records in 100+0 records out # dmmkfs.sh encryted_filesystem Enter passphrase: Use which filesystem? 1) mke2fs 2) mkfs 3) mkfs.bfs 4) mkfs.cramfs 5) mkfs.ext2 6) mkfs.ext3 7) mkfs.jfs 8) mkfs.minix 9) mkfs.reiserfs 10) mkfs.xfs 11) mkreiserfs > 9 mkfs.reiserfs 3.6.12 (2003 www.namesys.com) Guessing about desired format.. Kernel 2.6.12.3-rock is running. Format 3.6 with standard journal Count of blocks on the device: 25600 Number of blocks consumed by mkreiserfs formatting process: 8212 Blocksize: 4096 Hash function used to sort names: "r5" Journal Size 8193 blocks (first block 18) Journal Max transaction length 1024 inode generation number: 0 UUID?: <no libuuid installed> ATTENTION?: YOU? SHOULD? REBOOT? AFTER? FDISK?! ALL? DATA? WILL? BE? LOST? ON? ’/dev/mapper/57c9c686af2b8b79b0c30c1d49ea1c56’! Continue (y/n):y Initializing journal - 0%....20%....40%....60%....80%....100% Syncing..ok Tell your friends to use a kernel based on 2.4.18 or later, and especially not a kernel based on 2.4.9, when you use reiserFS. Have fun. ReiserFS? is successfully created on /dev/mapper/57c9c686af2b8b79b0c30c1d49ea1c56.
root@fuzzy:~# dmmkfs.sh /dev/acer_stick1 Enter passphrase: Use which filesystem? 1) mke2fs 2) mkfs 3) mkfs.bfs 4) mkfs.cramfs 5) mkfs.ext2 6) mkfs.ext3 7) mkfs.jfs 8) mkfs.minix 9) mkfs.reiserfs 10) mkfs.xfs 11) mkreiserfs > 1 mke2fs 1.34 (25-Jul-2003) Filesystem label= OS? type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 62992 inodes, 251888 blocks 12594 blocks (5.00%) reserved for the super user First data block=1 31 block groups 8192 blocks per group, 8192 fragments per group 2032 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 35 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
root@fuzzy:~# dmmount.sh encrypted_filesystem /mnt/generic/ Enter passphrase:
root@fuzzy:~# dmmount.sh /dev/acer_stick1 /mnt/generic/ Enter passphrase:
root@fuzzy:~# dmumount.sh /mnt/generic/