Issues producing images of old IBM PC 5.25" disks

All questions about how to use KryoFlux go here.
Post Reply
KDavies
Posts: 4
Joined: Mon Oct 05, 2015 11:25 am

Issues producing images of old IBM PC 5.25" disks

Post by KDavies » Thu Oct 15, 2015 1:28 pm

Hello all. First time posting here, please forgive my lack of experience!

I'm involved in a project to preserve old optical and magnetic media, ideally in a format that can be mounted and accessed in emulated environments. We've started using KryoFlux to help with our extracting data from old 5.25" disks, for a variety of platforms (primarily IBM PC, Mac and BBC).

While I've had a good deal of success, I've now come across a couple of disks which are causing me real headaches. I've uploaded the (zipped) stream output for one of these disks here:

http://www.filedropper.com/theprojectmanager

Monitoring the scatter graph during the streaming process shows bands at 4, 6 and 8, which prompted me to try producing an MFM image with the following command line (on Linux):

Code: Select all

dtc -d0 -fstreams/theprojectmanager -i0 -fimages/theprojectmanager.img -i4
Which does indeed produce an image file, but not one which I am able to mount on my system (I've knocked up a quick script to attempt mounting the file using every supported filesystem type, without any level of success).

Can anyone offer any advice on where I might be going wrong here? Thanks!

Feltzkrone
Posts: 255
Joined: Sat Jun 18, 2011 8:03 pm

Re: Issues producing images of old IBM PC 5.25" disks

Post by Feltzkrone » Thu Oct 15, 2015 6:49 pm

It's a DOS 1.x disk, single sided, 40 tracks, 8 sectors per track, 160 kb. It does neither provide a media descriptor byte nor a BIOS Parameter Block. Therefore most software will have a hard time or completely fail at detecting the geometry of those sector images.

If you don't mind using Wine you can probably use DiskExplorer/EditDisk available at http://hp.vector.co.jp/authors/VA013937 ... dex_e.html to access the files contained on the disk. Unfortunately it isn't able to autodetect the geometry and disk format parameters but it lets you define those manually (just choose "(Manual FD)" and not "plain image" when opening), here they are:

FAT type: FAT12
FAT offset: 512
FAT quantity: 2
FAT size: 512
Root offset: 1536
Data offset: 3584
Cluster size: 512
Total clusters: 320

I have absolutely no experience with Linux but perhaps this information is also useful to you for mounting the 160 kb sector image properly.

Here's what's on the disk:
content.png

KDavies
Posts: 4
Joined: Mon Oct 05, 2015 11:25 am

Re: Issues producing images of old IBM PC 5.25" disks

Post by KDavies » Fri Oct 16, 2015 9:41 am

Thank you very much for your help Feltzkrone. I'll see what I can do with that software.

KDavies
Posts: 4
Joined: Mon Oct 05, 2015 11:25 am

Re: Issues producing images of old IBM PC 5.25" disks

Post by KDavies » Fri Oct 16, 2015 2:18 pm

I confirm that using DiskExplorer with these parameters allowed me to extract the files from the image.

I'd love to know more about how you were able to determine the disk format and geometry settings from the stream data I provided - we have quite a few disks here left to process and it would be a tremendous help if we were able to perform similar analysis ourselves. Did you use a tool to parse the stream files, or is it a case of examining them manually?

SomeGuy
Posts: 240
Joined: Wed Feb 18, 2015 8:18 pm

Re: Issues producing images of old IBM PC 5.25" disks

Post by SomeGuy » Fri Oct 16, 2015 5:06 pm

This is a common problem with early 1980s PC disks. In general most 160K or 320K (8-sector) disks will have a DOS 1.x boot sector that lacks the BPB. DOS 1.x only supported these two formats. If a vendor provided disks in these formats, the software is probably intended to be compatible with DOS 1.x.

Feed these disks to any version of DOS on a real computer and it is perfectly happy reading them. But as you can see, most modern disk utilities don't take DOS 1.x in to consideration.

Decoding your image and looking at it under a hex editor, it is a 163840 byte image (40 tracks 8 sectors of 512 bytes single sided) - the standard size for a DOS 160K image, recognizable as FAT, it has a DOS 1.x boot sector, and the BPB bytes are all zero.

The Bios Parameter Block was not defined until DOS 2, and not really used until DOS 3.x. Many early 360K and 180K disks may also omit BPB data or have incorrect BPB data. I've even come across one 160K application disk that had a completely empty (all zeros) boot sector, but real DOS is fine with that.

There are other related issues you can run in to:
-160K/320K 8-sector disks formatted with an unused 9th sector per track (due to crappy duplicators)
-Junk on the second side of a single sided disk (due to reusing disks)
-Incorrect data in the Bios Parameter Block (due to a bug in the PC-DOS 2.0 formatter!)

There are also the following issues when interoperating with DOS 1.x disks:
-Empty file name entries must have a "deleted" mark in them.
-Volume labels are not legal.
-Bad sectors are not supported

A workaround I commonly use - when encounter a disk image that has a 160K, 320K, 180K, or 360k file size, but won't open in other disk tools due to missing or bad BPB data, I create a temporary copy, open that copy in a hex editor and paste over the first 32 bytes with the following (from binary files).

Code: Select all

160K:
00000000  EB 27 90 49 42 4D 20 20-32 2E 30 00 02 01 01 00    .'.IBM  2.0.....
00000010  02 40 00 40 01 FD 01 00-08 00 01 00 00 00 00 00    .@.@............

320K
00000000  EB 27 90 49 42 4D 20 20-32 2E 30 00 02 02 01 00    .'.IBM  2.0.....
00000010  02 70 00 80 02 FF 01 00-08 00 02 00 00 00 00 00    .p..............

180K
00000000  EB 2C 90 49 42 4D 20 20-32 2E 30 00 02 01 01 00    .,.IBM  2.0.....
00000010  02 40 00 68 01 FC 02 00-09 00 01 00 00 00 00 00    .@.h............

360K
00000000  EB 2C 90 49 42 4D 20 20-32 2E 30 00 02 02 01 00    .,.IBM  2.0.....
00000010  02 70 00 D0 02 FD 02 00-09 00 02 00 00 00 00 00    .p..............
That usually lets the disk utility open the image.

Of course, don't change your original.

KDavies
Posts: 4
Joined: Mon Oct 05, 2015 11:25 am

Re: Issues producing images of old IBM PC 5.25" disks

Post by KDavies » Mon Oct 19, 2015 3:49 pm

Thanks, SomeGuy, not only did that work for me with the disk in question, I was able to apply it to another disk in our collection.

I'm going to try this out with a variety of other disks of similar age and varying origin.

Post Reply