Skip navigation.
Home
The QNX Community Portal

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

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

For the old QNX2 and QNX4 RTOS

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

Postby irock85 » Tue Jan 27, 2009 8:39 pm

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.
irock85
New Member
 
Posts: 4
Joined: Tue Jan 27, 2009 8:31 pm

RE: QNX 3.21 on failing hard drive - image won

Postby juanplacco » Tue Jan 27, 2009 11:48 pm

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?
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

Postby Tim » Wed Jan 28, 2009 2:39 pm

irock85,

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.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby WhiteRabbits » Thu Jan 29, 2009 9:28 pm

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.

Helge
WhiteRabbits
Senior Member
 
Posts: 196
Joined: Sun Aug 03, 2003 9:20 pm
Location: Germany

Postby Tim » Fri Jan 30, 2009 2:40 pm

Helge,

WhiteRabbits wrote:hey Tim, where was that museum again where you located a 2 gb hard drive last time ... ?


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.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby mario » Fri Jan 30, 2009 3:43 pm

Some SSD works.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby irock85 » Tue Feb 10, 2009 10:11 pm

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.
irock85
New Member
 
Posts: 4
Joined: Tue Jan 27, 2009 8:31 pm

Postby juanplacco » Tue Feb 10, 2009 10:32 pm

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.
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

Postby juanplacco » Tue Feb 10, 2009 10:34 pm

BTW, be careful with fdisk... don't loose your working system! :D
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

Postby Tim » Wed Feb 11, 2009 3:01 pm

Irock85,

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.

Tim

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.
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby maschoen » Thu Feb 12, 2009 4:40 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Postby Tim » Thu Feb 12, 2009 6:22 pm

Mitchell,

maschoen wrote: 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.


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?

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby maschoen » Thu Feb 12, 2009 11:08 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Postby irock85 » Wed Feb 25, 2009 4:01 am

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.
irock85
New Member
 
Posts: 4
Joined: Tue Jan 27, 2009 8:31 pm

Postby mario » Wed Feb 25, 2009 12:18 pm

print invoices as in printer? VMWare doesn't support a parallel port.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Next

Return to QNX2 and QNX4

Who is online

Users browsing this forum: Bing [Bot] and 1 guest