Simulated Hardfile-Error?
Hi There,
I'm working on a Disk-Monitor/Editor, so I would like to have some Testcase. Does Anybody knows how to prepare a Hardfile that it behaves like a faulty Disk (have some Readerrors or such). Or does Anybody have a Hardfile with some detected BADB-Blocks (the ones that are chained in the Rigid-Disk-Block) ? TIA Sigma63 |
A hardfile cannot have read errors. Just like an ADF it only stores user data, nothing below that level. The only way to get an error when reading from a HDF is to make partitions bigger than the HDF so that it tries to read outside of the disk.
|
Also returned error can be device driver specific or even semi-random if error reason is real bad block.
|
Quote:
My other Question still remains: Does anybody have a harddisk with some BADB-Blocks (created by HD-Toolbox or so) and made a hardfile from this and is willing to share it? |
Quote:
|
You can flag any block as bad, but you cannot have true bad blocks in a HDF.
|
I guess what I'm really asking is would HDTools, for example, actually create a hardfile with sectors flagged as bad from a hard disk with bad sectors? Would it not quit when it encounters a bad sector? (I haven't had any Amiga hard drives with bad sectors, so I really don't know.)
If so, then what the OP wants could be conjured up from a good RDB image and knowledge of how the sectors are mapped as bad in the RDB. In this way I imagine it would only be possible to mark the block as physically unreadable, but might that not be sufficient to test the OP's proposed Disk-Monitor/Editor error-trapping routines? |
Well, it seems that I've opened a can of worms here! :shocked
Paul Overaa only briefly mentions hard disks in his otherwise excellent book Amiga Disks and Drives: Quote:
"RigidDiskBlock- Fields and Implementation The RigidDiskBlock (RDB) standard was borne out of the same development effort as HD_SCSICMD and as a result has a heavy bias towards SCSI. However, there is nothing in the RDB specification that makes it unusable for devices using other bus protocols. The XT style disks used in the A590 also support the RDB standard. The RDB scheme was designed to allow the automatic mounting of all partitions on a hard drive and subsequent booting from the highest priority partition even if it has a soft loaded filing system. Disks can be removed from one controller and plugged into another (supporting the RDB scheme) and will carry with it all the necessary information for mounting and booting with them. The preferred method of creating RigidDiskBlocks is with the HDToolBox program supplied by Commodore. Most controllers include an RDB editor or utility. When a driver is initialized, it uses the information contained in the RDB to mount the required partitions and mark them as bootable if needed. The driver is also responsible for loading any filing systems that are required if they are not already available on the filesystem.resource list. Filesystems are added to the resource according to DosType and version number. The following is a listing of devices/hardblocks.h that describes all the fields in the RDB specification: Code:
/*-------------------------------------------------------------------- |
Quote:
From what I have seen in the RigidDiskBlock explanation, I imagine that if anyone had an RDF image created by HDTools from a hard drive with some BADB-Blocks, then these blocks would have bad block entries in the RDB and been substituted with replacement blocks from the reserved pool of spare disk blocks. Therefore, at the filesystem level, there would indeed be no bad blocks and in that case such a hard file would be of no use as a testcase, unless the OP's proposed Disk Monitor/Editor is also intended for use at the low level. Really, I wish to know whether, in this instance, I'm wasting my time trying to find a way of artificially creating bad sectors on an RDB image where there are none, as far as I yet know. |
Quote:
I'm not sure exactly which device drivers (scsi.device etc.) support bad block lists. I know at least one does because I remember looking at its code. The driver has to handle remapping accesses to blocks which are marked as bad. Many/most probably don't because it would significantly complicate the code, and most(?) SCSI drives can be told to remap bad sectors so from then on access is transparent to the host computer. |
Quote:
I have corrected a typo in my listing. It appears to be an earlier version than the one given in your link. However I have left mine as is to match the one in the manual. Quote:
|
Quote:
|
Quote:
Nevertheless, what you have written above confirms that an RDF won't, in any event, provide the testcase that the OP is seeking. :agree |
This may be stupid idea, but since WinUAE can use real hard drives, why not just use one that is known to have bad blocks?That way you don't have to bother with image files, and can have a real test case.
|
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
|
HDF is exactly same as normal ADF. It can only contain "user" data, neither can have read errors.
UAE has external "geometry" file support (*.geom) that could also include list (or ranges) of blocks that have virtual read error. I'll think about it.. |
OK, It's time for me to come in again :)
First i would like to thank you all for your input and apologize for all who "wasted time" or got confused. To clarify some Things: Surely the Idea from Oxygene to use a real drive is great, but unfortunately i (think i) have no such drive, which is known to be weak or have Errors. So there was the idea of having a hardfile. I didn't know the term rdf to be a hdf with embedded RDB, so of cource i'm talking about an rdf! And yes i understand that for now a hardfile could not have "errors". What i want is a rdf, were the RDB contains some linked BADB-Block, regardless if they refer (in the rdf) to readable blocks or not. If anybody knows for sure he has a real drive with such BADB-Blocks, it would be nice to know how they were created (by HDToolbox or other?) and is willing to share a dump of the RDBs only (no need to get the actual data-blocks)! Otherwise i think i create simply a BADB-block by hand and see what will happen. @Toni: i would like to see such "external geometry file support" for hardfiles also, but that has no high priority :) |
Quote:
|
All times are GMT +2. The time now is 20:56. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.