• Please review our updated Terms and Rules here

How to write a floppy disk from an image file on a Compaq Portable III?

matthew180

Experienced Member
Joined
Apr 27, 2007
Messages
56
Location
Central Florida
I have a Compaq Portable III and the system defaults to 1.2MB floppy drive after losing its settings (replace the battery for the clock chip DS1285).

I would like to have a bootable Diagnostic floppy for a Compaq Portable III (286 CPU), for which I have downloaded (from archive.org) the 720K image file, and two 360K image files. I also have a GOTEK, but I'm setting it as drive B and keeping the original 5.25" 1.2M as drive A.

The 720K image on the GOTEK always looks like a 3.5" drive to the computer, and the system will not boot if I have the 720K image mounted and the GOTEK as drive A. Of course it does work *after* I am able to run the Diag setup.exe and configure drive A to 3.5", but I would like a real 5.25" Diag floppy that I can use in the future to boot the system after a battery failure. It also seems I cannot write the 720K image to a 1.2M image since it has a very custom boot sector and FAT (which makes me wonder if the BIOS detects the Diag disk with its special MBR?)

It seems a system with a 5.25" 1.2M drive will have to use the 360K two-disk version of the Diagnostics, which is unfortunate. If I had more time I might be so inclined to dig into what the Compaq BIOS is looking for in the MBR on these Diag disks, but that will have to be another day.

All that to ask, how can I write the 360K Diag images to the floppy drive using the Compaq computer (I do not have a floppy drive on my "modern" PC) ?

I do have the 360K Diag image files on a hard disk in the Compaq, and I ran @mbbrutman dskimage which seemed to write the 360K floppy (no errors), but the system fails to boot with the disk. It just hangs with the drive running and a blinking cursor in the upper left corner.

Any insight would be appreciated.
 
If you are having problems with the media or the drive then it doesn't matter whose program you use ...

If the original disk image was 360K and it is a raw sector dump, then my DskImage tool should have worked fine. What parameters did you use to write the disk - 0:40:2:9 ? (The 40:2:9 part is the significant part.) Did you try to format the diskette first? (If not, you should.)

You are trying to write a 360 double density disk in a 1.2MB high density drive. The 1.2MB drive uses heads that are 1/2 the thickness of a heads on a 360K drive. To be absolutely safe you should bulk format the diskettes before writing them. Using a new, never formatted diskette can work too. Previously used disks might cause the drive to get confused because of the previously written tracks not being completely erased or overlaid by the new tracks.

Also keep in mind that any error on the first sector (or track?) before DOS is loaded/running will cause the boot process to fail. That's because the early stages of DOS don't retry disk read failures. Switching to another diskette or cleaning the heads on the drive would might help.
 
Ok, so a few notes:

Trying ImageDisk after converting the 360K IMG file to IMD file, and then running IMDA suggested double-step and 250K->300K conversion. Since the drive is 1.2M I tried the suggested settings, along with a few others. In all cases the disk would not boot, and it actually totally caused the stored settings to be erased / reset.

I would be nice to get this method working, since in any other case I probably will not have something like the creation program (used below).

----

I downloaded the Compaq creation utilities (SP0316.EXE and SP0308.EXE) programs from: https://www.oldsilicon.com/compaq-portable-iii

Running each of these produced (self extracted) respective output file blobs and an .exe utility to write either 360K disks or a 720K disk. Running the 360K utility thows a warning when writing 360K disks with a 1.2M drive... What the heck? The original configuration was a 1.2M drive, so what was a person back in 1987 supposed to think about that? Anway, it wrote two 360K (using DSDD media) floppies that would boot and run the setup! So at least I have a working bootable setup disk. Also, disk 1 contains the primary setup that is needed, and disk 2 only has an additional system information utility, so really only disk 1 is needed to get a system working.

I did not try to write a 360K image using a DSHD media floppy. I might try that just to see what it does and for completeness.

----

I tried to run the 720K disk creation uility, but it refused to allow me to select the 1.2M drive as a target. So, 1.2M systems must create and use the 360K disk.
 
@mbbrutman Thanks for the tips. The disk images are not mine, I downloaded them from archive.org, so I do not know what kind of drive was used to dump them. My dskimage settings were 0:40:2:9, as you mentioned, and the disk media is new old-stock (Verbatim and Memorax), and I formatted them using DOS 6.22 FORMAT prior to writing the images. No sector or track errors.
 
Can you post a link to the images you downloaded? I'd like to try them out for myself.
 
@mbbrutman This is the page with the images I downloaded:


@bolex Thanks, but as mentioned above I did manage to get floppy disks created using the Compaq service pack programs.

The MBRs on these disks is strange too, which makes me think the Compaq BIOS is recognizing something about them. I even tried:

1. Format bootable disk.
2. Delete all files.
3. Carefully copy Diag files to the floppy, making sure the "system" files end up in the same sector locations as the original images.
4. Copy the MBR from the Diag image, but do not overwrite the bytes from offset 12 to about 38, which contains the disk layout information.

This did not work, but the files were readable in DOS.

I also tried to just copy the files to the 1.2MB disk (again attempting to keep the system files in the same front-of-disk locations that they are on the Diag image), and then copied the whole 720K disk's MBR onto the 1.2M disk. It booted, but the setup.exe would not load; and the disk was wholly corrupt. While I was messing with the MBR, that's when I noticed the Diag disk seems to have a lot of data in places that are either "unused" or "set to all zero for FAT12 and FAT16". Clearly the Compaq BIOS does something extra with a MBR on a floppy.
 
Remember, floppy disks don't have MBRs - those are for partitioned hard disks. They do have volume records though, which contains the BIOS Parameter Block that describes the media. (Except for DOS 1.x, but ignore that for now.)

I examined the volume record (boot sector) of the first disk and the jump instruction is "JMP 0x1E" ... well, that's not going to work because I think that's still of the BPB or the reserved space for the extended BPB. So your disks were written correctly, but it's a matter of garbage in/garbage out. I suspect that when you run the Compaq setup program it's putting a more correct boot sector (one that actually works!) in place.
 
Right, I should not have used MBR when talking about the floppy disks. It has been a while since I messed with the disk media at this level (not sure I ever dug into floppies at this level).

My idea (before using the Compaq service pack programs) was to try and copy the files from the 720K image to the 1.2M floppy, then replace the 1.2M boot sector with the one from the 720K image. I needed the 1.2M floppy's FAT to be intact and correct, and since the geometry between the 720K and the 1.2M is different, I could only get the "system files" (diag.cpq, diag.exe, diag.ovl in this case) to be in the same order, but their sector offsets were different. I hoped that would not matter since they should have been referenced via the FAT anyway.

I was using these two website as a reference for the boot sector:


I retained the 1.2M disk's geometry data (bytes 11..27) but used the reset of the 512-byte boot sector from the 720K image. I was feeling confident, but this still did not work.

My first attempt I just copied the whole 512 boot sector to the 1.2M disk, and this actually booted and brought up the initial menu to select which program to run. Of course the setup.exe program could not be loaded since the geometry information was wrong, so that's when I tried the surgical mixing of the 720K boot sector with 1.2M disk geometry info.
 
Back
Top