[comp.sys.amiga] WB2.0 Disk checksum error

mark@tc.fluke.COM (Mark D. Nagel) (12/02/90)

I tried to unpack some files using 'zoo' (from FFD #164) and ran into a checksum
problem. Now, my HD partition is non-writable. 'info' gives (relevant info only)
the following:

Size	Used	Free	Full	Errs	Status		Name
------	------	-----	----	----	--------------	----------
41M	85649	  1	99%	 0	Validating	Work:

System: A3000
WB:	2.0 (Kickstart 36.143 WB ver 34.28)
HD:	50M

What is the best-easiest way of resolving this problem? 

Thanks in advance.

-- 
-------------------------------------------------------------------------------
		Is it IBM compatiable? NO - ARE YOU?
 - FUSION - FUSION - FUSION -FUSION -FUSION -FUSION -FUSION -FUSION -FUSION -
    Domain: mark@tc.fluke.COM (Mark Nagel) Voice: +1 206 356 5098
      UUCP: microsoft!fluke!mark or sun!fluke!mark
     Snail: John Fluke Mfg. Co. / P.O. Box C9090 / Everett WA  98206
-------------------------------------------------------------------------------

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (12/03/90)

In <1990Dec1.223216.13774@tc.fluke.COM>, mark@tc.fluke.COM (Mark D. Nagel) writes:
>I tried to unpack some files using 'zoo' (from FFD #164) and ran into a checksum
>problem. Now, my HD partition is non-writable. 'info' gives (relevant info only)
>the following:
>
>Size	Used	Free	Full	Errs	Status		Name
>------	------	-----	----	----	--------------	----------
>41M	85649	  1	99%	 0	Validating	Work:
>
>System: A3000
>WB:	2.0 (Kickstart 36.143 WB ver 34.28)
>HD:	50M
>
>What is the best-easiest way of resolving this problem? 

-------- included message ----------

Sectorama, DiskX, or Dedit is the easiest way to recover from this problem, but
unfortunately it requires fairly complete knowledge of the way a disk directory
works. Here is a tutorial posted some time ago for using Sectorama to recover
from problems.

Date: 10 Aug 88 16:11:41 GMT
Subject: Re: Help! my hard disk won't validate
From: page@swan.ulowell.edu (Bob Page)

hoge%afsc02.decnet@hqafsc-vax.arpa (AFSC02::HOGE) wrote:
>We'll now I've got a bad file on the drive and it won't validate.

Don't use DiskDoctor, I don't think it yet knows about the fast file
system.  In any case, it's not too smart and takes too much memory
(like 2MB to deal with a 20MB hard disk).

The best way to do fix your drive is to back up the disk and restore
it.  Failing that, here is the canonical method for using Sectorama to
delete a file.  This works with both old and fast file systems.

0. Get Sectorama, on fish disk 102, or via ftp on swan.ulowell.edu in
amiga/dos/fs/sectorama.1of1 (you'll need to uudecode it).  You need to
have the topaz11 font (delivered with WB1.2) in your fonts: directory.

1. Type 'sec dh0:' (or whatever the device name is of your partition).
You should see the Root block of the partition.

2. Type right-amiga h to hash a file.  In the string requester (which
you have to click on) type the name of the directory closest to the
root that holds the file, file and hit return.  (for example, if your
file was in dh0:work/book/chapter1/sec4, type 'work' without the
quotes.)  The case is important!  The highlighted part of the screen
should move to a place on the screen.  If the numbers are '00000000'
you did something wrong, try it again.

3. Type 'j' to jump to that disk block.  If the name of the directory
(look at the top of the screen) is not right, type 'h' to follow the
hash chain until you get the right name.  If you hit the end of the
chain and didn't find the directory, you messed up somehow.  Type 'r'
(go to Root block) and start over at #2.

4. Follow the directions in #2-3, continuing down the directory path,
one level at a time until you are in the directory ABOVE where the bad
file is.  Write down this block number.  It's in hex; you may need to
convert it to decimal later.

5. Now use #2 to find the start of the file (also called the file header).
If you have to type 'h' to follow a hash chain, write down each block
number you visit.  Here are three possibilities you have:

         example 1            example 2                example 3

  chapter1                    chapter1           chapter1
     |                           |                  |
     |                           |                  |
     V                           V                  V
    foo --> bar --> sec1.1     sec1.1              foo --> sec1.1 --> bar
    (end of hash chain)       (no hash chain)      (middle of hash chain)

6. You should now be at the file header block.  Look in the 'Next Hash
Block' field.  If there's a non-zero number there, there are blocks in
the hash chain after your block (example 3); write this number down.
If the number is zero and you didn't follow a hash chain to get to the
file header block, we're looking at example 2.  Otherwise we're using
example 1.

7. Now go back to the LAST block you wrote down (not the 'hash' value
you wrote down in step 6) (click the mouse pointer in the top left of
the screen, where it tells you what the block number is, then type the
number of the block in decimal).
	7.1 If you're now looking at a directory block (example 2 or 3):
hash the filename (right-amiga h) once again, but don't 'j' there.
	7.2 If you're looking at a file header block (example 1 or 3):
find (by inspection) the 'next hash chain block' somewhere in the
'playing field' on the left (not the info on the right).  It's near
the bottom of the screen.  Click there but don't 'j' there.

Edit the highlighted field and write in the hex block number
you wrote down in step 6, even if it was all zeros.

8. Now type 'k' to update the block's checksum, then 'U' to Update the
block on disk (it must be upper case).  You can write to the disk even
though DOS can't because Sectorama is talking to the device driver,
not to the DOS file system.  I always type 'U' twice, just to make sure.

9. Exit sectorama (use the menu option), then type:
	DiskChange dh0:
(this assumes you have DiskChange around someplace, it comes with
WB1.2) to start the re-validation.  Commodore utilities assume all
disk devices will support the trackdisk.device non-standard commands
(but not the extended commands) although this has never been
documented anyplace.  Let's hope your driver supports them.  After a
while your disk should complete validation.  If it doesn't, you either
did something wrong or there are more problems that you didn't fix.

DISCLAIMER: This isn't a primer on the file system (you'll have to
wait for my book :-)), and doesn't tell you what you're doing, just
how to do it.  All this does is help you locate a file and unlink it
from its parent directory, effectively deleting it.  I typed this from
memory; I don't have an Amiga handy, so use this information at your
own risk.  I'd be interested in any comments you have.

..Bob
--
Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
"What a wonder is USENET; such wholesale production of conjecture from
such a trifling investment in fact."	-- Carl S. Gutekunst

--------- end of included message ------------

ps: Don't try to contact Bob at the above address. He is no longer there.

-larry

--
The only things to survive a nuclear war will be cockroaches and IBM PCs.
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+