Migrating QNX2.15 to new PC

Hello all,

As a complete newbee on QNX I have a big problem.

At work we have a machine working on a 486 computer running qnx2.15.
As far as I know its only running 1 program, witch controls the machine via a serial connection.

The 486 is old and start to give problems so we have to replace it.
Is it possible to migrate the whole system and program into a new computer?
What would it take to do so?

If anyone can help me with some info, please !!

Kind regards,

Theo

QNX 2.15 will run on machines faster than a 486, but there are potential problems. For one, somewhere between a 486/50 and a P1/100 the floppy stops working. So it becomes impossible to boot off of a floppy, and therefore impossible to install. The work around is to slow down the processor in the BIOS if you can, install and then set it back, assuming you don’t need the floppy. You could of course leave it running slow.

It also might be possible to install using one slower machine, and then move the hard drive. It is also possible to boot QNX 2.15 over the network assuming you have another working QNX 2 machine, and 2 Cornet cards, but see further below.

I’ve had QNX 2.15G or H running on a 300Mhz PII, but it is quite possible that it will absolutely stop at some higher speed processor. I’ve never heard of it running native on a P4, but that doesn’t mean it won’t. It is quite possible to run it under VM Ware, but then hardware becomes an issue. If you stick to serial and parallel, you might be ok.

Cornet Arcnet cards are ISA 8 bit only as far as I know. There was a PS/2 card, which I don’t think is of any importance. I don’t think there ever was a PCI version. You could always try to get what’s left of Corman out of retirement and ask them to build one, they’d probably only charge a million or two to do it.

Even if you have Cornet cards working, at speeds faster than a 486/100 you start to get screwed up (one sided) virtual circuits. It’s a race condition I was told. There was a fix up at one time, but I could never get it to work. You can reboot and start fresh, but that solution might not work for everyone. The race condition only occured when stopping a VC, and it is possible for a system to never do this.

That empties my recollection. My suggestion is if VM Ware won’t do, replace with something newer. I still do QNX 2 work when asked, but if you have to ask what the rate is, you can’t afford it.

Many companies building embeded or industrial grade computer will run with slow processor:

Ex: voxtechnologies.com/SBCs/roc … hv-m32.htm ( first entry on google)

Thanks for the replies.
I try to close in on 1 possibility…
Can i simply make a copy of the harddisk and put it in a other machine (provided that i could slowdown the CPU)
It’s rather difficult to mak a fresh install becouse over the years the floppy’s are lost during a move to a new building.

(btw we only use 1 serialport as interface to the machine and only a keyboard to control)

If possible, what are the steps to make?

many thanks,

Theo

I think you could make a copy but only from QNX2 itself. And you’d better use a FLASH HD because you can get some that have small capacity.

You can make a sector by sector copy either with QNX2 or from another OS.
If the disk is identical and the PC is identical, it will work.

Once you make a copy, if you were to boot via some other method, either floppy or network card, the drive would work.

Booting off of the hard drive can be a problem however. This stems from complications related to the history of EIDE drives. In the past drives had physical parameters that had to be known, sectors per track, tracks per cylinder (heads) and the number of cylinders. There was some standardization of these parameters. Bios’s had to be informed of what the parameters were, either by setting a standard configuration, or by entering custom parameters. When a driver started, it too needed to know, although most drivers would simply grab the bios info.

Later drives only simulated these parameters, although they usually had internal real physical parameters that could be the same or different. Logical block addressing came a long and mostly fixed this problem, except for booting.

Now things are even more complicated. Different bios’s can choose parameters differently, and the drives happily comply, but that doesn’t mean the sectors are in the right place.

For QNX 2, the standard procedure for making things work is to boot off of a floppy, mount the driver, install the files, and run the “boot” command. If the driver doesn’t correctly figure out what the bios thinks the configuration is, the system will fail to boot. You can mount the driver with specific parameters, if the defaults don’t work. Sometimes these can be read from the bios, and sometimes not.

In recent years, I’ve had a PII laptop that originally I could coax to boot QNX2. After upgrading the hard drive on this machine, I am no longer able to. I’ve tried really hard.

So here are some of the things that can go wrong when just copying a disk.

  1. The hard drives may have different default configurations that the bios detects and uses.
  2. The bios may not be set right
  3. The bios may have ideas of its own

If you think this situation is bad, consider SCSI drives, where were LBA from beginning, but needed Sector/Head/Cylinder information to boot on a PC. Who gets to decided what these parameters are, and when?

The usual error when things are out of wack is a message that says, “OS not found”.

maschoen ,
Thanks for your reply.

As I already stated in my first post, I’m a complete newbee om QNX so I hope you’ll be patient with me…

To get some overview I would like to do things step by step, so first I have to create a boot floppy.
I guess there are some commants that I have to give , like format + system in DOS.
Whitch are these for QNX?
Or maybe better, where can I find the commandset for QNX 2?

best regards,

Theo

The command set for QNX 2 can be found in two places. You might happen to have a printed set of documentation. Without this, it will be pretty difficult to get anywhere with QNX 2 if you are as new as you say. I don’t know if QNX, the company, will still sell these. The other place you can look is in the /cmds directory. The command to look would be:

$ ls /cmds

or

$ cd /cmds
$ ls

Once you see the names of the commands, you can get a short description of their syntax as follows:

$ somecommand ?

That is, run the command with one parameter, a ‘?’.

Off the top of my head, the procedure to create a boot floppy is as follows.

1 format and initalize a floppy disk

$ fdformat 1 +1.44M
$ dinit 1

Next, create the needed directories on the floppy

$ mkdir 1:/cmds
$ mkdir 1:/config
$ mkdir 1:/drivers
$ mkdir 1:/netboot

The next step is a bit of a black art, and might need some trial and error. You have to copy all the files you will need onto the floppy. All of them will be on the hard drive, except possibly sysinit, which you might have to create yourself. You will no doubt have a sysinit or sysinit.1 file for booting from the hard drive, but you may need a cut down version. Here is a short list of commands that will probably get you started.

$ cp 3:/cmds/sh 1:/cmds/sh
$ cp 3:/cmds/mount 1:/cmds/mount
$ cp 3:/cmds/rtc 1:/cmds/rtc
$ cp 3:/cmds/ls 1:/cmds/ls
$ cp 3:/cmds/dinit 1:/cmds/dinit
$ cp 3:/cmds/fdisk 1:/cmds/fdisk
$ cp 3:/cmds/search 1:/cmds/search
$ cp 3:/cmds/timer 1:/cmds/timer
$ cp 3:/cmds/backup 1:/cmds/backup
$ cp 3:/cmds/cp 1:/cmds/cp
$ cp 3:/cmds/boot 1:/cmds/boot
$ cp 3:/cmds/login 1:/cmds/log
$ cp 3:/cmds/dcheck 1:/cmds/dcheck

$ cp 3:/netboot/os.2.21 (I don’t remember the exact name of the boot file, but you can ‘ls’ /netboot to find it

$ cp 3:/config/sysinit 1:/config/sysinit

$ backup 3:/drivers 1:/drivers (Hopefully they will all fit, otherwise you will have to figure out which ones you need

At this point you have to make the floppy bootable. You use the ‘boot’ command to do this. I think you would do the following:

$ boot 1 1:/netboot/os.2.21 (replace os.2.21 with the boot file name

That should create a boot floppy disk that hopefully will boot. If it does, it will start executing the shell script /config/sysinit. Here is probably a minimal sysinit file you might want to use

timer &

Once this is complete, you should be able to bring up a login from the console by typing CTRL-Z character.
If that doesn’t work, something is wrong.

If you get the login, just type a forward slash ‘/’ and enter to login.

Now you have to repeat a lot of what you did to create the bootable floppy, to create a bootable hard drive.
First however you need to mount the IDE driver.

$ mount disk 3 /drivers/disk.atc +v (There are three candidate drivers, disk.atc, disk.at, and possibly disk.ata

You are looking for 2 return codes of 0 from this command.
After it runs, you might also check its results as follows:

$ mount

This will print information about mounted disks and devices.

If all is well so far, you could double check that the hard drive is working properly by running

$ dcheck 3

You should see sector numbers flying by. Stop this command with a CTRL-z.

Now run fdisk

$ fdisk 3

In this command, you will be able to modify the partition table, usually putting a single type 7 partition using all the available cylinders. The last thing you need to do then is save the results. I’m not sure, but you might also be able to put the boot loader on disk with this command. If not, the ‘boot’ command will certainly allow you to do this, when we get to it. You must also mark the partition as the boot partition.

After leave the fdisk command, you should now remount the driver. The elegant way is as follows:

$ mount disk 3 d=3 pa=7 +v or

$ mount disk 3 d=3 pa=qnx +v

This time, only expect one return code of 0.

Now initialize the hard drive partition.

$ dinit 3 +h

You will need to confirm this.

Now copy all the files from your floppy to the hard drive

$ backup 1:/ 3:/ +a -p

That saves a lot of time over using mkdir and cp.

Now be brave and enter the following three commands

$ search 3 1
$ cd /
$ ls

This changes the search order so that commands are searched for on the hard drive first, changes your current directory to the root of the hard drive, and runs the ls command. So you should see any files or directories on the hard drive. If successful, you have loaded your files on the hard drive. Now one last step, run the boot command

$ boot disk 3 3:/netboot/os.2.21 d=3:/drivers/disk.atc +qnxloader

A few words about this. The driver you load, must be the same driver that you loaded from the floppy. The name of the boot file is not correct above, so you will have to check for the right name. I’m not sure if the +qnxloader parameter is correct, but you can check this the usual way:

$ boot ?

At this point, it’s time to sink or swim. Reboot the system by either entering CTRL-ALT-SHIFT DEL,
hitting the reset button on your computer, or cycling the power.

If you get a login when this is done, you have done well. The last step would be to copy all the other files from your working hard drive. There are a few different ways that this might be done.

  1. If you have two network cards installed, one in each machine, it is fairly easy. I’m sure you don’t, so I will go on.

  2. Backup the files from your hard drive using tbackup with a tape drive, and then restore them to the new system. Of course you would need tbackup on the new system, which you can copy over on either the original boot floppy, or a separate one. It’s unlikely you have a working tape drive, so I will go on.

  3. If you have a parallel port Iomega Zip drive, and a driver from me (A shameless advertisement), you can fairly easily, mount the driver on the old system, backup files to a 100MB disk, and restore them to the new system. Since I don’t think you are my customer, I’ll go on.

  4. You could now take the hard drive from the old system, and put it in the new system as a 2ndary hard drive, mount it, and copy the files over with backup. This would take some care. If on the same controller, you’d have to set the old hard drive to the slave setting. If your system has two controllers, you can do it, but it is a lot more complicated. You need to mount a 2nd disk.atc driver, but it will need a few parameters, the I/O base and interrupt number, and the exact same driver file will not work. You need one modified by one byte for it to work.

  5. You can painstaking copy each file from the old system to a floppy, and then back. In the early DOS days, this was known as the floppy shuffle.

That’s about it. Some basic words of advice. This is not Linux. You will not find a lot of answers to your questions by googling them. You are unlikely to find some company in Bangalore eager to get your business at cut rate prices. There are probably less than 1/2 a dozen people left in the world who can and will help you out with this. Even the original authors may have forgotten how to keep one of these systems going. Support ended for this system about 20 years ago. You should be seriously thinking of how to extricate yourself from the need for this system as soon as possible. If there is a financial imbalance here, for example, you use this system that would cost hundreds of thousands to replace, you could hire one of those experts, but expect a very high hourly rate. I think Mario might still do this, but I’m not sure. There’s also Ken ? (Oh I’m so senile) up in Oregon, or is it Washington. He’s probably monitoring this anyway. Jeff Schaefer could probably handle this too, but he works for QNX from LA, and you really don’t want to know what it would cost to hire him. I’m teaching again, so I have limited time. I could load a system if you sent it to me, but I wouldn’t be able to travel until June.

This is about 3/4 an hour of my time here, and since I’m up with insomnia at 5AM, it is gratis today.

Good luck.

maschoen ,
Thank you onece more for your information.

It’s right I’m a complete newbee on qnx, I work with the machine for over 10 years now but never had to look “inside” to any software.
It’s nice you gave me the names of the experts, a little aditional problem occurs here, I’m in Holland not in the USA.

I hope with your discription above I’ll manage to get the thing going…

Just started to read out the commands with ? and building me an (kind of) overview of the available commands

I’ll come back to let you know how I’m doing…Will take a few days maybee.

Best regards,

Theo

Hmm…

Looks like the floppy drive is dead (or nearly).
execute the format is no problem, but on dinit it gives error like the disk isn.t formated.
So first I have to replace that drive…
I’ll be back

Greets,
Theo