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.
-
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.
-
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.
-
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.
-
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.
-
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.