• Please review our updated Terms and Rules here

HDD Error Maps - BFI

pearce_jj

Veteran Member
Joined
May 14, 2010
Messages
2,808
Location
UK
Hi, I have an ST251-1 with it's stickered error map is in the usual way, cyl, hd, bfi (bits from index).

I realise working out the error map properly isn't going to be possible with just an old PC, however the disk has some bad sectors when formatted now (about 20K worth) which I'd like to mask out.

I've written a very simple Int13h-based tester to try and identify them - planned process is:

1. Low-level format with 1:1 interleave and no error map entered
2. Run the utility with write (0xAA) then read tests, which should list errors in C:H:S format
3. Somehow convert the sector numbers to a suitable BFI for the LLF utility

The controller BIOS uses alternate tracks; with three defects entered it listed 6 alternate tracks used and disk size reduced accordingly, but there were still some bad sectors when formatted in DOS, hence my little project.

Converting sector to BFI is where I'm struggling; but if the controller is just allocating an entire track from elsewhere, maybe it doesn't matter? From the specs it looks that there is about 20% recording overhead, so maybe sector-to-BFI could be something like (sector - 0.5) * 512 * 1.2??

Many thanks!!
 
You're not going to be exact, but you can get a rough estimate.

An MFM ST506 hard disk transfers data at about 5M/bits sec and spins at 3600 RPM (60 rev/sec.), so there are about 83,333 raw bits on a track. Since there are 17 sectors on a track, each sector occupies (approximately) 4,902 bits.

But you're not done yet, since there's the interleave to take into account. So take the bit offset, find the sector and then de-interleave that sector and you have your answer.

Note that if an error occurs in a gap, it may not register at all on a sector-by-sector verify. In that case, the flaw doesn't matter.
 
Yes, it's the Seagate ST11M with BIOS v1.7.

Thinking about it, this won't work as once the drive is LLF'ed, it will still have at least some alternate tracks in use.

I suppose this could only work by clearing the drive error map from the BIOS utility, then hoping that the controller will support function 05h (format track).

Chuck, many thanks for the calculation - confirms that it's about 20% overhead. To get around the interleave complication I was going to reformat the drive 1:1.
 
I'm with Modem7 on this one:

I always assumed that the LLF mapped out an entire track when it finds (or you define) an error, so the BFI or even the sector wouldn't matter; can your controller/BIOS map out an individual sector?

Aside from the fun of rolling your own, why not just use one of the various tools like hTest, Spinrite, etc.?
 
The ST11M/11R BIOS format utility does ask for the BFI of each bad sector, but when I don't know it (such as when using a non-Seagate drive which doesn't list it on the error map), I just enter 0, and it has always worked fine. After all, both the low-level format and DOS format scan for errors as they go, so all the bad sectors will eventually be caught and marked off anyway.
 
I'm with Modem7 on this one:
I wasn't saying that they don't exist. I just hadn't seen one.

(such as when using a non-Seagate drive which doesn't list it on the error map),
I can understand why. I can just hear the Seagate programmers saying, "We calculate BFI from the start of the index pulse. Some other manuafacturers might be calculating it from the end of the pulse, and could be factoring in other things that we don't. There's no international standard on BFI, and so let's only enable BFI input when Seagate BFI marked drives are indicated to be connected."
 
Thanks for the replies! I read the bit about when it's not on the map, to mean when the BFI wasn't given on the drive sticker, rather than the controller BIOS enabling the input only if a Seagate drive were detected.

So anyway, if I can identify the cylinder & head then I should be good to update the stickered error map (maybe, with a new sticker) and then re-format with all of it entered.

What I need then is a controller that won't reallocate or do any such jiggery-pokery..., I'm wondering if the controller in the Amstrad PC2286 might do the job, as I don't recall any option to enter error maps in that.
 
So anyway, if I can identify the cylinder & head then I should be good to update the stickered error map (maybe, with a new sticker) and then re-format with all of it entered.
The disadvantage of catering for all defects at the low level is that you lose a track at a time. So if a track has only one little defective area, you lose access to the whole track. On these old deteriorated MFM/RLL drives we still use these days, that can add up to a lot of tracks.

What you could do instead, is try a LLF, specifying only the defect tracks on the sticker, and let DOS handle the other defects (defects that have appeared after manufacture). With those, you'll only be losing a cluster (bad cluster) at a time. FORMAT will mark as bad the 'hard error' (every read results in an error) clusters, and something like Norton Disk Doctor (NDD) should detect and then mark as bad any 'marginal error' clusters (although NDD's threshold of 'marginal' is too high in my opinion).
 
Thanks, yes it's a fair point. I just find all this stuff interesting TBH, filling in the gaps in my knowledge dating back to when this stuff was new.

Agree on NDD, personally I want sectors masked out if there is so much as one retry involved with reading them on disks this small.

Out of interest, anyone know (or care to guess!) how the ST11M is keeping track of this bad error map? Seems to me that the controller is performing some address translation in hiding the bad tracks, so I guess it must be storing this map on the disk itself.
 
I wasn't saying that they don't exist. I just hadn't seen one.
I was agreeing that I hadn't seen a controller LLF program that asked for a smaller unit of granularity than an entire track either, at least in the PC world; then again, I don't think I ever used Seagate controllers, just WD, DTK and Opti.

On the other hand it's still not clear whether this one actually uses that information, i.e. if it can map out less than an entire track the way other utilities including (as you point out) DOS's FORMAT can.

Reading the ST11's manual does seem to confirm that it stores the alternate track info on the drive and presumably remaps tracks accordingly at a low level when it finds it on a drive.
 
What you could do instead, is try a LLF, specifying only the defect tracks on the sticker, and let DOS handle the other defects (defects that have appeared after manufacture). With those, you'll only be losing a cluster (bad cluster) at a time. FORMAT will mark as bad the 'hard error' (every read results in an error) clusters, and something like Norton Disk Doctor (NDD) should detect and then mark as bad any 'marginal error' clusters (although NDD's threshold of 'marginal' is too high in my opinion).

This is exactly what I was going to suggest, with two exceptions: First, don't use 1:1 interleave on any MFM or RLL disk, the controller/bus/system/etc. you connect it to won't be nearly fast enough to handle that. I would either find it by testing (spinrite/calibrat) or just set it to 6:1 which is safe. Secondly, I would use spinrite to find and map out the bad blocks. Spinrite is mostly useless on IDE drives, and dangerous to run if you're attempting recovery, however for finding the defects on a newly-formatted MFM/RLL drive before you use it, it shines.
 
I have a couple of things to add. First is that the BFI errors cited by the manufacturer often don't show in a LLF. That can be due to one or two reasons. The first is that they fall in the inter-sector/ID-to-data gaps. Since the gap serves mostly as run-ups to the AMs and " slop" for the write splice at the end of sector, errors there don't matter. The other explanation is that some of these turn out to be " soft" errors; that is, they exhibit problems only for certain recording patterns. Ultimately, you stand a chance of running into these.

However, you're clearly not using this stuff for production/sustenance work, so it may not matter. In the old days, I'd spare the whole track if the manufacturer said there was an error on it. It just wasn't worth the uncertainty--surface flaws have a regrettable tendency to "spread" on a track, no matter how many times you run Spinwrite over them.
 
Thanks for all the info and ideas on this - it's very much appreciated.

Really the underlying idea here is to generate a new error map for the 25-year-old drive, just as an exercise in it's own right. Being able format it in DOS with no bad sectors is really the goal, that is even if the disk survives the diagnostic runs.

So far the error map per LLF uses six tracks and there remain 20KB of bad sectors after that, maybe another 10 tracks worse case. If I can pick them out correctly, that is :)

Thanks!
 
don't use 1:1 interleave on any MFM or RLL disk, the controller/bus/system/etc. you connect it to won't be nearly fast enough to handle that. I would either find it by testing (spinrite/calibrat) or just set it to 6:1 which is safe.
The Seagate ST11M/R controllers will automatically suggest the optimum interleave to use when you perform a low-level format. In a standard PC/XT/clone it will almost always recommend 4:1 interleave, which I believe is as fast as it can go.
 
Really the underlying idea here is to generate a new error map for the 25-year-old drive, just as an exercise in it's own right. Being able format it in DOS with no bad sectors is really the goal, that is even if the disk survives the diagnostic runs.
Since you want to do things at the low level, and since BFI is now out of the equation, you could try the media analysis functionality in SpeedStor.
Well, I think it's called "media analysis". All my old PCs are on holiday presently and so I can't fire one up to see.
"Media analysis" will do exhausive read/write tests at the low level using varying data patterns.
At the end of the process, you will see a list of defective tracks that SpeedStor discovered.
"Media analysis" is data destructive.

SpeedStor is available at http://www.minuszerodegrees.net/software/speedstor.htm
 
Quick update on this.

I let SpeedStor run through with 0xAAAA pattern (one pass given the age of the thing) and results were good!, in as much 18 defects were found. One seemed to matched the label except that it was two cylinders lower (label cyl.596 hd.4, SpeedStor found cyl.594 hd.4). In SpeedStor the drive has 818 cylinders (vs 820 per the spec sheet). So I wondered if the ST-11R controller hides the first two cylinders for it's own use?

So re-LLF'd with the newly found error map (accounting for the +2), then format in DOS, bad sectors reduced from 24KB to 12KB. So progress, but I'm not done yet. Maybe that 2 cylinder thing is a red-herring.
 
except that it was two cylinders lower (label cyl.596 hd.4, SpeedStor found cyl.594 hd.4). In SpeedStor the drive has 818 cylinders (vs 820 per the spec sheet). So I wondered if the ST-11R controller hides the first two cylinders for it's own use?

Or, is this related to "engineering cylinders"?

bad sectors reduced from 24KB to 12KB. So progress, but I'm not done yet.

Is your goal to detect and map out bad sectors, or to try to get as much of the drive "back" as possible? Generally, if something is listed on the defect list, you should map it out and never use it -- the equipment that detected those errors at the factory are more sensitive than consumer equipment and if it's on the defect list, it is probably for a good reason.

I enjoy maintaining MFM and RLL drives with spinrite, but I never set it to "reclaim clusters" mode -- if it was bad at one point, it should probably stay bad.
 
Back
Top