Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!cam-cl!bdb From: bdb@cl.cam.ac.uk (Brian Brunswick) Newsgroups: comp.sys.amiga Subject: Re: DH0: Disk Validation Error Summary: Repair IS possible Message-ID: <1809@gannet.cl.cam.ac.uk> Date: 18 Mar 90 14:23:55 GMT References: <32.25FF9483@alake.FIDONET.ORG> <1990Mar17.225353.24099@uokmax.uucp> Sender: news@cl.cam.ac.uk Reply-To: bdb@cl.cam.ac.uk (Brian Brunswick) Organization: U of Cambridge Comp Lab, UK Lines: 49 In article <1990Mar17.225353.24099@uokmax.uucp> rrmorris@uokmax.uucp (Rodney Raymond Morrison) writes: >In article Gregs@alake.FIDONET.ORG (greg sheppard) writes: >> Recently, ... Tale of misfortune >> Is it necessary to re-format the hard-drive >>at this point...is there some less drastic technique which will get me >>my disk back? > >... I had to reformat when this happened to me. >If anyone knows of a utility or how to rebuild Amigados file system bitmaps, >please leave a message as I also would like to know how to coorect this if >it ever happens again. I have several times had nasty things happen to my hard disk, but a bit of delicate work with a disk editor has always managed to resurrect it. I know this may sound daunting, but its not really that hard. First of all, you need a copy of the amigados manual for the disk layout, and a disk editor which can correct the block checksum - though I still go through the tortuous route of two little utilities I wrote which write/grab physical bits of a disk to/from a file, and write the sector onto a floppy to use an ancient version of disked to fix it. Anyway, when an amigados disk is mounted, it looks at word #78 of the root sector, (which is the precise middle of the disk - when calculating remember that highcyl is inclusive) to see if it is -1 or 0, meaning there is a bitmap on the disk or not. If not, it will try to rebuild the bitmap (5 mins of disk fiddling), using I think L:disk-validator if it can find it. First attempt to fix a disk - zero this word, rewrite block with correct checksum, and do a diskchange or other prod to try mounting. If the validation fails at some particular key (ie. sector), you will need to go down into the directory structure, and change it to remove whatever is causing validation to die. This structure is explained roughly in the amigados manual, and the directory part appears to be the same for FFS as for old file system. Each directory sector contains a table of heads of linked lists of files and directories which hash onto the same value. Use disked or some such on a file name to get it to tell you which word's list the name will have hashed into, and follow the tree down. list dirname keys will also tell you the sector that a file header is at. When just above the dying bit, zero the word to chop off all the files etc that were attached - or more ambitiously, just unlink one from the list. Then try another validate attempt. The only thing that may be irritating is trying to find out in which file a doubly used block is - this could be done on the old fs by following back pointers - now, I don't know. Brian Brunswick, bdb@uk.ac.cam.cl, bdb10@uk.ac.cam.phx. Short .sig rules!