VOGONS


First post, by led178

User metadata
Rank Newbie
Rank
Newbie

Good afternoon!

Please help me figure it out.

There is ST351A/X with some defects 40h/80h (in PC3000 terminology)
Judging by the documentation for the PC3000, the native utility cannot add or remove defect sheets, everything is done through the universal one. But she cannot hide the defects. In the defect sheets, as there were native 9 defects, they remain.

When checking, these sectors come with an error 10h (uncorrectable ECC or CRC).
I went through the mhdd 3.0 disk with remap enabled.
The defects remained, but the error code changed to 0Ah (bad sector flag detected).
Question 1 - Is this how it was intended or how it happened? Why?

If I understand correctly, this flag has come from the time when defective sheets were written on the cover with a pen, on the MFM disk, sectors manually entered during LLF are marked with this flag.
Question 2 - why are they ignored by both format (trying to recover allocation unit) and scandisk (if you run it after the modified format / q)? What utilities generally listen to this flag and do not make a bunch of attempts to access the sector?

Question 3 - is this flag easily removed by the same format, or does it remain until the next LLF?

Reply 1 of 16, by rasz_pl

User metadata
Rank l33t
Rank
l33t
led178 wrote on 2023-09-07, 08:55:

Judging by the documentation for the PC3000, the native utility cannot add or remove defect sheets, everything is done through the universal one.

what does "universal one" mean?
are you using vintage PC3000 or a modern one? where one could get hands on preferably vintage pc3000 documentation?

led178 wrote on 2023-09-07, 08:55:

ST351A/X
I went through the mhdd 3.0 disk with remap enabled.

Are you sure such old drive even supports remapping bad sectors? If drive cant hide original defects then it has no capability to remap.

led178 wrote on 2023-09-07, 08:55:

until the next LLF?

with PC3000, right? afaik Seagate never released any low level format utilities for IDE drives.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 2 of 16, by led178

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-09-07, 18:41:

what does "universal one" mean?

PC3000AT utility. This is directly written in the documentation.

rasz_pl wrote on 2023-09-07, 18:41:

are you using vintage PC3000 or a modern one? where one could get hands on preferably vintage pc3000 documentation?

Old, V12-V14.
https://www.acelab.ru/dep.pc/doc.pc3000dos/05 … 01/PCST351A.pdf

rasz_pl wrote on 2023-09-07, 18:41:

Are you sure such old drive even supports remapping bad sectors? If drive cant hide original defects then it has no capability to remap.

Supports. But I'm more interested in the older ways, through the bad sector mark.

rasz_pl wrote on 2023-09-07, 18:41:

with PC3000, right? afaik Seagate never released any low level format utilities for IDE drives.

This is an interesting question, now I do not understand how to put a label, and how to remove it 😀
I will experiment, but later.

Reply 3 of 16, by rasz_pl

User metadata
Rank l33t
Rank
l33t

disclaimer: I dont know what Im doing 😀

led178 wrote on 2023-09-07, 19:21:

Weird, seems PC3000 lets you view table of hidden defects but doesnt have UI to edit for this drive. When you said "universal one" you mean directly hex editing service sectors? That would mean using PCST351A.pdf description:

Secondary loader - 1 sec. External firmware code for ST351A drive - 19 sec. External firmware code for the ST351X drive - 19 sec. Translator tables - 2 sec. Table of defects - 1 sec. Disc passport - 1 sec. Configuration table - 1 sec

and manually editing all 4 copies

led178 wrote on 2023-09-07, 08:55:

When checking, these sectors come with an error 10h (uncorrectable ECC or CRC).
I went through the mhdd 3.0 disk with remap enabled.
The defects remained, but the error code changed to 0Ah (bad sector flag detected).

are those codes from PC3000? the document says "If errors with codes 10H are detected, then this indicates damaged servo marks on the surface". It also mentions something about tool to add defects to the list contradicting previous information about only being able to view the list 😒

What are you trying to accomplish? I thought you wanted to add more defects to P-list.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 4 of 16, by Horun

User metadata
Rank l33t++
Rank
l33t++

Many old IDE did not have remapping capability w/o a util direct from the manufacture, in this case Seagate, as it is written into a eeprom code or low level renumbered the sectors IIRC. I know the 2000/3000 series from both Seagate and WD you could hide/remap some bad sectors but unlike MFM/RLL you are never supposed to low level format an IDE like you do an MFM/RLL (and enter those bad sectors). Being the 351A/X is one of the original Seagate IDE "Flagging" the sector as bad is probably the best you can do with a drive that old unless you can find a true Seagate made util for that drive that can do it like was done at the testing stage. MH Drive Pro 3.x has some util that allow relocating bad sectors on IDE but am guessing it would not would on that 351A/X either.

added: I know the PC-ST351A util from PC-3000 is supposed to handle things for that drive but if Seagate never released their internal info to them that app may not be capable of remapping sectors for that drive..
also if using some cracked demo not all features may work 😁

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 5 of 16, by led178

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-09-08, 01:05:

What are you trying to accomplish? I thought you wanted to add more defects to P-list.

Q1 - MHDD 3.0 when trying to remap (I don't know how he does it) just put a bad sector flag, like on MFM. Can anyone come across this?
Q2 - Why do bad sector flags ignore format (trying to recover allocation unit) and scandisk (if you run it after the modified format / q)? What utilities generally listen to this flag and do not make a bunch of attempts to access the sector?
Q3 - is this flag easily removed by the same format, or does it remain until the next LLF? It seems that high-level programs should not have access to the sector id where this flag is set (bit 7 of the head number field).

I don't really want to figure out how to add defects to the p-list, this is a special case. But to figure out how it was conceived in the days of MFM, before the defect lists ...

Reply 6 of 16, by Deunan

User metadata
Rank Oldbie
Rank
Oldbie
led178 wrote on 2023-09-08, 05:58:

Q1 - MHDD 3.0 when trying to remap (I don't know how he does it) just put a bad sector flag, like on MFM. Can anyone come across this?
Q2 - Why do bad sector flags ignore format (trying to recover allocation unit) and scandisk (if you run it after the modified format / q)? What utilities generally listen to this flag and do not make a bunch of attempts to access the sector?
Q3 - is this flag easily removed by the same format, or does it remain until the next LLF? It seems that high-level programs should not have access to the sector id where this flag is set (bit 7 of the head number field).

As it was already mentioned, what IDE drive will do with LLF or remap attempt it down to its firmware. The very first IDE drives could actually LLF, to some extent anyway, and this would refresh the track addressing headers and perhaps mark some sectors as bad. I think this was beacause the MFM/RLL evolved into SCSI and IDE - and SCSI can LLF and remap, so good chances are the early FW for IDE retained some of that code as well. Except there is usually no free space to remap to on IDE, so it won't work, you can only mark the sectors.

Anyway, on MFM/RLL it's the controller that marks the sectors (or whole track) and it's supposed to recognize its own mark (might be bit 7 of sector number or head number set, might be something else like different IDAM/DAM mark) and return error on read/write attempt. Error different than "sector not found" which is usually a bad thing to report to OS. So more along the lines of general ECC/CRC failure. And the controller will refuse to do anything with that sector so while FORMAT or SCANDISK can retry a few times, the result will always be an error and the sector/cluster will be marked bad by OS.
The only way to recover from that is to LLF the track again. Chips expect to get the list of bad sectors (all sectors actually, good and bad, so you can set any interleave you want) but the MCU on the controller card might run additional scan/verify after the format and mark any bad sectors as well. The scan might be a separate operation to the format - but usually it will only mark bad sectors as such, not try to recover (or even test) sectors previously marked as bad.

Reply 7 of 16, by led178

User metadata
Rank Newbie
Rank
Newbie

In other words, if the bad sector flag is set on an unstable sector, then format will always consider it bad?
(since format itself does not have access to the sector id, and the 0Ah error is returned by the controller itself)

How (other than LLF) can I set this mark?
In theory, this is one of the functions int 13h "Format Track and Set Bad Sector Flags", but (as I understand it) it marks the entire track.
For ST351A/X this is now done by MHDD 3.0

Deunan wrote on 2023-09-08, 11:13:

The scan might be a separate operation to the format - but usually it will only mark bad sectors as such, not try to recover (or even test) sectors previously marked as bad.

I believe that this is an error in format and scandisk themselves, but I was wondering if there were programs without this error (several attempts to access the sector marked with the flag)
(since they try to recover/read this sector many times, formatting a bad disk can take hours)

Reply 8 of 16, by Deunan

User metadata
Rank Oldbie
Rank
Oldbie

You have to keep in mind that DOS kernel (and the programs) don't talk directly to hardware. There are some programs that work on lower level but these are usually special apps, and in case of IDE HDDs that would be either program from the manufacturer itself, or some that have obtained detailed datasheet info.

So usually all access goes through BIOS, which (by default there is only mobo BIOS, sometimes the controller card might have it's own ROM extension) is not very smart and it needs to work with multiple chips. So when the chip on the controller card sees a bad sector mark it will return error. But what kind of error? There is the 0x0A code but you can't be sure it was interpreted correctly by the BIOS, what if it was read error that resulted in bad bit the sector header? Should you always accept 0x0A code as final at the first occurence, or retry in case it was a read glitch? If you retry then the error handling is the same as with other read error codes, and also the the program is simpler since it doesn't do any special processing - try 3 times on error, then give up.

It might be a bug but also it can be a simplification in error handling, and not trusting the BIOS/controller 100% on the reported code (and what was the real cause of it). I think you are trying to apply some logic here that is not applicable to such "stupid" systems as 16-bit BIOS/DOS code. If this was some proper OS with a driver for this hardware (assuming there is no bugs in the driver and OS) then once you get an error code saying "bad sector" you can pretty much trust it. Any read retries would happen inside the driver so the result is pretty much final.

Reply 9 of 16, by Horun

User metadata
Rank l33t++
Rank
l33t++

Good write up Deunan !
Generally Once a sector on HD is marked bad the OS should not try to write to it again (simple comparison: floppy disk with bad sectors..you can have errors on a floppy and all it does is reduce the total available disk space)
Long ago had a 480Mb HD that had a cluster of bad sectors around the 400Mb area but none anywhere else. I was able to create partitions around that area so they were never seen/accessed by the OS. So if I wanted to reformat those partitions there were no errors.... sadly the drive totally dies about 5 years later.....Took a special util and had to record the start/end cluster numbers of the bad spot. If the bad sectors are scattered all over then I would have had to do something different or just ignore them.

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 10 of 16, by rasz_pl

User metadata
Rank l33t
Rank
l33t
led178 wrote on 2023-09-08, 05:58:

Q1 - MHDD 3.0 when trying to remap (I don't know how he does it) just put a bad sector flag, like on MFM. Can anyone come across this?

I dont remember seeing any MHDD options to directly mark sectors as bad during normal scan.
MHDD cant remap anything on its own, it can only try and force the drive firmware to do it by repeatedly writing to a bad sector. Afaik and according to acelab document ST351A/X cant remap and will mark sector BAD internally if it detects one.
Imo its ST351A/X itself doing it.

led178 wrote on 2023-09-08, 05:58:

Q2 - Why do bad sector flags ignore format (trying to recover allocation unit) and scandisk (if you run it after the modified format / q)? What utilities generally listen to this flag and do not make a bunch of attempts to access the sector?

You mean the other way around, why format ignores bad flag? If you did "format /q" then "This option ..does not identify bad sectors"
Full format should act on it and mark sector bad. https://github.com/AR1972/astro/blob/91e0bc1f … kfrmt.asm#L1390
called by Disk_Format_Proc in https://github.com/AR1972/astro/blob/91e0bc1f … skfrmt.asm#L325
going deeper main Format_Loop https://github.com/AR1972/astro/blob/91e0bc1f … skfrmt.asm#L798
and deeper FormatTrack calling int 21h https://github.com/AR1972/astro/blob/91e0bc1f … kfrmt.asm#L1023
GENERIC_IOCTL 0x440D so AX = 440Dh
DetermineTrackAction already set Track_Action to FORMAT_TRACK so CL = 42h
http://www.techhelpmanual.com/471-dos_fn_440d … ical_drive.html
http://www.techhelpmanual.com/493-ioctlfmtvrfytrackrec.html
you would have to dig more in this repository to find where and how exactly did DOS implement 440dh_cl_42h, as in what bios function it is calling exactly and what it returns. https://stanislavs.org/helppc/int_13-5.html ? https://stanislavs.org/helppc/int_13-6.html ?

led178 wrote on 2023-09-08, 05:58:

Q3 - is this flag easily removed by the same format, or does it remain until the next LLF? It seems that high-level programs should not have access to the sector id where this flag is set (bit 7 of the head number field).

It might not be the same flag. Afaik only disk firmware (and lower level tools like PC-3000) has access to internal error flags.
DOS 'Format track and set bad sector flag' https://stanislavs.org/helppc/int_13-6.html that might be used here calls ATA command 45 'WRITE UNCORRECTABLE EXT'
"The Write Uncorrectable Ext command is used to cause the device to report an uncorrectableerror when the target sector is subsequently read.When the feature field contains a value of 5xh, the Write Uncorrectable Ext command causesthe device to indicate a failure when reads to any of the sectors that are contained in specifiedsectors. Theses sectors are referred to as "pseudo uncorrectable" sectors. In this casewhenever a pseudo uncorrectable sector is accessed via a read command, the device performsnormal error recovery and then set the UNC and ERR bits to indicate she sector is bad.When the feature field contains a value of Axh, the Write Uncorrectable Ext command causesthe device to flag the specified sector as "flagged uncorrectable". Flagging a logical sectoras uncorrectable causes the device to indicate a failure when reads to specified sectors areperformed. These sectors are referred to as "flagged uncorrectable" sectors. In this casewhenever a "flagged uncorrectable" sector is accessed via a read command, the device sets theUNC and ERR bits without normal error recovery to indicate the sector is bad.If the Uncorrectable options are set to A5h or 55h, then sectors that have been made pseudouncorrectable are listed as failed in the standard error logs when read back.Uncorrectable options are set to 5Ah or AAh, then the reading of pseudo uncorrectable sectorsare not logged as an error in any standardized error logs.The pseudo uncorrectable or flagged uncorrectable status of a sector remains through a powercycle.If an uncorrectable error occurs, the write will be terminated at the failing sector.
Uncorrectable options
55h : Create a pseudo uncorrectable error with logging
5Ah: Create a pseudo uncorrectable error without logging
A5h: Create a flagged error with logging
AAh: Create a flagged error without logging"

Might be another separate flag, or drive might reuse same one.

led178 wrote on 2023-09-08, 05:58:

I don't really want to figure out how to add defects to the p-list, this is a special case. But to figure out how it was conceived in the days of MFM, before the defect lists ...

MFM was totally different, PC had full control over Dick Controller and could read/write whatever it wanted. ST351A/X is IDE, in IDE disk controller is on the drive, and IDE ribbon cable is just an extension of ISA bus. With IDE you are limited to what ATA commands let you. As Deunan mentioned SCSI has some additional commands for in theory low level formatting whole tracks, sector reordering, you can even change sector size https://github.com/ahouston/setblocksize

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 11 of 16, by Horun

User metadata
Rank l33t++
Rank
l33t++

Wow rasz, you just made my head hurt 😒 So much detailed info !!
And I prefer full control over my Dick controller (it has caused me issues in the past 😁) sorry just being sarcastic on the mistype ;p

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 12 of 16, by led178

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2023-09-09, 00:42:

MHDD cant remap anything on its own, it can only try and force the drive firmware to do it by repeatedly writing to a bad sector.

Is not a fact. On phantom.sannata they suggest that there is an ATA command 50h, 40h (Assign this sector to an alternate location).

Details

9.8 Format track

The implementation of the Format Track command is vendor specific. The
actions may be a physical reformatting of a track, initializing the data field
contents to some value, or doing nothing.

The Sector Count Register contains the number of sectors per track.

The track address is specified in the Cylinder High and Cylinder Low
Registers, and the number of sectors is specified in the Sector Count
Register. When the command is accepted, the drive sets the DRQ bit and waits
for the host to fill the sector buffer. When the sector buffer is full, the
drive clears DRQ, sets BSY and begins command execution.

The contents of the sector buffer shall not be written to the media, and may
be either ignored or interpreted as follows:
+=============-=============-=============-==========================+
|DD15 ---- DD0| |DD15 ---- DD0| |
|-------------| |-------------+--------------------------|
| First sector| | Last sector | Remainder of buffer |
| descriptor | : : : : : : | descriptor | filled with zeros |
+====================================================================+

One 16-bit word represents each sector, the words being contiguous from the
start of a sector. Any words remaining in the buffer after the representation
of the last sector are filled with zeros. DD15-8 contain the sector number.
If an interleave is specified, the words appear in the same sequence as they
appear on the track. DD7-0 contain a descriptor value defined as follows:
00h - Format sector as good;
20h - Unassign the alternate location for this sector;
40h - Assign this sector to an alternate location;
80h - Format sector as bad.

NOTES
9 - Some users of the ATA drive expect the operating system partition table to
be erased on a Format command. It is recommended that a drive which does not
perform a physical format of the track, write a data pattern of all zeros to the
sectors which have been specified by the Format Track command.
10 - It is recommended that implementors resassign data blocks which show
repeated errors.

rasz_pl wrote on 2023-09-09, 00:42:

You mean the other way around, why format ignores bad flag?

It seems that they have already figured out that he does not ignore him, but at the same time makes many attempts to “recover” the sector.

rasz_pl wrote on 2023-09-09, 00:42:

DOS 'Format track and set bad sector flag' https://stanislavs.org/helppc/int_13-6.html that might be used here calls ATA command 45 'WRITE UNCORRECTABLE EXT'

No, this command appeared much later.
Most likely the command used is ATA_FORMAT_TRACK 50h, 80h (Format sector as bad)
Which forces the hard drive to put a mark in the sector id.
"The Sector ID data consists of the Cylinder, Head, and Sector Number fields, as well as a CRC field used to verify the ID data. Most controllers use bit 7 of the Head Number field to mark a sector as bad during a low- level format or surface analysis. This convention is not absolute, however. Some controllers use other methods to mark a bad sector, but usually the mark involves one of the ID fields."
And the error appears not UNC (10h), but BBK (0Ah).

Horun wrote on 2023-09-09, 01:12:

Wow rasz, you just made my head hurt 😒 So much detailed info !!

Do you want me to make your head hurt even more? 😀
On phantom.sannata I was told that an MFM disk can skip bad sectors (they won't be visible at all!)

Reply 13 of 16, by Deunan

User metadata
Rank Oldbie
Rank
Oldbie
led178 wrote on 2023-09-09, 06:52:

On phantom.sannata I was told that an MFM disk can skip bad sectors (they won't be visible at all!)

No. MFM hard drive is a dumb device, it doesn't do anything on it's own and it will accept any bitstream format for the data. Even the later Seagate (and NEC?) HDDs that already have some servo-like data written to the platters during manufacturing, these still do not understand what "sector" even is.

What can happen is some controller chips/card can format the track not with the usual 17 or 26 sectors, but 16+1 (or even 17+1 will fit in MFM mode) or 25+1. That +1 is a spare sector to remap one bad per track, and in this case it can work as you described it - the bad sector would get marked and the spare would be renamed to take over. Now this will have some performance penalty in some cases but not a big one, and would be transparent to BIOS if done properly.

I have RLL controller card that can format with +1 option but I've never tried that (I haven't played with it much). I do not know how the sectors are remapped, is it an automatic process or manual, does it happen only during formatting or how do you mark bad sectors found at a later time. I might investigate one day. This card does have ROM extension to BIOS code by the way so it might be handled party in hardware and party in software. Note that you can reformat a single track - this is what Spinrite does - it reads existing data, formats the track to refresh it (or to change interleave) and then writes the data back. So it's non-desctructive format that can mark or unmark sectors as bad, this is at least one such method to do this.

Reply 14 of 16, by led178

User metadata
Rank Newbie
Rank
Newbie
Deunan wrote on 2023-09-09, 09:30:

No. MFM hard drive is a dumb device

Sorry, I meant controller capabilities.
I know that the disk itself is essentially a tape recorder 😀
Where can I read reviews of MFM controllers? Advertising?
Digital archeology is very interesting 😀

ps: went looking for old encyclopedias and reference books...

Reply 15 of 16, by rasz_pl

User metadata
Rank l33t
Rank
l33t
led178 wrote on 2023-09-09, 06:52:
rasz_pl wrote on 2023-09-09, 00:42:

MHDD cant remap anything on its own, it can only try and force the drive firmware to do it by repeatedly writing to a bad sector.

Is not a fact. On phantom.sannata they suggest that there is an ATA command 50h, 40h (Assign this sector to an alternate location).

I totally forgot talking about this two years ago 🤣 https://www.os2museum.com/wp/recalibration-ne … #comment-364005
There were utilities for low level formatting very early stepper motor IDE drives that probably used this command. SGATFMT for some Seagates, ISPFMT for some WDs.

led178 wrote on 2023-09-09, 06:52:

It seems that they have already figured out that he does not ignore him, but at the same time makes many attempts to “recover” the sector.

yes, as in the source code I linked earlier default DOS Format without parameters will just try really hard to format every sector on the drive. It will do this calling appropriate BIOS disk function. Its up to bios what ATA command will be used.

led178 wrote on 2023-09-09, 10:44:

Digital archeology is very interesting 😀

indeed, you might also like this https://blog.stuffedcow.net/2019/09/hard-disk … robenchmarking/ has early IDE Seagate ST-157A among the drives

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 16 of 16, by Horun

User metadata
Rank l33t++
Rank
l33t++

Great info !
Not sure if you tried Seagates format tool v4, it will low-level format SOME early Seagate IDE (as well as MFM, RLL, ESDI) but not sure if you can modify the flagging or add to the defect table when it is IDE.
Another thing from their old FTP is their Desk Ref HD database from 2001 in Windows .HLP format (just unzip and double click the .HLP). It has a good revised set of info on many older Seagate HDs up to about 2000.
Attached both just for S&G... guess I should put them in the Vogons library too.

Attachments

  • Filename
    Seagate stdr0106.7z
    File size
    875.97 KiB
    Downloads
    25 downloads
    File comment
    Seagate Desk Ref 2001 in .HLP for Windows
    File license
    Public domain
  • Filename
    sgatfmt4.zip
    File size
    53.71 KiB
    Downloads
    25 downloads
    File comment
    Seagate Format SGATFMT v4
    File license
    Public domain

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun