PDA

View Full Version : Kaypro 10 bad sector on HDD



Old Computers
November 24th, 2012, 09:52 AM
I booted up my Kaypro 10 to run the bad sector locator program, Findbad.

Upon running it displays

Bad Sector Lockout Program 5.4
Universal version

Then it procedes to check the disk

Today it found a bad sector. I ran it a second time, but it did not find it again. I assume that it marked that sector as bad in the file system and skipped it. I want to make sure that might not have been a glitched reading. Do any of you know if this program has command line options or if there is a way to undo any locked out sectors. My version of CP/M is 2.2F.

Thanks,
Old Computers

codeman
November 24th, 2012, 12:18 PM
There should be a file under user 15 unused.bad that will have the bad sectors in there .
Look for that file and I think ? if you delete it and rerun Findbad it should find the same one bad again .
ken

Old Computers
November 24th, 2012, 04:49 PM
I looked for that file under user 15 and couldn't find it. I also looked on the drive's other partition and could not find it in user 15 either. Other user areas did not have it as well. Is there any way that a file can be hidden in CP/M?

Maybe the program did not record that bad sector in a file.

Chuck(G)
November 24th, 2012, 05:21 PM
Regardless of the user area, the file name is "[UNUSED].BAD" . If you don't find that file anywhere, then you don't have any clusters marked bad by FINDBAD. Sometimes you can get a clue by running STAT d:*.* on a drive, where d: is your drive letter. I'm not certain if FINDBAD includes the SYS attribute on [UNUSED].BAD to make it invisible to a DIR, but if it does, STAT should show it.

Old Computers
November 24th, 2012, 05:49 PM
I ran STAT on both partitions of the drive using *.*, *.BAD, and UNUSED.*. I did not find any files with those commands. I just don't get why it would say that I have a bad sector and not record it. The program did say "bad block" not bad sector. I figure that that is the same as a sector, and even if it is different it probably would be stored in a file with the same extension.

Anyway I am glad that there is no bad sector on the disk.

Thank you for the help guys.

Chuck(G)
November 24th, 2012, 06:13 PM
There is a difference between a block and sector when it comes to CP/M. CP/M uses a multiple of sectors to form allocation blocks (STAT DSK: will tell you how big the blocks are on each drive)--something like an MS-DOS cluster. Since you can't take a single sector out of circulation, you have to take the smallest allocatable unit that contains that sector out of circulation--a block, in other words. The only way CP/M has to do this is to allocate that block to a file (DOS uses a different method, but the outcome is the same--a group of sectors are rendered unavailable for allocation.)

Old Computers
November 24th, 2012, 06:52 PM
Okay, so findbad searches for blocks and locks out blocks with bad sectors, and if I don't find that file then it did not mark any as bad?

I am familiar with CP/M but I do not know a lot of its low level operations. Thanks for the explanation.

Chuck(G)
November 24th, 2012, 07:26 PM
You've got the idea, I think.

DOS/Windows use allocation schemes that keep file names separate from allocation maps, so it's possible to mark a bad cluster in an allocation map without having a file associated with it. In CP/M, the file names (directory) and allocation map are all in one place, so it's not possible to allocate a cluster/block without naming it. It's also the reason that CP/M doesn't have sub-directories.

Old Computers
November 24th, 2012, 07:54 PM
That is a very interesting file system. I was thinking that bad sectors were treated in a way that Scandisk treats the files in DOS.

Knock on wood that my HDD does not develop any bad sectors for real in the future. The Kaypro 10 is one of my favorite computers.

leeb
November 24th, 2012, 09:34 PM
You've got the idea, I think.

DOS/Windows use allocation schemes that keep file names separate from allocation maps, so it's possible to mark a bad cluster in an allocation map without having a file associated with it. In CP/M, the file names (directory) and allocation map are all in one place, so it's not possible to allocate a cluster/block without naming it. It's also the reason that CP/M doesn't have sub-directories.

Unless, perhaps, the USER is set beyond the usual 0-15 (other than E5, of course)? STAT would only look for entries in the valid range...
Doing a DDT on the directory area (wherever it may be on this machine) might show somehing useful...

Chuck(G)
November 24th, 2012, 10:20 PM
Well, Leeb, the source code for the utility is still lurking around the web. Why not take a look at it and get back to us with a definitive answer? :)

Old Computers
November 25th, 2012, 08:28 AM
I looked up DDT in Digital Research's CP/M manual that I found. It appears to only work with programs running in RAM, unless I missed something because I just glanced at the entry instead of reading it in depth. I'd try it, but not knowing how to use it, I don't want to end up corrupting the directory area of the drive.

Does stat display information about the entire volume or just the current user area?

If this should be in a new thread I can make a new thread. I tried to access the floppy drive on the Kaypro, and it gives me a drive access error. I forget the exact error message. Do you think that this would be a controller related problem or a drive related problem? If I remember correctly, the drive light lights up and stays lit upon drive access, but it does not seek. While I am thinking of it I want to get this to work so I can back up the hard drive.

Old Computers
November 28th, 2012, 01:19 PM
I went back and examined the disk again. I did not find anything going through each user area with STAT, and FINDBAD did not find anything at all on the A or B partition. I think that it must have been some sort of glitch.

Thanks for your help everyone.