[comp.sys.amiga] Not a DOS disk

nw@palladium.UUCP (Neil Webber) (09/07/87)

A word of wisdom/superstition from someone who has just finished restoring
his hard disk (40MB) from a zillion backup floppies for the THIRD time: when
partitioning a hard disk be sure you put "2" in the "reserved" sectors field
of your mountlist for EVERY partition.

The manual that came from my hard disk manufacturer says otherwise.
Right there in the procedure for partitioning a hard disk they show an
example mountlist file with zero reserved sectors for all but the very
first partition.

Now, I haven't disassembled the AmigaDOS binary (yet), but some painful
experimentation has given me the strong feeling that checking for 'DOS\0'
at the beginning of the first sector of any partition is an important part
of AmigaDOS's file system acceptance criteria.  Anyone in the know wish
to elaborate?

While I'm at it, can non-developers get DiskEd?  I found a copy of DiskEd
on some BBS somewhere (don't know if it was legit), but it appears to be the
old version that doesn't grok hard disks.  It would have come in handy; I
had to roll my own instead.

Also, Commodore: you might consider teaching DiskDoctor to patch up the
first sector (assuming that I'm correct about this).  I can see how it
might get kind of messy but it's pretty important.

Oh yeah -- many thanks to Dave Haynie: without DiskSalv like itself would
be impossible.
-- 
Neil Webber / Palladium Data Systems / (No longer confused with Jordan Marsh)
               Marlboro MA, 01752  {linus!alliant, harvard!cfisun}!palladium!nw




-- 
Neil Webber / Palladium Data Systems / (No longer confused with Jordan Marsh)
               Marlboro MA, 01752  {linus!alliant, harvard!cfisun}!palladium!nw

carlos@io.UUCP (Carlos Smith) (09/09/87)

In article <355@palladium.UUCP> nw@palladium.UUCP (Neil Webber) writes:
>
>While I'm at it, can non-developers get DiskEd?  I found a copy of DiskEd
>on some BBS somewhere (don't know if it was legit), but it appears to be the
>old version that doesn't grok hard disks.  It would have come in handy; I
>had to roll my own instead.
>
>Neil Webber / Palladium Data Systems / (No longer confused with Jordan Marsh)
>               Marlboro MA, 01752  {linus!alliant, harvard!cfisun}!palladium!nw

If you can't find DiskEd, cheer up. There is a disk editor called "Sectorama"
written by the guy who wrote Faery Tale adventure that has just been released
to the public domain. It works with hard disks, and is MUCH nicer than DiskEd.
It has a display window of the current sector, and will follow hash tables
etc. automatically. I know it is available on BIX, hopefully Mr. Fish will
get a copy on his next series of disks.

By the way, I have had my own troubles with AmigaDos and hard disks (garbaged
directories), that seemed simple but still were beyond Diskdoctor. 

What I want to know is - Is Commodore going to release a fsck type utility
for hard disks? They had better - I expect most A2000 customers will have
hard disks, and none of the disk fixing programs I have seen are even smart
enough to handle a simple case where a file is deleted, but the directory
thinks it is still there. This is pretty basic. I'm surprised the validator
doesn't handle stuff of this type, much less that there is no OS utility to
do it.

-- 
			Carlos Smith
			uucp:...!harvard!umb!ileaf!carlos
			Bix:	carlosmith

daveh@cbmvax.UUCP (Dave Haynie) (09/10/87)

in article <373@io.UUCP>, carlos@io.UUCP (Carlos Smith) says:

> What I want to know is - Is Commodore going to release a fsck type utility
> for hard disks? They had better - I expect most A2000 customers will have
> hard disks, and none of the disk fixing programs I have seen are even smart
> enough to handle a simple case where a file is deleted, but the directory
> thinks it is still there. This is pretty basic. I'm surprised the validator
> doesn't handle stuff of this type, much less that there is no OS utility to
> do it.

File is deleted but directory still thinks its there?  Really?  How so?  As
far as I've ever been able to determine, the definition of a deleted file is
a file that's been removed from the hash table of its directory.  So if the
file still shows up in the directory, it hasn't been deleted.  If for some
reason its data blocks have been marked as "free" in the BAM, that could be
very unfortunate (though the validator would find this if it kicked in at
the time).  It sounds like you want the DOS to specifically tag a deleted 
block as being deleted instead of just being de-linked from it's parent.

> 			Carlos Smith
-- 
Dave Haynie     Commodore-Amiga    Usenet: {ihnp4|caip|rutgers}!cbmvax!daveh
"The A2000 Guy"                    PLINK : D-DAVE H             BIX   : hazy
     "God, I wish I was sailing again"	-Jimmy Buffett

carlos@io.UUCP (Carlos Smith) (09/11/87)

In article <2310@cbmvax.UUCP> daveh@cbmvax.UUCP (Dave Haynie) writes:
>in article <373@io.UUCP>, carlos@io.UUCP (Carlos Smith) says:
>
>> What I want to know is - Is Commodore going to release a fsck type utility
>> for hard disks? They had better - I expect most A2000 customers will have
>> hard disks, and none of the disk fixing programs I have seen are even smart
>> enough to handle a simple case where a file is deleted, but the directory
>> thinks it is still there. This is pretty basic. I'm surprised the validator
>> doesn't handle stuff of this type, much less that there is no OS utility to
>> do it.
>
>File is deleted but directory still thinks its there?  Really?  How so?  As
>far as I've ever been able to determine, the definition of a deleted file is
>a file that's been removed from the hash table of its directory.  So if the
>file still shows up in the directory, it hasn't been deleted.  If for some
>reason its data blocks have been marked as "free" in the BAM, that could be
>very unfortunate (though the validator would find this if it kicked in at
>the time).  It sounds like you want the DOS to specifically tag a deleted 
>block as being deleted instead of just being de-linked from it's parent.
>
>> 			Carlos Smith
>-- 
>Dave Haynie     Commodore-Amiga    Usenet: {ihnp4|caip|rutgers}!cbmvax!daveh

Welll, all I know is what the machine told me. I had a drawer that I attempted
to discard with the workbench (on my hard disk, unfortunately). The operation
failed with an "error 205, object not found". It wouldn't delete the directory
because it wasn't empty, and the only thing listed in the directory was a file
that it complained it couldn't find. I tried a simple 'C' program to unlink
the file directly, it also failed because it couldn't find the file listed
in the directory. The validator never seemed to be invoked, or to find it if 
it was. I wasn't up to writing a disk editor at the time, so eventually I 
tried diskdoctor on it (I had heard a rumor that it worked on hard disks) 
after selectively backing up all the other directories. It just trashed the
disk, and THAT invoked the validator. IT recommended diskdoctor, and after a
couple of cycles of this I reformatted. Interestingly, one thing the 
diskdoctor did was resurrect a whole bunch of files that HAD been deleted, 
and left them at the root. Now that I have Sectorama, I would poke around 
with that. In fact, I can't wait for it to happen again. Just let me at those
BAMs (whats a BAM?). I'll show it... No, not really, just kidding, honest.

So anyway, I hope this clarifies a situation that such a utility should deal
with. The directory still had the file listed as existing, but somehow when
it went to look it up the blocks were already deallocated?

I am posting this instead of replying by mail because there may be others 
interested in file system error recovery. Thanks for the reply, Dave. By the
way Sectorama (by David Joiner) IS on a Fish disk, number 102. This is 
something you will be glad to have if a disk bites it, provided you are up to
reading about what all those pointers and hash tables really mean (sorry, this
is new to me, I try to stick to graphics). But using this utility and with the
AmigaDos file system manual at hand you might be able to patch things up.
-- 
			Carlos Smith
			uucp:...!harvard!umb!ileaf!carlos
			Bix:	carlosmith

jdow@gryphon.CTS.COM (Joanne Dow) (09/11/87)

In article <373@io.UUCP> carlos@zapp.UUCP (Carlos Smith) writes:
>
>If you can't find DiskEd, cheer up. There is a disk editor called "Sectorama"
>written by the guy who wrote Faery Tale adventure that has just been released
>to the public domain. It works with hard disks, and is MUCH nicer than DiskEd.
>It has a display window of the current sector, and will follow hash tables
>etc. automatically. I know it is available on BIX, hopefully Mr. Fish will
>get a copy on his next series of disks.

Er no sooner does Fred Fish get Sectorama onto one of his disks than David
declares he's releasing a new version. I am not sure when he'll post it; but,
as bix is his only net access you can probably bank on it being there first.
He says he found some bugs in the way it handles partitioned disks.


-- 
<@_@>
	BIX:jdow
	INTERNET:jdow@gryphon.CTS.COM
	UUCP:{akgua, hplabs!hp-sdd, sdcsvax, ihnp4, nosc}!crash!gryphon!jdow

Remember - A bird in the hand often leaves a sticky deposit. Perhaps it was
better you left it in the bush with the other one.

jesup@mizar.steinmetz (Randell Jesup) (09/12/87)

In article <376@io.UUCP> carlos@zapp.UUCP (Carlos Smith) writes:
>Welll, all I know is what the machine told me. I had a drawer that I attempted
>to discard with the workbench (on my hard disk, unfortunately). The operation
>failed with an "error 205, object not found". It wouldn't delete the directory
>because it wasn't empty, and the only thing listed in the directory was a file
>that it complained it couldn't find. I tried a simple 'C' program to unlink
>the file directly, it also failed because it couldn't find the file listed
>in the directory.

Aha!  What you had was a xxxxx.info (xxxx is the name displayed) file (an
icon) with no associated file.  When you tell it to delete it, it can't find
the regular file (it doesn't exist).  When you tell it to delete the directory,
the icon (.info file) still exists, so it can't delete the dir.  To get
rid of the hanging .info file, from CLI type 'delete xxxx.info' (from the
right directory.)  Your C program failed for the same reason.   To see all
this, go to the directory and do a 'list'.  You'll see xxx.info but no xxx.

	Randell Jesup  (Please use one of these paths for mail)
	jesup@steinmetz.UUCP (uunet!steinmetz!jesup)
	jesup@ge-crd.ARPA

richard@gryphon.UUCP (09/12/87)

In article <376@io.UUCP> carlos@zapp.UUCP (Carlos Smith) writes:

>Welll, all I know is what the machine told me. I had a drawer that I attempted
>to discard with the workbench (on my hard disk, unfortunately). The operation
>failed with an "error 205, object not found". It wouldn't delete the directory
>because it wasn't empty, and the only thing listed in the directory was a file
>that it complained it couldn't find.

This happened to me too.

> I tried a simple 'C' program to unlink
>the file directly, it also failed because it couldn't find the file listed
>in the directory. The validator never seemed to be invoked, or to find it if 
>it was. I wasn't up to writing a disk editor at the time, so eventually I 
>tried diskdoctor on it (I had heard a rumor that it worked on hard disks) 
>after selectively backing up all the other directories. It just trashed the
>disk, and THAT invoked the validator. IT recommended diskdoctor, and after a
>couple of cycles of this I reformatted. Interestingly, one thing the 
>diskdoctor did was resurrect a whole bunch of files that HAD been deleted, 
>and left them at the root. Now that I have Sectorama, I would poke around 
>with that. In fact, I can't wait for it to happen again. Just let me at those
>BAMs (whats a BAM?). I'll show it... No, not really, just kidding, honest.

It happened to me on  floppy. First I noticed I have two files with the
same name. (These were files created by the Manx linker, and then copied
from ram: to df0:)

I I try to delete the offending file (On some systems I've used
you just do two deletes and no problem) and than try to delete
the remaining file. Can't do it. File not found. So I ignore
it and keep on working. Next time I write to df0: from ram:
I get a requestor saying "Disk Corrupt - Use diskdoctor".

I can't find diskdoctor.

So I reboot, and just try to get the one file off there
I care about. I insert the disk into the drive and do a cd df0:.
Ok. I type 'dir', it prints 5 filenames and puts up a "software
error" requestor, which, no matter what you do, then guru's.

Same thing happens if you try to just copy a file off the disk.

Is this friendly ?  Telling me 'bad directory - disk unusable'
would be one thing. Guruing seems a litle drastic.

Naturally, DiskSalv recovered it; Sagans of thanks, Dave,
I didnt have a recent backup. Come to think of it I didnt
have an old backup either :-)
)
>			Carlos Smith
-- 
Richard J. Sexton
INTERNET:     richard@gryphon.CTS.COM
UUCP:         {hplabs!hp-sdd, sdcsvax, ihnp4, nosc}!crash!gryphon!richard

"It's too dark to put the key in my ignition..."

carlos@io.UUCP (Carlos Smith) (09/15/87)

In article <7325@steinmetz.steinmetz.UUCP> jesup@mizar.steinmetz.UUCP (Randell Jesup) writes:
.In article <376@io.UUCP. carlos@zapp.UUCP> (Carlos Smith) writes:
..	[describes not being able to delete a directory because a file
..	 exists, but go to delete file and "error 205 - file not found"]

.Aha!  What you had was a xxxxx.info (xxxx is the name displayed) file (an
.icon) with no associated file.  When you tell it to delete it, it can't find
.the regular file (it doesn't exist).  When you tell it to delete the directory,
.the icon (.info file) still exists, so it can't delete the dir.  To get
.rid of the hanging .info file, from CLI type 'delete xxxx.info' (from the
.right directory.)  Your C program failed for the same reason.   To see all
.this, go to the directory and do a 'list'.  You'll see xxx.info but no xxx.
.
.	Randell Jesup  (Please use one of these paths for mail)
.	jesup@steinmetz.UUCP (uunet!steinmetz!jesup)
.	jesup@ge-crd.ARPA

I appreciate the comment, and I could see where this could happen and cause
great confusion. However, in my case the directory was empty, there were NO
other files around except (or not even?!?) the file the directory thought was
there but wasn't (or wasn't there, but was, or was it wasn't was it?).

-- 
			Carlos Smith
			uucp:...!harvard!umb!ileaf!carlos
			Bix:	carlosmith