My old hard disk died a while ago, but I was able to salvage most of the low-level data from it using dd. (In a cold environment… lots of ice and a big copper heatsink.)
I now have an image of a damaged ReiserFS filesystem that is compressed as a gzip file, and a copy as a .bz2. I would like to try running reiserfsck on this file, and possibly write up a tutorial on hard disk recovery.
The problem is that my new hard disk is the same size as the old one, and I can't afford to buy another one; the image is around 100Gb uncompressed. If I try to uncompress the file prior to using losetup to link it to /dev/loop0, then it won't fit. And while losetup does let you specify an encryption filter, a simple gzip uncompression/recompression doesn't seem to exist. I've also tried this:
sh -c 'echo "Yes"; cat oldhdd.gz' | /sbin/reiserfsck /dev/stdin
but this doesn't work because it can't seek in /dev/stdin (it's a character device, not a block device).
I problably could modify reiserfsck to use zlib and accept a regular file but I suspect there has to be an easier way.
My questions are: “How can I get this filesystem ‘into’ reiserfsck” and “How do I access a compressed file as a device, in such a way as to get at the uncompressed data”?