Damaged QNX Partition Loader and Boot Loader

Hi,

We have developed a software for a remote monitoring and control of data
acquisition systems. The software is developed using QNX 4.25, Watcom ‘C’
compiler v10.6 and PhAB. The software runs on a 233MHz industrial computer.
It monitors and controls 60 remote data acquisition systems connected to the
computer on serial link We have developed the serial communication programs,
programs for data storage and retrieval, report generation, graphical
representation of the data on screen.

The user never resets the computer system. The software runs continuously
without a restart. On this industrial grade setup, the mains supply to the
computer failed and got restored immediately. The user observed that system
could not boot to QNX. They reported this problem to us.

When we checked up the hard disk, we could note that the file system and the
data stored on the disk was OK. The hard disk was not booting to QNX. We
could check this by connecting the harddisks in master/slave mode(normall
functioning QNX HDD used for booting and accessing the file system of hard
disk drive with damaged loader) .

We had to restore partition loader as well as boot loader of QNX.

We had not expected such a failure even with QNX RTOS…

We could restore the normal disk functioning and could recover the data but
could not figure out the reason for such an occurrence. Does anyone know the
answer? Has anybody come across similar problems?

thanks in advance,
Krupa

regardless of what OS is running, if you cut power without any controlled
shutdown sequence you can get hit with a number of strange problems.

most of the modern harddrives have tons of firmware onboard for controlling
caching and writing/reading to the disk. and the OS driver talks at a
higher level to this firmware. ide is like this, scsi even more so.

i’ve seen some systems in the past that could start writing to incorrect
blocks ( headcylsector/cylinders) … in your case you could have had
the block 0 accidentally written to by the firmware on power down.

i think the only reliable ways to resolve this problem are:

  • use a ups and control a shutdown
  • make sure you control shutdown in software (thru shutdown command)

Krupa <krupah@hotmail.com> wrote:

Hi,

We have developed a software for a remote monitoring and control of data
acquisition systems. The software is developed using QNX 4.25, Watcom ‘C’
compiler v10.6 and PhAB. The software runs on a 233MHz industrial computer.
It monitors and controls 60 remote data acquisition systems connected to the
computer on serial link We have developed the serial communication programs,
programs for data storage and retrieval, report generation, graphical
representation of the data on screen.

The user never resets the computer system. The software runs continuously
without a restart. On this industrial grade setup, the mains supply to the
computer failed and got restored immediately. The user observed that system
could not boot to QNX. They reported this problem to us.

When we checked up the hard disk, we could note that the file system and the
data stored on the disk was OK. The hard disk was not booting to QNX. We
could check this by connecting the harddisks in master/slave mode(normall
functioning QNX HDD used for booting and accessing the file system of hard
disk drive with damaged loader) .

We had to restore partition loader as well as boot loader of QNX.

We had not expected such a failure even with QNX RTOS…

We could restore the normal disk functioning and could recover the data but
could not figure out the reason for such an occurrence. Does anyone know the
answer? Has anybody come across similar problems?

thanks in advance,
Krupa


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

Has anybody come across similar problems?

Just yesterday I encountered the problem with QNX4.24.
After restart, master boot record destroyed.
But there is also one explantion possible:

if customers work with DOS diskettes under QNX and the BIOS
boots at first from floppy, they, may be, had DOS disk with
virus inserted in machine during power failure. Virus takes
care of DOS to boot normaly, but not about QNX.

Andy

no dirrectly related to the reported problem but just a little
warning about using multi-partitioned systems with win2k.

when i worked with drives partitioned under bsd* UFS i.e.
drive with master boot record (MBR) incompatible
with DOS i found a “little” strange win2k behavour.

when win2k finds disk drive with non-mbr first sector,
it writes afair four bytes mark at the centre of sector
without any user notifications. related to bsd Disk Label
(some kind of analog of MBR) this win2k mark destroys
check sum saved in DiskLabel and it leads to some troubles
when trying to access it later from bsd.

related to qnx it support non-mbr disk partitioning i.e.
when you have no mbr and whole hard drive is partitioned
as one large qfs partition. this is usefull when you don’t need
several partitions but only one for qnx. beware that when you
boot at win2k and if it finds such disk it will modify the
first sector → modifies qfs.

my guesses are that when win2k fidns non-mbr formatted
disk i.e. with unknown partition table layout it treats it as
“not formatted” and marks due to some internal reasons
probably as “unformatted” not worring about that it may be
formatted to some non-standart way and as a result
it can destroy some data on this disk.

conclusion: avoid connection of disk formatted with standarts
differ from mbr (disk label from bsd, non partitioned qfs and
so on) to win2k. even don’t let win2k to touch such dsks !
you are really risking to lose your data. modifications are small
but let it playing with first sector is a really bad idea.

btw win95/98 works fine this case. really don’t remember
about winnt but afair i found this trouble only after win2k
installation instead of crashed nt 4.0.

hope it can help.

// wbr

“Andrej Lucny” <andy@nod10.mstep> wrote in message
news:97frln$677$1@charon.mstep-hdo.sk

Has anybody come across similar problems?

Just yesterday I encountered the problem with QNX4.24.
After restart, master boot record destroyed.
But there is also one explantion possible:

if customers work with DOS diskettes under QNX and the BIOS
boots at first from floppy, they, may be, had DOS disk with
virus inserted in machine during power failure. Virus takes
care of DOS to boot normaly, but not about QNX.

Andy


Ian Zagorskih
Novosoft CyBearNet Department
Custom software development and web design since 1992
E-mail: ianzag@novosoft.ru
Phone: +7 (3832) 39-72-60, 39-72-61
Fax: +7 (3832) 39-63-58
For more visit www.novosoft-us.com