Boot problem when building OS Image

Hi,
Setup:
QNX® Momentics® Integrated Development Environment
QNX Neutrino 6.3
Hardware: x86 platform with iede compatible CF card.

I’m building a QNX .boot image using the QNX system builder perspective. My Idea is to keep the Image very small, by doing the necessary initialization in the build script and let the build script call another script to finish the system setup.

From the build script I call the “sh /etc/startupâ€

Well it seems the script can’t find most of the executable. I don’t see the PATH variable being set up anywhere?

All files are until now located in /proc/boot This path is set in the procnto $PATH property.

The executables ifconfig and route are responding but with an error

Behrens,

Your missing the waitfor command. This is normally located in your startup script. In other words, it’s not a QNX command but rather a few lines of script code. A normal QNX install from the CD has this in the rc.sysinit file which you can copy and paste into your startup script.

Because the waitfor is not there, the rest of your commands are failing because ifconfig and route are being executed before /dev/io-net exists (which is why they are erroring out).

Tim

Hi Tim

Thanks a lot for your answer. It clarified a couple of things for me.

I’m having a problem using the waitfor function, it keeps looping even though the /dev/socket and /dev/io-net/en0 are present. I plan to analyze that later on (I am new to scripting), for now I have replaced the waitfor function with a sleep.

It works fine now, I’m able to boot up, but I see some error messages on after some of the commands are executing:

: not foundp[29]
: not foundp[38]
: not foundp[42]
: not foundp[43]

Does anybody knows what kind of error messages they are?

Behrens,

I’d need to see your full startup script and the boot builder script.

Offhand I’d say there are some things being called in your startup script that can’t be found (PATH problem). Do you add the harddrive to the path in either the boot builder script or the startup script? If not, then anything not contained in the boot image but callled in the startup script is not going to be found.

For example in my boot builder script I set my PATH and LD_LIBRARY_PATH as follows:

    PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto

Thus when the harddrive becomes available I have access to all the programs in /bin, /sbin, /usr/bin, /usr/sbin.

Tim

Hi Tim,

You did point out the real problem about the missing waitfor command.

I have solved the problem about the strange “: not foundp[42]” error messages. I have copied my network settings from a previous script to the startup script. I did this copying from a windows editor.

When editing the startup script with vi on the target I saw that some of the lines ended with “^M”, including the two lines with the waitfor command. So after removing these windows end of line terminations everything works perfectly, including the waitfor command.

Thanks a lot.

Behrens