The boot image is a collection of executables which are the minimum necessary to
start QNX. Typically this includes:

Just the bare essentials are included in the boot image, which has a maximum size of 512K. The rest of the processes are started soon after, from the sysinit script.

You may need to recreate a new boot image. This would be necessary if you wish to alter the parameters for some of the executables, or your have upgraded to a newer version.

If you change the boot image, but get it wrong, it may be necessary to boot the system from floppy to fix it. Instead, it is better to provide an alternate method. In the following instructions, replace NODE with the node number of
the computer you are working with.

Before you start, copy the file /.boot to /.altboot
Copy /etc/config/sysinit.NODE to /etc/config/altsysinit

When the computer boots, there is a brief period when a prompt displays:
Press ESC for alternate O/S.
If you press ESC at that point, the system will load the image contained in
/.altboot and execute /etc/config/altsysinit

Try this procedure before you continue, to make sure it works.

Now, let's look at the build file for a typical image. This is a source file used by the utility buildqnx. Each executable which is to be included in the image is decribed with two lines.

The first line is a filespec, where the executable can be found by buildqnx. The operating system objects are often specified with a path relative to the directory /boot. The second line starts with a $ and contains the name of the executable and the parameters with which to start it.

There are many parameters to Proc32 which you may want to change. Change directory to /boot/sys and type use Proc32 to see the list. Look up Proc32 in the QNX Utilities Reference N-Z (either in the printed manual or the Photon
Helpviewer) for details of what the options mean. These parameters can be used to tweak many things. Many affect the amount of memory Proc32 requires. The parameter -l sets the node number of this computer. Proc32 IS FUSSY ABOUT SPACES SEPARATING OPTION ARGUMENTS FROM OPTIONS. Usually there must be one space, so -n 32 is accepted, but -n32 is silently ignored. However, there must be no space between the option and the argument for the -b and -L options. See the usage message for details.

There are also some useful options to Fsys, which allow you to adjust the cache parameters and use a ram disk. Many people use -A which disables a POSIX requirement to update directory entries with the last time a file was read.
Type use Fsys or look up Fsys in the QNX Utilities Reference A-M for details.

The following is an example boot image. This computer is Node 5, uses the keyboard controller to reboot, and reduces the priority of Proc32 so that a process which is part of a driver can be set higher. The Filesystem runs with a
2M cache and a 512K ramdisk. Directory updates with the time of last read are disabled. This machine has an on-board EIDE controller.

$ boot -v

$ Proc32 -l 5 -b1 -P 28

$ Slib32

$ Slib16

$ Fsys -c2M -r512K -A

$ Fsys.eide

$ mount -p /dev/hd0 /dev/hd0t77 /

$ sinit TERM=qnx TZ=est05edt04,M4.1.0/2,M10.5.0/2

If this computer was installed from floppy disk, the installation created a boot source file in the directory /boot/build and called it hard.NODE, or perhaps if you installed an earlier version of QNX, it might be called hard32.NODE.

Change to the directory /boot/build. Make a backup copy of your source file. Now edit it with any text editor.

If you have an older version of QNX, there may be numbers after the $ on the second of each pair of lines. These numbers specified the heap size and now should usually not be specified. Delete them. Add the pair of lines at the top for sys/boot, exactly as shown in the example above.

Some older versions of QNX also used replacable parameters for the disk driver and the partition names. If so, at a shell prompt, type sin ver to find out which Fsys driver you are running. Then type sin -P Fsys.DRIVER ar to find out what options were used. Change the source file to match. Also, make the mount line look exactly like the one shown in the example above.

Modify any options as you desire. Save the file and exit the editor.

Change up a directory level to /boot. Type:
buildqnx -v build/hard.NODE images/hard.NODE
This will read the source file and create the matching image.
Now copy /boot/images/hard.NODE to /.boot

Let the new image get written to disk before shutting down the computer and rebooting.

If it fails to boot, press ESC for the original image and check that the contents of your source file are correct. Make sure you didn't copy the source image to /.boot.

Note: These instructions are for typical situations. Individual configuration may differ.
If you have any questions, please contact us for assistance.

Copyright © 1999 Qenesis Inc.