Problems booting IDE/Flash card

We have a 96MBytes flash card which appears to QNX as an IDE drive.
When I attach this as a slave drive in a system containing a hard disk,
I can initialise and populate the drive with files with no problem.
When I reboot, leaving the flsah as slave, I am offered a choice of
booting from hd0 or hd1. When I select hd1, the system boots and I can
login; everything looks good.

However if I remove the hard disk and set the flash as master, the boot
fails (using LBA or CHS), hanging at “Verifying DMI Pool Data …”
(whatever that means)

I am performing the following steps to initialise the flash disk. The
idea is to get the base QNX system installed without using a CDROM drive
(which is physically difficult to attach)

fdisk /dev/hd1 delete -s 1
… ditto for 2-4
fdisk /dev/hd1 add -b
mount -e /dev/hd1
dinit -hRf /boot/fs/qnxbase.ifs /dev/hd1t77
mount -e /dev/hd1
mount /dev/hd1t77 /flash
cd /flash
mkdir -p boot/fs etc/system/config etc/rc.d
cp /boot/fs/* boot/fs
touch etc/system/config/nophoton
cd
umount /flash

If I reconnect the hard disk as master, flash as slave, and boot,
everything is as described above, so nothing got wiped or lost.

Thanks for any help
William Morris



Here’s a file listing from the flash disk

find . -type f | xargs ls -l

-rw------- 1 root root 0 Mar 06 16:53 ./.altboot
-r–r–r-- 1 root root 23177 Mar 06 16:53 ./.bitmap
-rw------- 1 root root 727052 Mar 06 16:53 ./.boot
-r–r–r-- 1 root root 0 Mar 06 16:53 ./.diskroot
-r–r–r-- 1 root root 8192 Mar 06 16:53 ./.inodes
-rw-rw-rw- 1 root root 727052 Feb 06 16:31 ./boot/fs/qnxbase.ifs
-rw-rw-rw- 1 root root 53734912 Feb 06 16:31 ./boot/fs/qnxbase.qfs
-rw-rw-rw- 1 root root 727052 Feb 06 16:31 ./boot/fs/qnxbasedma.ifs
-rw-rw-rw- 1 root root 729096 Feb 06 16:31 ./boot/fs/qnxbasesmp.ifs

Flash type is Compact Flash 96MB
Here is the slog info when booted from the hard disk

sloginfo

Time Sev Major Minor Args
Mar 06 17:09:43 2 19 0 eide_identify_devices: Intel 82371AB
vid 8086, did 7111, class 10180 rev 1, busno 0, dfunc 39
Mar 06 17:09:43 2 19 0 eide_identify_devices: cmd_addr 1f0,
cntl_addr 3f4, irq e, chnl 0, udma 2, mdma 2, sdma 0, pio 4
Mar 06 17:09:43 2 19 0 eide_identify_devices: probing dev 0 50
Mar 06 17:09:43 2 19 0 eide_identify_devices: probing dev 1 50
Mar 06 17:09:43 2 19 0 eide_display_devices: FUJITSU MHR2020A
tid 0, cable 40, max udma 5, cur udma 0, max mdma 2, cur mdma 2, max
sdma -1, cur sdma -1, pio 4, mblk 16
Mar 06 17:09:43 2 19 0 eide_display_devices: Hitachi Flash Ca
tid 1, cable 40, max udma -1, cur udma -1, max mdma -1, cur mdma -1, max
sdma -1, cur sdma -1, pio 0, mblk 1
Mar 06 17:09:43 2 19 0 eide_identify_devices: Intel 82371AB
vid 8086, did 7111, class 10180 rev 1, busno 0, dfunc 39
Mar 06 17:09:43 2 19 0 eide_identify_devices: cmd_addr 170,
cntl_addr 374, irq f, chnl 1, udma 2, mdma 2, sdma 0, pio 4
Mar 06 17:09:43 2 19 0 eide_identify_devices: probing dev 0 ff
Mar 06 17:09:43 2 19 0 eide_identify_devices: probing dev 1 ff
Mar 06 17:09:43 2 19 0 eide_init_devices: FUJITSU MHR2020A
path 0, tid 0, udma -1, mdma -1, sdma -1, pio 4, mblk 16
Mar 06 17:09:43 2 19 0 eide_init_devices: Hitachi Flash Ca
path 0, tid 1, udma -1, mdma -1, sdma -1, pio 0, mblk 1

… scsi sense removed

MMar 06 17:10:06 5 3 400 [8] fs-pkg built: May 2 2002 22:52:20
Mar 06 17:10:12 5 3 400 Package config file
[/etc/system/package/packages]
Mar 06 17:10:14 5 6 200 Installing /dev/par port 378
Mar 06 17:10:14 3 14 0 Using pseudo random generator. See
“random” option

William Morris <william@bangel.demon.co.uk> wrote:

We have a 96MBytes flash card which appears to QNX as an IDE drive.
When I attach this as a slave drive in a system containing a hard disk,
I can initialise and populate the drive with files with no problem.
When I reboot, leaving the flsah as slave, I am offered a choice of
booting from hd0 or hd1. When I select hd1, the system boots and I can
login; everything looks good.

However if I remove the hard disk and set the flash as master, the boot
fails (using LBA or CHS), hanging at “Verifying DMI Pool Data …”
(whatever that means)

That’s a BIOS message, doesn’t even look likes its gotten to our stuff.

I am performing the following steps to initialise the flash disk. The
idea is to get the base QNX system installed without using a CDROM drive
(which is physically difficult to attach)

fdisk /dev/hd1 delete -s 1
… ditto for 2-4
fdisk /dev/hd1 add -b

You might be missing:
fdisk /dev/hd1 loader

to copy the primary loader to the disk. This may be what the BIOS is
searching for, and not finding, so not being able to boot.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Gibbs <dagibbs@qnx.com> wrote:

You might be missing:
fdisk /dev/hd1 loader

to copy the primary loader to the disk. This may be what the BIOS is
searching for, and not finding, so not being able to boot.

On an earlier try I used fdisk interactively and included the loader, I
think with the same effect. Having said that, I am not absolutely sure
that it hung at the same place.

When dinit -hRf… runs, it reports that it is copying something that
sounds like a loader to the disk. I am not at work now so I cannot
check that my memory is not foolong me. Perhaps this is just the
partition loader; the fdsik command will load the MBR. (Am I way off
the mark here?) I will try it on Monday and report back.

Thanks for the quick reply.
Regards

William Morris
william@bangel.demon.co.uk

In article <b48lkk$boo$1@inn.qnx.com>, wrm@bangel.demon.co.uk says…

David Gibbs <> dagibbs@qnx.com> > wrote:

You might be missing:
fdisk /dev/hd1 loader

to copy the primary loader to the disk. This may be what the BIOS is
searching for, and not finding, so not being able to boot.

On an earlier try I used fdisk interactively and included the loader, I
think with the same effect. Having said that, I am not absolutely sure
that it hung at the same place.

When dinit -hRf… runs, it reports that it is copying something that
sounds like a loader to the disk. I am not at work now so I cannot
check that my memory is not foolong me. Perhaps this is just the
partition loader; the fdsik command will load the MBR. (Am I way off
the mark here?) I will try it on Monday and report back.

fdisk is used to place primary loader to MBR. You were suggested to check MBR if there is primary
loader in MBR. If there is no primary loader, BIOS could say error message like you describe
originally. dinit (dloader) is used to place secondary loader to bootsector of partition. If second
loader is missing you’ll get error message from primary loader, not from BIOS.

Good luck,
Eduard.

Thanks for the quick reply.
Regards

William Morris <wrm@bangel.demon.co.uk> wrote:

David Gibbs <> dagibbs@qnx.com> > wrote:

You might be missing:
fdisk /dev/hd1 loader

to copy the primary loader to the disk. This may be what the BIOS is
searching for, and not finding, so not being able to boot.

On an earlier try I used fdisk interactively and included the loader, I
think with the same effect. Having said that, I am not absolutely sure
that it hung at the same place.

You should only need the fdisk the once – but you hadn’t included it in
your list, which is why I said you “might” be missing it.

When dinit -hRf… runs, it reports that it is copying something that
sounds like a loader to the disk. I am not at work now so I cannot
check that my memory is not foolong me. Perhaps this is just the
partition loader; the fdsik command will load the MBR. (Am I way off
the mark here?) I will try it on Monday and report back.

You’re on the mark here.

There are two loader stages, fdisk does the first (MBR), dinit does
the second (on the partition).

While you’re booting, the one that fdisk writes allows you to select
a partition (by pressing a number) or a different disk (F1, F2 etc).

The one dinit writes will generally say something like “Hit Escape for
alternate OS”.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Gibbs wrote:

William Morris <> william@bangel.demon.co.uk> > wrote:
You might be missing:
fdisk /dev/hd1 loader

Sorted.
Thanks very much
William Morris