Subject: Re: panic: bad dir
To: Ruibiao Qiu <ruibiao@arl.wustl.edu>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/11/2001 14:09:08
> I just messed up my root disk when adding an external SCSI disk.

> root on sd1a dump on sd1b
> /: bad dir ino 14 at offset 0: mangled entry
> panic: bad dir

> Is there any quick way to fix this problem without replacing hard
> drive physically?

In theory, you could probably fix it from ddb.  But if you had enough
of ffs and the kernel in your head for that to be feasible, you
wouldn't have to ask. :-/

About all I can suggest is to boot from another disk and try to patch
the filesystem up.  If necessary, take the disk to another machine and
do it there.  "Patch up" here can mean a variety of things; personally,
I'd start with fsck -n, see what it thinks is trashed, then start
dumping inode contents to see if I could make any intelligent guesses
about what needs to be patched.  Unless you have the tools and
knowledge to do that, you may have to just fsck it and then look to see
if the damage done was severe enough to render it unusable....

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B