dinit & buildfile problem

Hi,

I am trying to put a new boot image on a compact flash disk and I’m pretty sure I’m doing something wrong here. I built my image in Momentics and created an generic.ifs file.

I transfered it to the target and used the command dinit -hb -f generic.ifs /dev/hd1t77

When I boot the board back up with the compact flash as the master drive and all by itself, I get an “Operating System not found”. What exactly does this mean the system is looking for??

Thanks,

Generally you see these kind of errors when the disk layout is different in the bios than what QNX used when it mounted it. How did you mount the flash and how do your mount options compare to what the bios knows?

Another reason is simply that it hadn’t finished writing when you rebooted and you have a corrupt image. Some compact flash (all of it in my experience) is really bad for doing things behind the scene when you are least expecting it. Make sure the data is all written before you reboot, then wait some more for good measure.

How long to wait depends on the flash and the amount of data you just wrote.

I’ve burned images to this compact flash many times using the QNX cd’s and never had much problems with the flash - it looks to be pretty good, which is why I think I’m doing something wrong, especially as this is the first time I’ve tried putting my own image on there. FYI: This is a cf card that is converted to and ide drive (i don’t know if there are any other types for stuff like disk-on-chip).

The way I did this was I booted from another ide drive that has an OS on it. I deleted all partitions and created fresh new ones, rebooted, then used dinit to put my own image on the disk. I then rebooted from the compact flash (with the other drive disconnected) and it couldn’t find an OS.

Is it possible there is something wrong with my .ifs file or with the way I used dinit??

Thanks,

I’ve got it now:

This doesn’t work => dinit -hb -f bootimage.ifs /dev/hd1
This does work => dinit -h -f bootimage.ifs /dev/hd1

I think this one gets filed under the heading “Everything works better when you turn it on.”

Actually, shouldn’t you be using fdisk to partition the compact flash, adding the QNX partition loader to the MBR and then using dinit on a t77/t78/t79 partition on the disc itself?

Brent - if you look in the warg_admin tree there are scripts I used to use under QNX4 to do this sort of flash setup. Most of the command are still valid under QNX6 (fdisk for example).