QNX 3.21 on failing hard drive - image won't boot

I have an old 2GB maxtor hard disk that runs QNX 3.21. It also has Windows 95 installed on it. QNX 3.21 is installed on partition 3 which boots by default, press 4 to boot partition 4 which has win 95 on it. The system does boot to QNX, but with many errors.

I need to replace the hard drive but I do NOT have any QNX 3.21 install disks. I was able to hook the old 2GB hard drive up in windows and saw that it has 2 partitions, a 1.7GB fat16 partition first with windows on it, then following it a 211MB partition I’m assuming with QNX on it (windows reads this partition as not formatted)

I was able to boot Ubuntu and use the dd command to make an image of the 2GB hard disk. I then used the dd command to take this image and put it on a 10GB drive. When I try and boot the 10GB drive, it just says Missing Operating System when it tries to boot partition 3. When I try to boot partition 4, it gives me a boot failed, it won’t let me boot to windows either.

I don’t know much at all about QNX but I need to get this working. Any help would be extremely appreciated. Keep in mind, the original 2GB HDD is actually booted sitting at the QNX prompt right now, but I am not familiar with any commands.

By the way, we have these “backups” on 60MB tapes but I have no clue where to go about restoring them to a new hdd.

It seems that in the 10GB hard disk the qnx loader is working ok after copying the the image? I assume this because the system is answering to press 1 to 4 in order to choose partition… right?

Why don’t you try with another tool than Ubuntu dd to make the hard disk image?


I am assuming that with dd you did a ‘byte exactly’ copy or image backup? If not, that’s what you need to make.

From what I remember (man is my memory fuzzy now on 15+ year old products), the bootloader is expecting a certain drive geometry and thus is looking for the O/S and other files at VERY specific blocks/sectors.

By changing the drive size from 2 to 10 gb you’ve messed that up. You’ll probably need to locate a real 2 gb drive.


hey Tim, where was that museum again where you located a 2 gb hard drive last time … ?

irock85, I can only underline Tim’s suggestion. once you have installed a reliable second drive with the same geometry on your computer, come back to the forum with your questions or search it. my experience is that with a somewhat similar second drive transfer really works. sorry I cannot define exactly what “somewhat” means, but to start with, sizes should match.



The Smithsonian? ;-)

Or if you are lucky and your city is big enough to have a scrap electronics shop you might find ones there.

In reality, I wonder if 2 Gig CF cards would work as a stand in for old 2 gig drives. Obviously those old machines wouldn’t have a CF card reader but there are plenty of PC104 boards available these days with CF slots that might work depending on if you need custom hardware (like ISA boards) with these machines.


Some SSD works.

Thanks for all the input guys. I have actually come across an identical QNX system to the one I am working on, only the 2gb drive in this one is not failing.

I have not had any luck coming across another 2gb drive stable enough to provide a replacement. I now have a clean byte by byte image from the working 2gb drive onto a 20gb drive. It still obviously does the same thing the other drive did, when trying to load QNX it says “Missing Operating System”

Now would booting the working QNX2 system up and creating a QNX2 boot disk help me at all in getting the imaged 20gb drive to work? I also read in another post there is a “boot” command you can run in QNX4 that searches for QNX filesystems and fixes the boot loader? Would this help me at all?

I want to provide a solution that is going to work longer than just finding another 2gb drive to image to and die.

Why don’t you try to boot from your working 2G disk with the 20G as slave hard disk, then you “mount” the 20GB (non booting) partition and finally, run fdisk / and from there you try to make booteable the 20G partition. I don’t know… is just a guess.

BTW, be careful with fdisk… don’t loose your working system! :smiley:


Since you have another working QNX system with a 2 Gig drive, you should be able to go into the BIOS on that machine. When in the BIOS, look at the drive geometry (sectors, tracks etc). That’s the info you need to copy down.

Now, when you put the 20 gig drive into the broken machine, enter the BIOS and if you are lucky, you can manually specify the drive geometry (I think some BIOS’s still allow this). Specify the same numbers as the 2 Gig drive. If this works, the system should now report your 20 gig drive as a 2 gig drive.

At that point you can do the byte-by-byte copy back to the 20 gig drive and QNX should find the O/S since all the files will be located in the exact same spots.


P.S. Does this old system talk directly to any hardware cards (ISA, EIDE, PCI) in the PC? If it doesn’t, it might be fine running in VM Ware on a modern processor which is probably fast enough to make it realtime since I am assuming the original PC is probably a 386 or 486.

Working with QNX 2 is not so straight forward. QNX 3.21 is QNX 2. The 3 just means that you are running in protected mode. Sector by sector copying to another drive is unlikely to work unless the 2nd drive has identical geometry. It is not clear what this even means anymore since modern drives display a virtual geometry, always hiding the internal one, and using EIDE interface it can be modified. There are other stumbling blocks. For example, to get a QNX 2 computer to boot, you run the boot command. But you must run this command with the exact driver mounted with the exact geometry configuration you want to have in place at boot time. Among other things, the boot command (I believe) copies the driver image as well as some memory that the current driver is using to the boot file. Then there is also the BIOS issue which can get iffy with LBA.

I’m the author of the disk.ata driver so I am still very familiar with all of this and if you want a more detailed answer, you can send me email at maschoen@pobox.com.


Is this really a problem though?

Lets assume you can set the drive geometry in the BIOS to be identical to a 2 Gig one. As long as when you specify a certain track/sector the drive always reads from the same place how does it matter what kind of virtualization is going on behind the scenes?

For example, you read track 1, sector 1 from the real 2 Gig drive and copy it to track 1, sector 1 of the 2 gig drive you created via the BIOS settings on the new drive. I don’t see how it matters where it goes on that 20 Gig drive as long as later when you request track 1, sector 1 to read the 20 Gig drive returns the right data.

That’s sort of the whle idea behind virtualization. Or is there something I’m missing here?


Yes you are missing something. To the best of my knowledge, a drive has three geometries.

  1. The physical geometry. This one doesn’t matter. The other’s are logical.
  2. The default geometry, which might be the same as the current geometry.
  3. The current geometry.

Can you set the current geometry to what you want? Yes once your computer is powered up if you have the right utility, but this won’t help. The drive will forget this when you power it down and use the default next time. So to do what you want, the BIOS would have to set the current geometry to what you want.

Can a bios change the current geometry to the one you want? In theory yes.
I’ve never seen one that does.

So for QNX 2 the procedure is to figure out what the default geometry is, mount the driver with these parameters, dinit the disk, and copy your files to it. Finally you remount the driver from the hard disk and then run the boot command. Doing a dcopy will only work (allow booting) only if the geometries already are in sync. I might also note that the disk.at and disk.ata drivers were not very cognizant of EIDE drive capabilities. They read the parameters from a place in memory that the BIOS stored them. But sometimes these were not the parameters visible during the IPL explaining the high number of requests on this board for what to do with the “Boot Not Found” message.

OK, no luck changing the geometry in the BIOS and imaging sector by sector that way. Still gives me problems. It either says missing operating system or comes up with a solid cursor or a little arrow, but definately will not boot.

Now I am playing around with the idea of running it on VMware, since we really don’t have any hardware specifically hooked up to this system, it’s just used to print invoices…long story.

So I have VMware 6.5.1 and I created a 2GB virtual drive of the exact same size as the original 2GB drive. I then imaged the 2GB drive to the virtual drive. NOW, my problem is that the geometry of the virtual drive is actually not the same. The virtual drive is based on different cylinders and heads than the original drive, so QNX still will not boot.

I read online there might be a way to change the geometry of the virtual drive by editing a *.vmdk file or something for VMware? I feel I’m getting closer and closer to some sort of solution. I can at least boot to the windows 95 installed on the fat 16 partition if I choose option 4 of the QNX Boot loader, of course referring to the fat 16 partition that was imaged over to the virtual drive along with the 200 meg QNX partition.

Any help is really appreciated guys, thanks so much.

print invoices as in printer? VMWare doesn’t support a parallel port.

There is a BIOS included with VMWare (Virtual of course) that you could try changing the geometry on. Mario, VMWare most definitely does support a parallel port. In order to transfer over my QNX 2 system I used it with my Parallel Port Iomega Zip driver to transfer the data. The only reasonable way I could figure out. No CD Rom’s in QNX 2 and floppies would take forever.

Just checked and you’re right. Thanks for correcting me!

I was watching this topic for some time becouse recently I had the same problem. I solved it using VMWare and DiskCopy 2.0. In my case I tried to copy QNX system from old CF disk 64MB (CHS(7,255,63) and 128128 total sectors) to 4GB CF disk (CHS(7818,16,63) and total sectors 7880544). To do this I used VMWare 6.5.1 and bootable CD with DiskCopy2.0. I did it like this:

  1. First I created virtual machine in VMWare and I created exactly the same disk like 4GB CF card. I created disk using this command:
    C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager.exe -c -s 7880544 -a ide -t 2 my4GBdisk.vmdk
    This command created 4GB disk with 7880544 total sectors on it.

  2. Next I modified my4GBdisk.vmdk file. Instead of this:

Extent description

RW 7880544 FLAT “my4GBdisk-flat.vmdk” 0

The Disk Data Base


ddb.toolsVersion = “0”
ddb.virtualHWVersion = “6”
ddb.uuid = “60 00 C2 9c 41 37 63 0a-d3 50 d0 d7 7c 3a 66 ad”
ddb.geometry.cylinders = “7818”
ddb.geometry.heads = “16”
ddb.geometry.sectors = “63”
ddb.adapterType = “ide”

I entered this (parameters from my source 64MB CF disk):

Extent description

RW 128128 FLAT “my4GBdisk-flat.vmdk” 0

The Disk Data Base


ddb.toolsVersion = “0”
ddb.virtualHWVersion = “6”
ddb.uuid = “60 00 C2 9c 41 37 63 0a-d3 50 d0 d7 7c 3a 66 ad”
ddb.geometry.cylinders = “7”
ddb.geometry.heads = “255”
ddb.geometry.sectors = “63”
ddb.adapterType = “ide”

After that I received virtual machine with the disk exactly like my source 64MB disk with QNX system.

  1. Then I started virtual machine and in BIOS I set User disk with CHS(7,255,63) on it.
  2. I restarted VM again and from CD I boot DiskCopy 2.0. I attached to this VM via USB also my source 64MB CF disk. Then I made disk copy using DiskCopy2.0
  3. After that I restarted VM again and boot from disk. QNX started without any problems.
  4. I turned off virtual machine and I modified my4GBdisk.vmdk. I entered the same parameters like I had at the beggining.
  5. I started VM from DiskCopy 2.0 CD and this time I copied VM disk to 4GB CF card connected via USB.

After that I’ve got working QNX system on new 4GB CF disk.

OK, I got it working with VMWare! I actually was able to use ghost instead of the dd command, but both ways work. I was able to create a virtual 2GB drive very similar to the failing drive, then go into the virtual bios and change the geometry to exactly what it should be for the failing drive.

THEN, I imaged the virtual drive with ghost and it was finally able to boot. Now I just have to get the dotmatrix printer working with vmware…

There shouldn’t be much more to getting the dot matrix working than turning on the parallel port.