Making a bootable ATA flash disk for QNX Neutrin

I have recently bought a PC104 system from Diamond Systems & have been trying to create a QNX partition & copy a QNX 6.3 bootable image to it.
The storage medium is an ATA flash card which I’m connecting to a master EIDE port on the Neutrino host system.
When I FDISK the drive to create a single QNX partition (type 77), it seems to accept the command & after a reboot
it still seems to accept that it is a QNX partition although a message indicating that the drive cannot be mounted as it is corrupted is relayed during the boot.
The commands that I’ve been given to initialise the flash disk are:
dinit -h -B ipl-diskpc1 /dev/hd1 ( for the primary boot ) &
dinit -h -f {ifs filepath} -B ipl-diskpc2 /dev/hd1t77 ( for the secondary ).
However, running the 1st command seems to mess up the partitioning, creating 2 non-QNX partitions if viewed in FDISK.
The 2nd command appears to run without complaint.
The ATA disk accepts a FAT32 partition & formats it under Windows so I think that the hardware is ok.
Can anyone suggest where I’m going wrong with the 1st dinit command ?

dd if=/dev/zero of=/dev/hd0

fdisk /dev/hd0 delete all
fdisk /dev/hd0 add -s1 -t79
fdisk /dev/hd0 loader
fdisk /dev/hd0 boot -s1

mount -e /dev/hd0

dinit -h /dev/hd0t79

dloader /dev/hd0 /boot/sys/ipl-diskpc1
dloader /dev/hd0t79 /boot/sys/ipl-diskpc2

Many thanks, that worked fine.
Regards,
Allan

Hi fmartens

I have the same allanS’ problem.
By the last messages about this subject, I follow the steps mentioned, but after dd if=/dev/zero of=/dev/hd0, I gues that my MBR was destroyed.
My flash disk is installed at a secondary IDE controler, set as master.
I should change hd0 by hd1?
Can anyone help me?

Do a “ls /dev” and see what’s in there.
IDE controller has primary master, primary slave, secondary master, secondary slave. Depending on how many are connected/used, your flash disk could be /dev/hd1 or /dev/hd2.

Hi noc or fmartens

Thanks for advise. I’d already changed /dev/hd0 → /dev/hd1 and work fine. :slight_smile:
Now, raised another problem.
I’ve followed a sequence of instructions/commands sugested by Diamond Systems (diamondsystems/support/faqs/64). This page shows a build file for PC 104 Prometheus, that is my type, and some steps on how initialize the flash disk & copying the boot image.
After change the commands sugested by fmartens I can mount the QNX partition at /fs. However, when I follow the last two steps (cmds), and boot using flash disk at PC104, the boot process stops after “.altboot…” several dots and doesn’t continue. When I use dinit comands sugested by Diamonds, the boot process stops after “.altboot” neither appears a sequence of dots.
Can anybody tell me where i am making mistakes?
Maybe the problem would be the personal build file? I guess that Diamond do not publish a build file that doesn’t work…
Please…help me…

how big is your builded image? It can’t be more than 2M or 2.55M I forgot which one… :smiley:

Dear jinma

My .build file has 2K and .ifs file has 1.2M.

Try to change

fdisk /dev/hd1 boot -s1
to
fdisk /dev/hd1 boot -s1 -t79

Dear jinma
I included -t79 but I still have problems when I boot PC104 using flash.
:frowning:
I don’t have DiscOnchip (HD) on my PC104, thus I need configure the flash disk to boot with a personal image.
When I use a personal image boot (dinit comands) it stops soon after .altboot message.
Using ipl-diskpc# (dloader comands) still appearing about 12 lines of sequence dots after .altboot message and stop the boot process.