e2recover -- tools to help recover deleted files from ext2 file systems

Aaron Crane <aaronc@pobox.com>


Installation
============

The package uses GNU Autoconf and GNU Automake to manage the build process.
As for all such packages, simply type:

    ./configure
    make
    make install

to configure, build and install the program and its manpage.

Also try

    ./configure --help

to get usage information for the configuration program.

The package should compile on most POSIX systems.  The (minimal) support for 
large file systems (those with more than (2^31)-1 bytes) is likely to work
only if at least one of the following is true:

    * You have the libext2fs libraries and include files installed.  In
      Debian GNU/Linux, install the e2fsprogs and e2fslibs-dev packages; or
      in RedHat Linux, install the e2fsprogs and e2fsprogs-devel packages.

    * You have an loff_t type and an llseek() function which takes that
      type as the seek offset.  This is known to be true on Linux.

    * Your lseek() function takes a 64-bit off_t type.  This is known to be
      true on FreeBSD, and possibly other systems derived from 4.4BSD (such
      as NetBSD and OpenBSD).

Even if one of these applies, you may still be unable to handle large file
systems with fsgrab; I have not had the opportunity to do much testing in
this area.

If you want to build fsgrab for use on a rescue disk set for Linux
(boot/root floppies), you may not wish to have it link against libext2fs
even if it is available on the build machine.  In this case, give
`configure' the argument `--without-libext2fs' or `--with-libext2fs=no'.


e2recover
=========

e2recover is a Perl script which attempts to automate much of the process of
recovering deleted files from an ext2 file system.  It requires a working
Perl 5 installation.  Run it with a `--help' argument for usage information.
The simplest cases will be something like this:

    # dev=/dev/hda2 # or whatever
    # echo lsdel | debugfs $dev > lsdel.out
    # e2recover --guess-indirects --device=$dev lsdel.out
    <output elided>

and you can now look at the files in /tmp (or wherever your $TMPDIR
environment variable points to).

More details on e2recover (including how it works its magic, and the
situations in which it fails) can be found in the Ext2fs-Undeletion Howto
(formerly the Ext2fs-Undeletion mini-Howto) on my website:

    <URL:http://pobox.com/~aaronc/tech/e2-undel/>

or on the Linux Documentation Project website (and mirrors):

    <URL:http://sunsite.unc.edu/LDP/>.


fsgrab
======

fsgrab is a simple program which grabs chunks of data from a specified point
in a file or device.  It was originally part of the fsgrab package by the
same author, but that package is no longer maintained.

Usage: fsgrab [OPTION]... [DEVICE]

Grab blocks from DEVICE (usually a block device), or /dev/hda1 by default.
Output is sent to standard output unless an OUTPUT-FILE is given.

  -d, --device=DEVICE          read from DEVICE (default /dev/hda1)
  -b, --block-size=BLOCKSIZE   read blocks of BLOCKSIZE bytes (default 1024)
  -c, --count=COUNT            read COUNT blocks (default 1)
  -s, --skip=SKIP              seek past SKIP blocks before reading
  -m, --max-chars=MAXIMUM,
      --max-bytes=MAXIMUM      write no more than MAXIMUM bytes
  -o, --output=OUTPUT-FILE     write to OUTPUT instead of stdout
  -a, --append                 when using -o, open OUTPUT in append mode
  -f, --force                  allow writing to stdout even if it's a terminal
      --help                   display this help and exit
      --version                display version information and exit

BLOCKSIZE and MAXIMUM may have an optional multiplier suffix: w for 2, b for 512,
k for 1024, m for 1Meg.

Specifying a -d DEVICE or --device=DEVICE option prohibits specifying a device as
a non-option argument.


Copyright and Distribution rights
=================================

`e2recover', a suite of programs which assist in recovering deleted files
from ext2 file systems, is Copyright  1997, 1998, 1999 Aaron Crane
<aaronc@pobox.com>.  Portions are Copyright  1997 Free Software Foundation,
Inc.

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA, 02111-1307, USA.
