QNX hard drive copying in Linux

Hello QNX Experts,

I’m inexperienced with QNX and and only slightly more experienced with
Linux and my job is to maintain an industrial computer running QNX. I
think it’s QNX 4 -as a guess- but I’m not experienced enough to even
know that.

Firstly a bit about my hardware setup. The industrial computer is 2
computers in 1 - there is a one complete spare in the same case. Each
computer has a PCMCIA slot with a PC card, 5 gig hard disk inside.
These hard disks are product number MK5002MPL and made by Toshiba.
Since one hard disk failed, only one computer is functioning and I
have purchased a blank replacement MK5002MPL.

I need to make an exact copy of the functioning hard drive with 2 QNX
partitions to the spare hard drive. I do not have the installation
disks for QNX but I do have a functioning zip disk and zip disk
backups of the hard disk.

The 2nd partition on the hard disk is a service partition where I can
make a zip disk backup of the drive and restore from it. I booted
from this service partition from the functioning drive and then
changed the hard disk in the PC card slot to the blank one but the
restore wouldn’t work this way. The restore program complains that
the original hard disk has been removed.

So then I put both hard disks in a Windows 98 machine and tried using
Drive Image 4.0. Unfortunately the hard disk with QNX won’t even show
up in Windows and Drive Image has to run in DOS and from DOS none of
the removeable hard disks are visible.

Next up was linux. I typed

ls /proc/ide

and got

drivers hda hdc hde hdg
[color=blue:8880780e32]ide0 ide1 ide2 ide3
[/color:8880780e32]piix

The blank hard disk is hde

#./fdisk -l /dev/hde

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde1 1 649 4906408+ b Win95 FAT32

The disk with QNX is hdg

#./fdisk -l /dev/hdg

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde3 625 649 189000 b QNX4.x 3rd part
/dev/hde4 * 1 624 4717408+ b QNX4.x

But I’m unable to mount the QNX filesystem

#mount /dev/hdg4 /mnt/n201
mount: fs type qnx4fs not supported by kernel

But I’m not sure I need to mount the file system in order to image the
hard disk. Next I thought I’d try either “dd” (never used it before)
or Partimage on either the whole hard disk or just the service
partition so I can restore from the zip disk. Or, if I need to mount
the partition, I’ll look at how to upgrade my kernel to support QNX.

I’m running Redhat Linux 7.1 kernel version 2.4.2-2 (I think)

Can someone please help me?

Cheers,
Ben

Hi…

jookie wrote:

Hello QNX Experts,

I’m inexperienced with QNX and and only slightly more experienced with
Linux and my job is to maintain an industrial computer running QNX. I
think it’s QNX 4 -as a guess- but I’m not experienced enough to even
know that.

open a terminal and type:

uname -a

that will tell you what OS you are running

I’m running Redhat Linux 7.1 kernel version 2.4.2-2 (I think)

open a terminal and (again) type:

uname -a


Regards…

Miguel.


Cheers,
Ben

Thanks Miguel, the results from uname -a are

QNX 201 0 425 PCI 32

What version is that?

jookie <ben.joukhadar@amcor.com-dot-au.no-spam.invalid> wrote:

Next up was linux. I typed

ls /proc/ide

and got

drivers hda hdc hde hdg
[color=blue:8880780e32]ide0 ide1 ide2 ide3
[/color:8880780e32]piix

The blank hard disk is hde

#./fdisk -l /dev/hde

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde1 1 649 4906408+ b Win95 FAT32

The disk with QNX is hdg

#./fdisk -l /dev/hdg

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde3 625 649 189000 b QNX4.x 3rd part
/dev/hde4 * 1 624 4717408+ b QNX4.x

Are you sure it is /dev/hde3 and /dev/hde4? should be /dev/hdg3 and 4.
also, the “Id” column says b , which doesn’t look right to me.

But I’m unable to mount the QNX filesystem

#mount /dev/hdg4 /mnt/n201
mount: fs type qnx4fs not supported by kernel

You need to compile the qnx4fs module yourself, but in your case,
a simple “dd” should do the job.

Frank

Hi…

It seems that you have version 4.25 with PCI bus (and 32 bit
architecture?). I am not sure what the 201 means, but others will be
able to tell. It has been a long time since I used QNX 4.25.

Regards…

Miguel.


jookie wrote:

Thanks Miguel, the results from uname -a are

QNX 201 0 425 PCI 32

What version is that?

Miguel Simon <simon@ou.edu> wrote:

Hi…

It seems that you have version 4.25 with PCI bus (and 32 bit

It runs 4.25O (O like October).

architecture?). I am not sure what the 201 means, but others will be

That’s the node number.

able to tell. It has been a long time since I used QNX 4.25.

Regards…

Miguel.


jookie wrote:
Thanks Miguel, the results from uname -a are

QNX 201 0 425 PCI 32

What version is that?

used linux boot disk, dd when done the new drive will not boot. any
Ideas would be greatly app. This was a qnx2 OS.

tbell <tbell@frycomm-dot-com.no-spam.invalid> wrote:

used linux boot disk, dd when done the new drive will not boot. any
Ideas would be greatly app. This was a qnx2 OS.

  1. the two disks have to be identical.
  2. you have to dd the whole disk, not the partition by partition.

If you can insert both PCMCIA disks into a Windows machine (for example a
laptop with 2 PCMCIA slots) then Norton Ghost will do the job for you. For
some reason Ghost 9.0 can copy only partitions one-by-one (but it can also
copy the MBR). The Ghost 2003 used to copy entire disks too (and I believe
the retail box contains both CDs).

It does not care what OS you have on those disks/partitions. I used it to
copy my disk that had multiboot Windows and QNX partitions. Worked like a
charm.

– igor

“jookie” <ben.joukhadar@amcor.com-dot-au.no-spam.invalid> wrote in message
news:d0o2pb$e3u$1@inn.qnx.com

Hello QNX Experts,

I’m inexperienced with QNX and and only slightly more experienced with
Linux and my job is to maintain an industrial computer running QNX. I
think it’s QNX 4 -as a guess- but I’m not experienced enough to even
know that.

Firstly a bit about my hardware setup. The industrial computer is 2
computers in 1 - there is a one complete spare in the same case. Each
computer has a PCMCIA slot with a PC card, 5 gig hard disk inside.
These hard disks are product number MK5002MPL and made by Toshiba.
Since one hard disk failed, only one computer is functioning and I
have purchased a blank replacement MK5002MPL.

I need to make an exact copy of the functioning hard drive with 2 QNX
partitions to the spare hard drive. I do not have the installation
disks for QNX but I do have a functioning zip disk and zip disk
backups of the hard disk.

The 2nd partition on the hard disk is a service partition where I can
make a zip disk backup of the drive and restore from it. I booted
from this service partition from the functioning drive and then
changed the hard disk in the PC card slot to the blank one but the
restore wouldn’t work this way. The restore program complains that
the original hard disk has been removed.

So then I put both hard disks in a Windows 98 machine and tried using
Drive Image 4.0. Unfortunately the hard disk with QNX won’t even show
up in Windows and Drive Image has to run in DOS and from DOS none of
the removeable hard disks are visible.

Next up was linux. I typed

ls /proc/ide

and got

drivers hda hdc hde hdg
[color=blue:8880780e32]ide0 ide1 ide2 ide3
[/color:8880780e32]piix

The blank hard disk is hde

#./fdisk -l /dev/hde

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde1 1 649 4906408+ b Win95 FAT32

The disk with QNX is hdg

#./fdisk -l /dev/hdg

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde3 625 649 189000 b QNX4.x 3rd part
/dev/hde4 * 1 624 4717408+ b QNX4.x

But I’m unable to mount the QNX filesystem

#mount /dev/hdg4 /mnt/n201
mount: fs type qnx4fs not supported by kernel

But I’m not sure I need to mount the file system in order to image the
hard disk. Next I thought I’d try either “dd” (never used it before)
or Partimage on either the whole hard disk or just the service
partition so I can restore from the zip disk. Or, if I need to mount
the partition, I’ll look at how to upgrade my kernel to support QNX.

I’m running Redhat Linux 7.1 kernel version 2.4.2-2 (I think)

Can someone please help me?

Cheers,
Ben

Thanks to everyone for your advice.

Frank Liuwrote:
jookie <> ben.joukhadar@amcor.com-dot-au.no-spam.invalid> > wrote:

The disk with QNX is hdg

#./fdisk -l /dev/hdg

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde3 625 649 189000 b QNX4.x 3rd part
/dev/hde4 * 1 624 4717408+ b QNX4.x

Are you sure it is /dev/hde3 and /dev/hde4? should be /dev/hdg3 and

also, the “Id” column says b , which doesn’t look right to me.

But I’m unable to mount the QNX filesystem

#mount /dev/hdg4 /mnt/n201
mount: fs type qnx4fs not supported by kernel

You need to compile the qnx4fs module yourself, but in your case,

a simple “dd” should do the job.

Frank[/quote:a6d98ab839]

Yep that’s right - the other partitions are hdg3 and hd4, I missed
changing those when I copied and pasted. As for the ‘b’ I’m not too
sure if that’s correct now.

Since the dd command requires an input file and an output file, how
can I supply it with these file names if the partitions are not
mounted? Would you mind supplying example of the command I should
use?

Cheers,
Ben

jookiewrote:
Thanks to everyone for your advice.

Frank Liuwrote:
jookie <> ben.joukhadar@amcor.com-dot-au.no-spam.invalid

wrote:

The disk with QNX is hdg

#./fdisk -l /dev/hdg

Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde3 625 649 189000 b QNX4.x 3rd part
/dev/hde4 * 1 624 4717408+ b QNX4.x

Are you sure it is /dev/hde3 and /dev/hde4? should be /dev/hdg3 and

also, the “Id” column says b , which doesnI’m pretty sure I’ve fully
worked out how to make a successful copy. I’ve now installed the SuSE
9.2 version of linux which I’m highly impressed with. It can read and
write to the QNX4 partitions on the PCMCIA hard disks and it
confirmed I was on the right track.

Then I simply typed dd -b512 if=/dev/hde of=/dev/hdg

I accidentally aborted the copy at about half way because I wasn’t
sure it was doing anything after an hour but it all appears to have
been working.

In Windows 2000 with Ghost v9.0 the QNX hard disk was not recognised
by windows and so copying wasn’t an option.

Thanks for the replies,
Ben