ext2fs free space file system
ext2fsfsfs allows you to access free space on ext2-formatted device as a file
ruby e2fsfsfs.rb /dev/sda2 /mnt/free_space_of_sda2
this will mount a special fuse-based filesystem on /mnt/free_space_of_sda2
there will be just one file inside - “data”
content of the file is the content of your free blocks on /dev/sda2
unmounting:
fusermount -u /tmp/free_space_of_sda2
there is no fault tolerance,
program is not tested,
it can irrecoverably break your hw,sw,brain,and so on…
if you decide to mkfs on “data” file - be aware that any write to the original ext2 filesystem can change the free space allocations, breaking your new fs
also, if your original ext2 (e.g. /dev/sda2) is mounted rw while e2fsfsfs is running on it - well… don’t do that
potential uses (let me know if you’ve got any other idea):
secure cleaning your free space (after file deletion), with something like:
ruby e2fsfsfs.rb /dev/sda2 /mnt/free_space_of_sda2
dd if=/dev/urandom of=/mnt/free_space_of_sda2
fusermount -u /tmp/free_space_of_sda2deniable encryption - you can map “data” file to loopback device, encrypt that device with something that gives output indistinguishable from noise (e.g. with xor_fs + some noise file) and mkfs on that encrypted volume
block ranges are mapped from the end of device
so, the first block of “data” file is a first block of the last range of free blocks on /dev/sda2
this reverse mapping is meant to reduce the risk that your data on in-free-space-created-fs get overwritten by writing to the original ext2 volume
it’s ruby but it’s fast, way faster than any hd I own
Requirements
- ruby1.8 -
sudo apt-get install ruby - dumpe2fs -
sudo apt-get install e2fsprogs - rubygems -
sudo apt-get install rubygems - rfuse_ng gem -
sudo gem install rfuse_ng --remote - narray gem -
sudo gem install narray --remote
