acellarius@yahoo.com wrote:
It sounds like you are installing from the CD
to flash?
I’m not sure if this is your problem, but for
flash I would avoid the standard install.
I would treat the system as an embedded box and
setup my own buildfile & customise the startup.
I know nothing about your application though…
Install from CD failed and is not physically
practical in the target system anyway.
I have my own install script which is shown below.
If there were a problem here, I would expect never
to be able to boot a flash created this way.
That I can (sometimes), indicates to me that the
installation method is good. But maybe I am fooling
myself.
Thanks for the reply
#!/bin/sh
Script to initialise and populate a flash disk on /dev/hd1 for use
in a production NGC system. It can be used both when the boot disk
(/dev/hd0) is a hard disk or when it is another flash. The script
uses the QNX image-filesystem in $BOOT/fs/qnxbase.qfs on the running
system. This is normally the running system’s boot files, so that
image should be vanilla QNX.
Once the disk is initialised, reboot; if the original boot disk is
still attached, you will get the option to boot either from that or
from the new flash disk. If prompted, to boot from the new flash,
select /dev/hd1t77 as the boot device and $BOOT/fs/qnxbase.qfs as
the package filesystem. When running from the new disk, you can
install OS and NGC packages onto the system. For that you need a
network connection to the server ‘saturn’.
Run this script simply by typing “make-flash”
First, define the location of boot image files unless it has already
been defined in the calling shell. It is useful to be able to
define this on the shell if running this script from a system which
is not the required OS version, but which contains a copy of the
relevant version’s boot files.
if test x"$BOOT" = x"" ; then
BOOT=/boot
echo Default to running system boot and OS image
else
echo Obtaining boot and OS image from $BOOT
fi
Unmount the disk
umount /dev/hd1
Delete existing partition information
echo Erasing flash
fdisk /dev/hd1 delete -s 1
fdisk /dev/hd1 delete -s 2
fdisk /dev/hd1 delete -s 3
fdisk /dev/hd1 delete -s 4
Add a new single partition and copy the master boot loader (MBR) to
the disk
fdisk /dev/hd1 add -b
fdisk /dev/hd1 loader
Create an entry under /dev for /dev/hd1t77
mount -e /dev/hd1
Initialise the new partition and copy the secondary loader to it.
echo Initialising flash
dinit -hqRf $BOOT/fs/qnxbase.ifs /dev/hd1t77
mount -e /dev/hd1
Mount the new partition under /fs/hd1t77 so we can populate it
if ! mount /dev/hd1t77 /fs/hd1t77; then
echo Failed to mount new flash partition.
exit 1
fi
Make some directories and copy the QNX base image to the disk
mkdir -p /fs/hd1t77/boot/fs
mkdir -p /fs/hd1t77/etc/system/config
mkdir -p /fs/hd1t77/etc/rc.d
echo Copying QNX image to flash
if ! cp $BOOT/fs/* /fs/hd1t77/boot/fs ; then
echo Failed to copy image
exit 1
fi
Now we have a runable system on the flash disk. If we reboot with
the flash as master, it will boot correctly. However, it makes life
easier if we setup a few more things first. Note that it is best to
minimise the work done here to that necessary to get a useful
initial system, not a final runtime.
Create a network configuration file
echo Creating /etc/net.cfg
cat <<-EOF > /fs/hd1t77/etc/net.cfg
nto network config file v1.2
version v1.2
[global]
hostname target
domain uk.waukbearing.com
route 10.15.1.2 0.0.0.0 0.0.0.0
lookup file bind
[en0]
type ethernet
mode manual
manual_ip 10.15.10.125
manual_netmask 255.255.0.0
EOF
Create an initial rc.local startup script. This will be replaced
with the real run-time rc.local when the NGC package is installed,
so it only serves the needs of the installation environment. Within
the script, we add a few entries to /etc/hosts.
echo Creating initial /etc/rc.d/rc.local
cat <<-EOF > /fs/hd1t77/etc/rc.d/rc.local
#!/bin/sh
/usr/sbin/inetd &
/usr/sbin/fs-nfs2 &
if ! grep saturn /etc/hosts > /dev/null ; then
echo “10.15.10.125 target” >> /etc/hosts
echo “10.15.10.1 saturn” >> /etc/hosts
fi
(sleep 2; /bin/mount saturn:/home /home) &
EOF
chmod +x /fs/hd1t77/etc/rc.d/rc.local
Don’t start Photon on the new system when it boots
touch /fs/hd1t77/etc/system/config/nophoton
Unmount the flash disk. This will flush all unwritten data
echo Unmounting newly created flash disk
umount /fs/hd1t77