---


1.0 What is ext2KIT v1.10?

   ext2KIT was created out of need.  During a linux-kernel upgrade sometime
   in 1994, our main file-server disk crashed.  Although most of the data
   was properly backed'up, several individuals performing developement did
   not follow the rules, and their data/work was completely lost.  We
   needed a way to get to the disk (with intense fs internals) and recover
   the data.  We found that there were bad sectors, bad inodes, missing
   directory links, and missing data links.  The result of effort was
   ext2KIT and is now yours to fool with as well.  It has been said that
   ext2-partitions do sometimes flake out, although rarely.  It is
   precisely only at those times you will find a great need for ext2KIT.

   We used lilo and made the first disk partition DOS bootable, and all
   the others were linux-fs-ext2.  So, from the DOS booted environment, we
   used ext2KIT to access the ext2-fs and recover as much as possible.  We
   then moved the data onto another machine (with a similiar configuration)
   with a booted linux and then copied the data from the DOS side. We did
   successfully and pain-stakingly recover about 90% of the lost data.

   For ext2KIT to useful to you, you need to 1) have a DOS bootable
   partition, 2) you need to have ext2KIT, and ext2DIR executables built
   for the DOS side with the go32 loaders, 3) have a ext2RST executable
   built for the linux-side, and 4) read the manuals on each of the
   programs.  You probably need to know a little bit about the ext2-fs,
   as well.  The 'Theory of operation' section discusses some of what
   you need to know.


2.0 Installation Notes

   Two (2) makefiles are provided.  One for linux-gnu compiler and one for
   DJGPP-gnu compiler (go32).  Of couse, cross compiles are supported.  The 
   system should port to any compiler environment without much trouble.  See
   Poring Notes below.  The following steps are necessary for rebuilding.

   1- unload tar/zipped file:
            tar xzvf extkit.tgz
      using gnu tar is the easiest with the z option.

   2- sit in the top level directory and:
            make -f Makefile.<os>
      where <os> is either linux or go32.

   3- the .../bin directory contains the executables.

   4- can use:
            make -f Makefile.<os> clean
      to tidy up your disk storage.


3.0 Theory of operation

   Three programs are provided ext2kit, ext2rst, ext2dir.  The ext2KIT
   program is the primary tools for exploring and saving you linux-ext2-fs.
   The ext2RST program restores the data saved by using the former program.
   The ext2DIR program searches the linux-ext2-fs for missing directory
   links and resolves them for you.

   Read the 'ext2kit.doc' describing the basic script language processor
   features that ext2KIT provides.  It is an advanced language processor;
   but, you gotto follow the rules; which are pretty simple.  There are
   some general example script files provided, as well, as fs-manipulating
   samples.

   A little bit about 'EXT2' file system.  A disk is made of physical
   'blocks' and logical 'inodes'.  There is a 'superblock' which contains
   system-level descriptions about the disks' construction.  The content
   of an inode represents a logical disk-entity (like a file,
   directory, device, etc...).  Each inode has a list of blocks which
   point to (or contain) the data-content of the disk-entity.  Clusters
   of inodes are 'group'ed to allow the FS/OS to manage chunks/bulks of
   inodes.  There are free-lists for blocks and inodes; and various
   integrity management techniques inherent disk-data manipulation.

   The superblock is usually located at block #1.
   The root directory of the disk is usually located at inode #2.
            

4.0 Porting Notes

   The major porting problem boils down to the 'diskio.cc' include file.
   Disk I/O for DOS and linux needs support.  If you are trying to
   port to other linux'es (Alpha, Sun,...), you have to make sure that
   'long long' for the read/write is supported by you OS/compiler
   environment.


5.0 Support & FAQs

   Contact sekhar@alphaxsys.com for Q's and support.


---

