Secondary IDE booting...one more try, please!

I need to find out how to boot from a device on the secondary IDE channel.
In particular, this device is a CompactFlash disk presenting an IDE
interface. The system BIOS supports booting from this device. The QNX
installation completed flawlessly, however when trying to boot from it, the
bootloader displays the “Press …” message, then displays “.”
ad-nauseum without actually booting. What I think this means is that the
BIOS correctly loaded the IPL (bootloader), but the IPL is designed to only
try the primary IDE, instead of trying it, then failing, then trying the
secondary.

  1. Is this what is happening?
  2. How can I make it boot from the secondary?

Any help would be greatly appreciated. I just found out from QNX that there
is no single incident support packages other than the 10K premium package.
If there were, I’d pay, that’s how desperate I am…

John

John Bowen <John.Bowen@grc.nasa.gov> wrote:

I need to find out how to boot from a device on the secondary IDE channel.
In particular, this device is a CompactFlash disk presenting an IDE
interface. The system BIOS supports booting from this device. The QNX
installation completed flawlessly, however when trying to boot from it, the
bootloader displays the “Press …” message, then displays “.”
ad-nauseum without actually booting. What I think this means is that the
BIOS correctly loaded the IPL (bootloader), but the IPL is designed to only
try the primary IDE, instead of trying it, then failing, then trying the
secondary.

  1. Is this what is happening?

Hey come on. You’re from NASA. You think I’m going to argue?

  1. How can I make it boot from the secondary?

There is a magic place in the boot sector that determines which drive
the loader boots from. If you can manage to spatch the boot sector of
the CompactFlash disk, and some kind onlooker provides the neccessary
magic information on the offset into the boot block at which the magic
byte resides, you’ll be in business.

Oh wait a minute…

OK… if you can spatch the boot block, look toward the end (512 byte)
and you should see the string ``Disk Error’’. Just before that, you
should see the byte value 0x80. That 0x80 when changed to 0x81 should
boot from the secondary drive.

The comments in the boot loader code show that ``Plug and Play’’ BIOS’es are
supposed to leave the drive that the boot sector was loaded from (i.e. 0x80
or 0x81) in the dl register when they jump into the boot sector.

Any help would be greatly appreciated. I just found out from QNX that there
is no single incident support packages other than the 10K premium package.
If there were, I’d pay, that’s how desperate I am…

I think there is consideration being given to additional support options.

<pete@qnx.com> wrote in message news:9bgahs$hve$1@inn.qnx.com

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:
I need to find out how to boot from a device on the secondary IDE
channel.
In particular, this device is a CompactFlash disk presenting an IDE
interface. The system BIOS supports booting from this device. The QNX
installation completed flawlessly, however when trying to boot from it,
the
bootloader displays the “Press …” message, then displays “.”
ad-nauseum without actually booting. What I think this means is that
the
BIOS correctly loaded the IPL (bootloader), but the IPL is designed to
only
try the primary IDE, instead of trying it, then failing, then trying the
secondary.

  1. Is this what is happening?

Hey come on. You’re from NASA. You think I’m going to argue?

I may work at NASA, but I’m no rocket scientist. I’m just an ordinary RTP

newbie…By the way, was I right? It would do tons for my self-esteem :wink:

  1. How can I make it boot from the secondary?

There is a magic place in the boot sector that determines which drive
the loader boots from. If you can manage to spatch the boot sector of
the CompactFlash disk, and some kind onlooker provides the neccessary
magic information on the offset into the boot block at which the magic
byte resides, you’ll be in business.

Oh wait a minute…

OK… if you can spatch the boot block, look toward the end (512 byte)
and you should see the string ``Disk Error’’. Just before that, you
should see the byte value 0x80. That 0x80 when changed to 0x81 should
boot from the secondary drive.

Would it be easier to get a copy of the bootloader in a file, modify it, and

use fdisk to write it to the CompactFlash? Where could I find it?

The comments in the boot loader code show that ``Plug and Play’’ BIOS’es
are
supposed to leave the drive that the boot sector was loaded from (i.e.
0x80
or 0x81) in the dl register when they jump into the boot sector.

Any help would be greatly appreciated. I just found out from QNX that
there
is no single incident support packages other than the 10K premium
package.
If there were, I’d pay, that’s how desperate I am…

I think there is consideration being given to additional support options.


They should, I’d buy a couple incidents to keep in my back pocket for

occasions just like this.

John Bowen <John.Bowen@grc.nasa.gov> wrote:

  1. Is this what is happening?

Hey come on. You’re from NASA. You think I’m going to argue?

I may work at NASA, but I’m no rocket scientist. I’m just an ordinary RTP
newbie…By the way, was I right? It would do tons for my self-esteem > :wink:

Yes, although the boot loader is supposed to receive the drive number you
booted from from the BIOS.

The problem I think is that BIOS’s don’t use this mechanism. I think they
internally make all the BIOS calls that do disk stuff swap the meaning
of the drive numbers so that the Flash drive seems to be drive 0 if you
are using the BIOS calls. If you deal directly with the IDE interface
though, the drive numbers haven’t changed.

Would it be easier to get a copy of the bootloader in a file, modify it, and
use fdisk to write it to the CompactFlash? Where could I find it?

I think it’s built right into `fdisk’. It’s only 512 bytes.

I think there is consideration being given to additional support options.


They should, I’d buy a couple incidents to keep in my back pocket for
occasions just like this.

I’ll pass that along.

<pete@qnx.com> wrote in message news:9bgahs$hve$1@inn.qnx.com

John Bowen <> John.Bowen@grc.nasa.gov> > wrote:
I need to find out how to boot from a device on the secondary IDE
channel.
In particular, this device is a CompactFlash disk presenting an IDE
interface. The system BIOS supports booting from this device. The QNX
installation completed flawlessly, however when trying to boot from it,
the
bootloader displays the “Press …” message, then displays “.”
ad-nauseum without actually booting. What I think this means is that
the
BIOS correctly loaded the IPL (bootloader), but the IPL is designed to
only
try the primary IDE, instead of trying it, then failing, then trying the
secondary.

  1. Is this what is happening?

Hey come on. You’re from NASA. You think I’m going to argue?

  1. How can I make it boot from the secondary?

There is a magic place in the boot sector that determines which drive
the loader boots from. If you can manage to spatch the boot sector of
the CompactFlash disk, and some kind onlooker provides the neccessary
magic information on the offset into the boot block at which the magic
byte resides, you’ll be in business.

Oh wait a minute…

OK… if you can spatch the boot block, look toward the end (512 byte)
and you should see the string ``Disk Error’’. Just before that, you
should see the byte value 0x80. That 0x80 when changed to 0x81 should
boot from the secondary drive.

I tried running spatch on the flash disk but I don’t see anything that

resembles “Disk Error”, using “spatch /dev/hd0t77” and “spatch /dev/hd0”.

The comments in the boot loader code show that ``Plug and Play’’ BIOS’es
are
supposed to leave the drive that the boot sector was loaded from (i.e.
0x80
or 0x81) in the dl register when they jump into the boot sector.

Any help would be greatly appreciated. I just found out from QNX that
there
is no single incident support packages other than the 10K premium
package.
If there were, I’d pay, that’s how desperate I am…

I think there is consideration being given to additional support options.

I got the system working, for the record, here is how I did it:

  1. System configuration: Embedded 586 class board with 64M RAM, 192MB
    CompactFlash disk, IDE CDROM drive, floppy, keyboard, mouse, RTL8139 10BaseT
    enet.
  2. Installed QNX RTP from ISO CDROM image (6.0A release) onto CompactFlash
    as IDE hard disk. Followed installation instructions to delete any existing
    partitions and create a single 192MB QNX partition on it.
  3. Completed installation.
  4. Shutdown system, rebooted from QNX4 floppy (image located at
    http://www.qnx.com/~emuis)
  5. Started Fsys.eide from command prompt.
  6. mounted partition using “mount -p /dev/hd0 /dev/hd0t79 /cf”
  7. Dinit’d system with “dinit -bh /dev/hd0t79”. This loads a new boot loader
    only, it doesn’t trash the partition.
  8. Removed floppy, rebooted, bingo!
  9. Removed floppy drive, CDROM drive. Now diskless system. Soon to be
    headless system.

This problem was entirely caused by the booting bugs of Release A.

“John Bowen” <John.Bowen@grc.nasa.gov> wrote in message
news:9bfcqj$163$1@inn.qnx.com

I need to find out how to boot from a device on the secondary IDE channel.
In particular, this device is a CompactFlash disk presenting an IDE
interface. The system BIOS supports booting from this device. The QNX
installation completed flawlessly, however when trying to boot from it,
the
bootloader displays the “Press …” message, then displays “.”
ad-nauseum without actually booting. What I think this means is that the
BIOS correctly loaded the IPL (bootloader), but the IPL is designed to
only
try the primary IDE, instead of trying it, then failing, then trying the
secondary.

  1. Is this what is happening?
  2. How can I make it boot from the secondary?

Any help would be greatly appreciated. I just found out from QNX that
there
is no single incident support packages other than the 10K premium package.
If there were, I’d pay, that’s how desperate I am…

John