Chuck Swiger cswiger at
Sat May 10 11:25:12 PDT 2003

Paul English wrote:
[ ... ]
> 	It wants to have fsck run - if I do that with fsck -y it will
> clean the filesystem, and mount, but *everything* (all 15GB) is in
> lost+found.

fsck should be able to salvage some of the existing directory structure 
under /lost+found; are you getting a single directory full of 
inode-#-named files without any subdirectories?

 > If I just restore the superblock with fsck, and don't do
> anything else, then I can mount the filesystem readonly, but then when I
> mount it there is nothing there:
> #ls /mnt
> ls: /mnt: Bad file descriptor

What happened to the original disk?  This sounds like the / directory 
got wiped, along with the first superblock...was the disk partially erased?

> What else can I try? Pulling 15GB of data from lost+found is pretty
> impractical.

What are you trying to accomplish?

What you might want to do depends on whether you want to simply identify 
your files from OS files (timestamps, if still meaningful could help 
here), how important recovering the directory structure is, etc.

If you knew that the first XXX MB of the disk had been wiped, you might 
try installing the same version of FreeBSD you were running to a new 
filesystem of the same size and layout-- be sure to specify a 8K/1K 
block/frag size versus 16K/2K if that's what you had.  And then copy 
that chunk of data over the zero'd portion of your recovered data, and 
see whether that helps.

Or you could then perform an md5 hash of every file found on a clean 
install, and md5 all of the recovered files under /lost+found, and only 
pay attention to recovered files which don't have a checksum that matches.


PS: Given the state of employment in the tech industry, you might find 
that offering, say, a 6-month subscription to a "beer of the month club" 
to the person who helps you out the most would have astonishing results.

If also happened to know that modern beer and ales originated with the 
Trappist abbey monks who brewed beer to serve as a meal during Lent, a 
modification of .sig's with comments like "will hack for food" to "will 
admin for beer" makes perfect sense.  Beer is good food.  :-)

More information about the freebsd-questions mailing list