PDA

View Full Version : HDD Error Maps - BFI



pearce_jj
December 5th, 2011, 01:21 PM
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 (http://vintage-blog.peacon.co.uk/wiki/Seagate_ST-251) 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!!

modem7
December 5th, 2011, 09:34 PM
3. Somehow convert the sector numbers to a suitable BFI for the LLF utility
In the PC world, all LLF functionality that I've seen only accepts defects as CYLINDER/HEAD.
Have you found something that accepts CYLINDER/HEAD/BFI ?

Chuck(G)
December 5th, 2011, 10:22 PM
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.

pearce_jj
December 5th, 2011, 10:31 PM
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.

MikeS
December 6th, 2011, 07:50 AM
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.?

vwestlife
December 6th, 2011, 01:58 PM
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.

modem7
December 6th, 2011, 11:31 PM
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."

pearce_jj
December 7th, 2011, 12:11 AM
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.

modem7
December 7th, 2011, 12:39 AM
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).

pearce_jj
December 7th, 2011, 08:25 AM
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.

Chuck(G)
December 7th, 2011, 08:30 AM
I'd have to check, but some WD controllers slipped an extra short sector 0 on the first cylinder.

MikeS
December 7th, 2011, 09:12 AM
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.

Trixter
December 7th, 2011, 10:21 AM
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.

Chuck(G)
December 7th, 2011, 10:40 AM
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.

pearce_jj
December 7th, 2011, 12:30 PM
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!

vwestlife
December 7th, 2011, 06:53 PM
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.

modem7
December 8th, 2011, 12:22 AM
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

pearce_jj
December 8th, 2011, 04:00 AM
Many thanks for that idea - I will give that a go!

pearce_jj
December 12th, 2011, 12:55 PM
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.

Trixter
December 13th, 2011, 07:10 AM
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.

pearce_jj
December 14th, 2011, 01:30 PM
Thanks, this echoes my sentiment entirely.

TBH this is the first MFM controller I've experimented with in detail, but the goal is indeed to map out everything suspect. SpeedStore is helping identify the areas brilliantly.

My earlier assumption seemed to be incorrect, as the speedstore reported cylinders when entered directly in the error map (using BFI 0 as suggested) does eliminate the errors in SpeedStore. With 22 defects entered, the LLF utility states that 11 alternate tracks have been used, and the disk size reported by SpeedStore is reduced to 816 cylinders. But for whatever reason it still shows an error on one cylinder that is in the error map..., so maybe there is an error in the relocation zone, which presumably is cylinders 816..819.

Not too sure on next step at the moment!

pearce_jj
December 28th, 2011, 01:23 PM
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?

I've been chipping away at this problem. The ST11M controller 'unique format' (as it's manual describes it) is basically a remapping exercised based on spare tracks it allocates from the 'end' of the disk. I can't deduce exactly what the unit of reallocation is - the defect list has ended up being 35 entries, and the LLF routine reports 16 alternate tracks used. So either it's mapping out parts of tracks or decided whether or not to map out entered defects.

I built a bad list initially by moving the drive to a simpler controller (RLL actually, but anyway) so SpeedStor could then tell me the cyl/hd of defect areas. With it back on the ST11M, after entering those 30-odd defects, there were still some errors listed against a couple of cyl/hd that were on the defect list already, i.e. Hd1 Cyl 702 - on defect list and still showing bad.

So next I went back again and entered those twice on the defect list, with BFI values of 0 and 6000 hoping to get the controller to therefore map out 'both halves' of the dud track, guessing it was working roughly in that way.

Running SpeedStor again on the (now 814 cylinder) drive shows some success with that, but also that other defect areas have 'grown' by a track - I guess due to thermal calibration of it having been running for a few hours, and age obviously.

Anyway, thanks all for the pointers on this and the other related threads, as ever very much appreciated.

Thanks!