network boot help please!

Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.

I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!

Tech details:

  • Network: switched 100Mbit ethernet

  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.

I’ve constructed a build file for a QNX6 network boot floppy, which
works well (if a bit klugey; attached below). The startup script loads
a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
and libsocket. It runs dhcp-client to get its IP address.

Then it mounts its filesystem. I tried different approaches:

  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).

  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.

It’s a kluge, but this is the best result I’ve had. The build file
below reflects this approach.

Next the startup script runs a modified /etc/system/sysinit. This
starts up the rest of the drivers, and does a few special things:

  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::

ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config

This must be done before rc.devices is called, because it modifies
/etc/system/config/graphics-traplist and other files. This allows a
single filesystem to hold multiple hosts’ configurations.

(BTW, the crttrap docs are wrong. They say that
/etc/config/trap/crt.$NODE files are created and used, as in QNX4,
but they aren’t. I wish they were!)

Is there a better way to do this? I want the same functionality of QNX4’s
/etc/config/trap files.

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

  • Finishes up with exec’ing tinit.

(If you’d like to see the sysinit system I’ve cobbled together, please
let me know.)

This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.

When I try to run Photon (ph), I get the following symptoms:

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.

I saw these dialogs during one session (the text was cut off; this
is exactly what I saw)::

Application Error: Voyager: Unable to make CONFIG d
not implemented) in (init g

Config Error: Unable to save the configuration. Restore back
to the old
(No such file or directory)

  • The Launch menu doesn’t work at all. I click on it, nothing happens.

  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

  • Sometimes the shelf process won’t terminate, and I have to kill it.

Does anybody have any suggestions? I’m open to any ideas, no matter
how unlikely.

Thank you.

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
e-mail: dgoodger@atsautomation.com

############################################################

/boot/build/netfloppy:

[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

Bootstrap Script

================

[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

Startup Script

==============

[+script] startup-script = {

LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86/d
ll

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1

display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

Start the pci server

pci-bios &
waitfor /dev/pci

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/

reopen /dev/con1

display_msg “Starting up network…”

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u

display_msg “Mounting server filesystem…”

waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

Give control to the network system initialization file.

/etc/system/sysinit
}

File List

=========

libc.so # C shared lib (also contains the runtime linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

The files above this line can be shared by mutiple processes

[data=c]

List executables below this line

devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP

Hi David,

See below…

David Goodger <dgoodger@atsautomation.com> wrote:

Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.

I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!

Tech details:

  • Network: switched 100Mbit ethernet

  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.

I’ve constructed a build file for a QNX6 network boot floppy, which
works well (if a bit klugey; attached below). The startup script loads
a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
and libsocket. It runs dhcp-client to get its IP address.

Then it mounts its filesystem. I tried different approaches:

  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).

This shouldn’t work, I cannot remember the reason for this, perhaps the OS
guys could comment. There is a reason from what I remember but I did this
with another customer and the way it has to be done is using the symlinks
(your 3rd way).

  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.

This is the correct method from what I understand.

It’s a kluge, but this is the best result I’ve had. The build file
below reflects this approach.

Next the startup script runs a modified /etc/system/sysinit. This
starts up the rest of the drivers, and does a few special things:

  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::

ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config

This must be done before rc.devices is called, because it modifies
/etc/system/config/graphics-traplist and other files. This allows a
single filesystem to hold multiple hosts’ configurations.

(BTW, the crttrap docs are wrong. They say that
/etc/config/trap/crt.$NODE files are created and used, as in QNX4,
but they aren’t. I wish they were!)

They are, but they are in /etc/system/config/graphics-modes

Your right though, the docs say /etc/config/trap/crt.$NODE, I will file
a PR against this. Thanks for pointing this out.

Is there a better way to do this? I want the same functionality of QNX4’s
/etc/config/trap files.

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

  • Finishes up with exec’ing tinit.

I don’t know much more about getting Photon up and going (I’m hardware)
Someone in the Photon group would be best to comment on why your shelf
doesn’t appear all the time in Photon.

Best of luck.

Erick.



(If you’d like to see the sysinit system I’ve cobbled together, pl
ease
let me know.)

This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.

When I try to run Photon (ph), I get the following symptoms:

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.

I saw these dialogs during one session (the text was cut off; this
is exactly what I saw)::

Application Error: Voyager: Unable to make CONFIG d
not implemented) in (init g

Config Error: Unable to save the configuration. Restore back
to the old
(No such file or directory)

  • The Launch menu doesn’t work at all. I click on it, nothing happens.

  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

  • Sometimes the shelf process won’t terminate, and I have to kill it.

Does anybody have any suggestions? I’m open to any ideas, no matter
how unlikely.

Thank you.

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
e-mail: > dgoodger@atsautomation.com

############################################################

/boot/build/netfloppy:

[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

Bootstrap Script

================

[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

Startup Script

==============

[+script] startup-script = {

LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86/d
ll

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1

display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

Start the pci server

pci-bios &
waitfor /dev/pci

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/

reopen /dev/con1

display_msg “Starting up network…”

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u

display_msg “Mounting server filesystem…”

waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

Give control to the network system initialization file.

/etc/system/sysinit
}

File List

=========

libc.so # C shared lib (also contains the runtime linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

The files above this line can be shared by mutiple processes

[data=c]

List executables below this line

devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP

Erick a.k.a. “Hardware Support Account” :

…perhaps the OS guys could comment.

Someone in the Photon group would be best to comment…

Have you brought this to their attention?
Is there someone I should email directly?
Or should I just wait and hope that someone in the OS
and/or Photon group sees the original message?

Thanks for the reply.

– David

Hi David,

For the photon problems your having can you post the output of “pidin”
from the system having the problems and can you try telneting into the
problem system and running the following command:
“sh -x /usr/bin/ph”
This will start photon but will display what it is trying to run to the
screen. Can you post this output also ?

Thanks
Brenda

Hardware Support Account wrote:

Hi David,

See below…

David Goodger <> dgoodger@atsautomation.com> > wrote:

Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.


I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!


Tech details:

\

  • Network: switched 100Mbit ethernet

    \
  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

    \
  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.


    I’ve constructed a build file for a QNX6 network boot floppy, which
    works well (if a bit klugey; attached below). The startup script loads
    a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
    and libsocket. It runs dhcp-client to get its IP address.


    Then it mounts its filesystem. I tried different approaches:

    \
  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).


    This shouldn’t work, I cannot remember the reason for this, perhaps the OS
    guys could comment. There is a reason from what I remember but I did this
    with another customer and the way it has to be done is using the symlinks
    (your 3rd way).

    \
  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

    \
  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.


    This is the correct method from what I understand.


    It’s a kluge, but this is the best result I’ve had. The build file
    below reflects this approach.


    Next the startup script runs a modified /etc/system/sysinit. This
    starts up the rest of the drivers, and does a few special things:

    \
  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::


    ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config


    This must be done before rc.devices is called, because it modifies
    /etc/system/config/graphics-traplist and other files. This allows a
    single filesystem to hold multiple hosts’ configurations.


    (BTW, the crttrap docs are wrong. They say that
    /etc/config/trap/crt.$NODE files are created and used, as in QNX4,
    but they aren’t. I wish they were!)


    They are, but they are in /etc/system/config/graphics-modes

Your right though, the docs say /etc/config/trap/crt.$NODE, I will file
a PR against this. Thanks for pointing this out.


Is there a better way to do this? I want the same functionality of QNX4’s
/etc/config/trap files.

\

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

    \
  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

    \
  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

    \
  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

    \
  • Finishes up with exec’ing tinit.


    I don’t know much more about getting Photon up and going (I’m hardware)
    Someone in the Photon group would be best to comment on why your shelf
    doesn’t appear all the time in Photon.

Best of luck.

Erick.




(If you’d like to see the sysinit system I’ve cobbled together, pl

ease

let me know.)


This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.


When I try to run Photon (ph), I get the following symptoms:

\

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

    \
  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.


    I saw these dialogs during one session (the text was cut off; this
    is exactly what I saw)::


    Application Error: Voyager: Unable to make CONFIG d
    not implemented) in (init g


    Config Error: Unable to save the configuration. Restore back
    to the old
    (No such file or directory)

    \
  • The Launch menu doesn’t work at all. I click on it, nothing happens.

    \
  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

    \
  • Sometimes the shelf process won’t terminate, and I have to kill it.


    Does anybody have any suggestions? I’m open to any ideas, no matter
    how unlikely.


    Thank you.


    David Goodger, Systems Administrator & Programmer
    Automation Tooling Systems Inc., Advanced Systems
    730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
    direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
    e-mail: > dgoodger@atsautomation.com


    ############################################################

/boot/build/netfloppy:



[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

\

Bootstrap Script

================



[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

\

Startup Script

==============



[+script] startup-script = {


LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86/d
ll

\

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1


display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

\

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

\

Start the pci server

pci-bios &
waitfor /dev/pci

\

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/


reopen /dev/con1


display_msg “Starting up network…”

\

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u


display_msg “Mounting server filesystem…”


waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

\

Give control to the network system initialization file.

/etc/system/sysinit
}

\

File List

=========



libc.so # C shared lib (also contains the runtime linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

\

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

\

The files above this line can be shared by mutiple processes



[data=c]

\

List executables below this line



devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP
\

One issue with using a symlink to make /=/net/hostb is that special
directories such as hostb/proc hostb/net hostb/dev will now be /proc /net
/dev etc.

What you can do is use the pkg filesystem across the network if you don’t
like symlinks. Basicly you’ll have to copy and modify your servers
/etc/system/package/packages file (to packages.remote for example) and
change the following tokens:

spillroot=/net//var/pkg/spill

and then append the /net/ to the path in
<QPF:item name=“User Repository”> & <QPF:item name="Core Repository>

On the remote system run
fs-pkg -f/net//etc/system/package/packages.remote -b

After a little (depending how much parsing has to go one) you’ll be running
the pkg filesystem over qnet.

Hope that helps.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“David Goodger” <dgoodger@atsautomation.com> wrote in message
news:3c349ab2@ats2.sentex.ca

Erick a.k.a. “Hardware Support Account” :
…perhaps the OS guys could comment.

Someone in the Photon group would be best to comment…

Have you brought this to their attention?
Is there someone I should email directly?
Or should I just wait and hope that someone in the OS
and/or Photon group sees the original message?

Thanks for the reply.

– David

“Adam Mallory” <amallory@qnx.com> wrote:

One issue with using a symlink to make /=/net/hostb is that special
directories such as hostb/proc hostb/net hostb/dev will now be /proc /net
/dev etc.

Yes, this is the problem I encountered. The local “virtual” directories are
clobbered by the server’s. QNX4’s “sinit -r” handled local virtual
directories transparently.

I tried your suggestion (below) of running the pkg filesystem remotely. It’s
still not the equivalent of QNX4’s “sinit -r”. It runs, but I have access
only to those files originating from the canned packages and spillfiles. I
don’t have access to the server’s underlying filesystem. My modified
/etc/system/sysinit doesn’t can’t see the extra files I’ve created. Is there
any way to mount the underlying filesystem from a server, and then run the
package filesystem on top of that?

Has anybody successfully created a network of diskless workstations booting
off a QNX6 server, all sharing the server’s filesystem? I’d like to see some
sample boot image build files if any exist!

– DavidG

What you can do is use the pkg filesystem across the network if you don’t
like symlinks. Basicly you’ll have to copy and modify your servers
/etc/system/package/packages file (to packages.remote for example) and
change the following tokens:

spillroot=/net//var/pkg/spill

and then append the /net/ to the path in
QPF:item name=“User Repository”> & <QPF:item name="Core Repository

On the remote system run
fs-pkg -f/net//etc/system/package/packages.remote -b

After a little (depending how much parsing has to go one) you’ll be
running
the pkg filesystem over qnet.

Hope that helps.


Cheers,
Adam

QNX Software Systems Ltd.
[ > amallory@qnx.com > ]

“GUI Group” <gui@qnx.com> wrote:

Hi David,

For the photon problems your having can you post the output of
“pidin” from the system having the problems and can you try
telneting into the problem system and running the following command:
“sh -x /usr/bin/ph”
This will start photon but will display what it is trying to run to
the screen. Can you post this output also ?

Here’s the pidin output from the diskless workstation, before running
“ph”:

pid tid name prio STATE Blocked
1 1 procnto 0f READY
1 2 procnto 10r RUNNING
1 3 procnto 63r RECEIVE 1
1 4 procnto 10r RECEIVE 1
1 5 procnto 15r RECEIVE 1
1 6 procnto 10r RECEIVE 1
1 7 procnto 10r RECEIVE 1
1 8 procnto 15r RECEIVE 1
1 9 procnto 15r RECEIVE 1
2 1 proc/boot/devc-con 10r RECEIVE 1
4099 1 proc/boot/pci-bios 10r RECEIVE 1
4100 1 proc/boot/io-net 10r SIGWAITINFO
4100 2 proc/boot/io-net 10r RECEIVE 1
4100 3 proc/boot/io-net 10r RECEIVE 1
4100 4 proc/boot/io-net 10r RECEIVE 1
4100 5 proc/boot/io-net 21r RECEIVE 5
4100 6 proc/boot/io-net 10r RECEIVE 10
4100 7 proc/boot/io-net 10r RECEIVE 1
4100 9 proc/boot/io-net 10r CONDVAR 80701f8
4100 11 proc/boot/io-net 18r RECEIVE 15
4101 1 c/boot/dhcp.client 10r NANOSLEEP
4102 1 sbin/tinit 10r REPLY 1
4103 1 usr/sbin/slogger 10r RECEIVE 1
8200 1 sbin/pipe 15r RECEIVE 1
8200 2 sbin/pipe 10r RECEIVE 1
8200 3 sbin/pipe 10r RECEIVE 1
8200 4 sbin/pipe 15r RECEIVE 1
20489 1 sbin/mqueue 10r RECEIVE 1
131082 1 usr/sbin/random 10r SIGWAITINFO
131082 2 usr/sbin/random 10r RECEIVE 1
131082 3 usr/sbin/random 10r NANOSLEEP
90123 1 sbin/devc-par 10r RECEIVE 1
90123 2 sbin/devc-par 9r CONDVAR 804f938
135180 1 sbin/devc-pty 20r RECEIVE 1
90125 1 usr/sbin/spooler 10r NANOSLEEP
90126 1 sbin/devc-ser8250 24r RECEIVE 1
282639 1 usr/sbin/dumper 10r RECEIVE 1
299024 1 bin/sh 10r SIGSUSPEND
94225 1 sbin/devb-eide 10r SIGWAITINFO
94225 2 sbin/devb-eide 21r RECEIVE 1
94225 3 sbin/devb-eide 21r RECEIVE 4
94225 4 sbin/devb-eide 10r RECEIVE 10
94225 5 sbin/devb-eide 10r CONDVAR b037866c
94225 6 sbin/devb-eide 10r RECEIVE 7
94225 7 sbin/devb-eide 10r RECEIVE 7
94226 1 sbin/devb-fdc 10r SIGWAITINFO
94226 2 sbin/devb-fdc 21r RECEIVE 1
94226 3 sbin/devb-fdc 10r RECEIVE 7
94226 4 sbin/devb-fdc 10r CONDVAR b037866c
94226 5 sbin/devb-fdc 10r RECEIVE 4
94226 6 sbin/devb-fdc 10r RECEIVE 4
94227 1 sbin/io-audio 10r SIGWAITINFO
94227 2 sbin/io-audio 10r RECEIVE 1
94227 3 sbin/io-audio 10r RECEIVE 1
94227 4 sbin/io-audio 10r RECEIVE 1
94227 5 sbin/io-audio 15r INTR
299028 1 bin/login 10r REPLY 2
299029 1 bin/login 10r REPLY 2
299030 1 bin/login 10r REPLY 2
299031 1 bin/login 10r REPLY 2
299032 1 bin/login 10r REPLY 2
299033 1 bin/login 10r REPLY 2
299034 1 bin/login 10r REPLY 2
299035 1 bin/login 10r REPLY 2
442396 1 usr/sbin/inetd 10r SIGWAITINFO
454685 1 bin/pidin 10r REPLY 1

(Did you want some other form of pidin output? Please let me know.)

I discovered that “inetd” wasn’t running the first time (so I couldn’t
telnet in). After running “inetd”, there was an improvement in
Photon’s response: the shelves appeared reliably. (Why would that be?)
All the other problems remained however.

Here’s the output (wrapped) from “sh -x /usr/bin/ph” under the telnet
session:

sh -x /usr/bin/ph

  • alias sa=. ~/.alias
  • test ! -z
  • test ! -z -a ! -z 127.1:0
  • test -z nto
  • package_root=/usr
  • test -z qnet
  • file_unique=.qnet
  • export PHOTON_PATH=/usr/photon
  • export PHOTON2_PATH=/usr/photon
  • export PHTK_PATH=/usr/photon
  • graphics_root=/usr/photon
  • test ! -d /usr/photon
  • add_path /usr/photon/bin
  • add_path /usr/photon/appbuilder
  • export LD_LIBRARY_PATH=/lib:/lib/dll:/usr/lib:/dev/shmem:
    /opt/vame/ive/bin
  • add_libpath /usr/photon/lib
  • add_libpath /usr/photon/dll
  • X11_PATH=/usr/X11R6
  • add_path /usr/X11R6/bin
  • add_libpath /usr/X11R6/lib
  • test -z 127.1:0
  • export PHOTON=/dev/photon
  • export PHWM=pwm
  • export PHFONT=/dev/phfont
  • export FONTSLEUTH=/dev/fontsleuthctrl
  • export ABLPATH=/usr/photon/translations
  • export USER_NAME=/dev/photon
  • let phsafe=0
  • let didcrttrap=0
  • let loadshlib=1
  • let runwelcome=0
  • getopts n:svcNx opt
  • test -z -a -z
  • crttrap locate
  • TRAPFILE=/etc/system/config/graphics-modes
  • crttrap chksum
  • test 0 -ne 0
  • test ! -r /etc/system/config/graphics-modes
  • test ! /dev/photon -ef /dev/photon
  • test ! -z root
  • test 0 -ne 0
  • typeset -i i=0
  • test ! /dev/photon -ef /dev/photon -a 0 -lt 5
  • Photon
  • sleep 1
  • let i=i+1
  • test ! /dev/photon -ef /dev/photon -a 1 -lt 5
  • unset i
  • test ! /dev/photon -ef /dev/photon
  • do_font locate
  • FONT_TRAPFILE=/etc/system/config/font-traplist
  • is_modified /usr/photon/font_repository
    /etc/system/config/font-traplist
  • test -e /etc/system/config/font-traplist
  • test ! /dev/phfont -ef /dev/phfont
  • typeset -i i=0
  • test ! /dev/phfont -ef /dev/phfont -a 0 -lt 5
  • phfont -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/phfont -ef /dev/phfont -a 1 -lt 5
  • unset i
  • test ! /dev/phfont -ef /dev/phfont
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • typeset -i i=0
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 0 -lt 5
  • fontsleuth -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 1 -lt 5
  • unset i
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • test
  • [ /dev/photon = /dev/photon ]
  • [ 0 = 0 ]
  • phin -TG -q
  • crttrap start
  • phin -TPK -q
  • inputtrap start
  • test
  • [ 0 != 0 ]
  • test /dev/photon -ef /dev/photon
  • test root
  • test ! -r /root/.ph
  • export PHSTART=1
  • phin -qPpwm
  • [ 0 -eq 0 ]
  • typeset -i i=0
  • test 0 -lt 15
  • pwm
  • phin -TK -q
  • [ 0 -gt 0 ]
  • echo # Waiting for the Input driver to startup…

Waiting for the Input driver to startup…

  • sleep 1
  • let i=i+1
  • test 1 -lt 15
  • phin -TK -q
  • [ 1 -gt 0 ]
  • break
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPpwm
  • [ 5 -gt 0 ]
  • break
  • unset i
  • [ = ]
  • phin -qPshelf
  • [ 0 -eq 0 ]
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPshelf
  • shelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 1 -lt 30
  • phin -qPshelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 2 -lt 30
  • phin -qPshelf
  • [ 1 -gt 0 ]
  • break
  • unset i
  • phin -qPbkgdmgr
  • [ 0 -eq 0 ]
  • bkgdmgr
  • wmswitch
  • saver
  • test 0 = 1
  • test -r /etc/config/trap/run.qnet
  • prjobs -r
  • [ 0 = 0 ]
  • test -x /root/.ph/phapps
  • test -x /usr/X11R6/bin/Xphoton -a -d /usr/X11R6/lib/X11/fonts
  • Xphoton -once
  • test nto = nto
  • export SYSNAME=pkg
  • unset USER_NAME
  • exit 0
  • gtwm
  • /dev/null

  • 2>&1
    error opening security policy file
    /usr/X11R6/lib/X11/xserver/SecurityPolicy

I took note of the timing of events, starting from a text-mode login
shell on the workstation:

  • 8 seconds into /usr/bin/ph, the workstation’s screen went blank
    (black)
  • @ 12 seconds, screen changed to gray
  • @ 15 seconds, “gtwm” showed on the trace (telnet session)
  • @ 19 seconds, the QNX backdrop appeared on the workstation
  • @ 21 seconds, the shelves appeared

I also took output from “pidin” every second while running /usr/bin/ph;
please let me know if you’d like to see it (and where to send it).

Thanks
Brenda

Thanks, Brenda!

– DavidG

Hardware Support Account wrote:

Hi David,

See below…

David Goodger <> dgoodger@atsautomation.com> > wrote:

Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.


I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!


Tech details:

\

  • Network: switched 100Mbit ethernet

    \
  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

    \
  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.


    I’ve constructed a build file for a QNX6 network boot floppy, which
    works well (if a bit klugey; attached below). The startup script loads
    a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
    and libsocket. It runs dhcp-client to get its IP address.


    Then it mounts its filesystem. I tried different approaches:

    \
  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).


    This shouldn’t work, I cannot remember the reason for this, perhaps the
    OS
    guys could comment. There is a reason from what I remember but I did
    this
    with another customer and the way it has to be done is using the
    symlinks
    (your 3rd way).

    \
  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

    \
  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.


    This is the correct method from what I understand.


    It’s a kluge, but this is the best result I’ve had. The build file
    below reflects this approach.


    Next the startup script runs a modified /etc/system/sysinit. This
    starts up the rest of the drivers, and does a few special things:

    \
  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::


    ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config


    This must be done before rc.devices is called, because it modifies
    /etc/system/config/graphics-traplist and other files. This allows a
    single filesystem to hold multiple hosts’ configurations.


    (BTW, the crttrap docs are wrong. They say that
    /etc/config/trap/crt.$NODE files are created and used, as in QNX4,
    but they aren’t. I wish they were!)


    They are, but they are in /etc/system/config/graphics-modes

Your right though, the docs say /etc/config/trap/crt.$NODE, I will file
a PR against this. Thanks for pointing this out.


Is there a better way to do this? I want the same functionality of
QNX4’s
/etc/config/trap files.

\

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

    \
  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

    \
  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

    \
  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

    \
  • Finishes up with exec’ing tinit.


    I don’t know much more about getting Photon up and going (I’m hardware)
    Someone in the Photon group would be best to comment on why your shelf
    doesn’t appear all the time in Photon.

Best of luck.

Erick.




(If you’d like to see the sysinit system I’ve cobbled together, pl

ease

let me know.)


This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.


When I try to run Photon (ph), I get the following symptoms:

\

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

    \
  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.


    I saw these dialogs during one session (the text was cut off; this
    is exactly what I saw)::


    Application Error: Voyager: Unable to make CONFIG d
    not implemented) in (init g


    Config Error: Unable to save the configuration. Restore back
    to the old
    (No such file or directory)

    \
  • The Launch menu doesn’t work at all. I click on it, nothing happens.

    \
  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

    \
  • Sometimes the shelf process won’t terminate, and I have to kill it.


    Does anybody have any suggestions? I’m open to any ideas, no matter
    how unlikely.


    Thank you.


    David Goodger, Systems Administrator & Programmer
    Automation Tooling Systems Inc., Advanced Systems
    730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
    direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
    e-mail: > dgoodger@atsautomation.com


    ############################################################

/boot/build/netfloppy:



[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

\

Bootstrap Script

================



[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

\

Startup Script

==============



[+script] startup-script = {



LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86
/d
ll

\

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1


display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

\

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

\

Start the pci server

pci-bios &
waitfor /dev/pci

\

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/


reopen /dev/con1


display_msg “Starting up network…”

\

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u


display_msg “Mounting server filesystem…”


waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

\

Give control to the network system initialization file.

/etc/system/sysinit
}

\

File List

=========



libc.so # C shared lib (also contains the runtime
linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed

location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

\

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

\

The files above this line can be shared by mutiple processes



[data=c]

\

List executables below this line



devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP

“David Goodger” <dgoodger@atsautomation.com> wrote in message
news:3c35fb88$1@ats2.sentex.ca

I tried your suggestion (below) of running the pkg filesystem remotely.
It’s
still not the equivalent of QNX4’s “sinit -r”. It runs, but I have access
only to those files originating from the canned packages and spillfiles. I
don’t have access to the server’s underlying filesystem. My modified
/etc/system/sysinit doesn’t can’t see the extra files I’ve created. Is
there
any way to mount the underlying filesystem from a server, and then run the
package filesystem on top of that?

Well, could use the tcp/ip stack and nfs mount the server. Or write a small
script that symlinks all files on the server side to the local machine,
except the dev,proc and net directories.

Perhaps you could make a “remote-root” directory on the server which would
contain (or symlink) all the dir/files you wish to export, then use the
export= directive when you start qnet on the server.

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

Hi David

Can you also post a pidin once ph is started also?

Thanks
Brenda

David Goodger wrote:

“GUI Group” <> gui@qnx.com> > wrote:

Hi David,

For the photon problems your having can you post the output of
“pidin” from the system having the problems and can you try
telneting into the problem system and running the following command:
“sh -x /usr/bin/ph”
This will start photon but will display what it is trying to run to
the screen. Can you post this output also ?


Here’s the pidin output from the diskless workstation, before running
“ph”:

pid tid name prio STATE Blocked
1 1 procnto 0f READY
1 2 procnto 10r RUNNING
1 3 procnto 63r RECEIVE 1
1 4 procnto 10r RECEIVE 1
1 5 procnto 15r RECEIVE 1
1 6 procnto 10r RECEIVE 1
1 7 procnto 10r RECEIVE 1
1 8 procnto 15r RECEIVE 1
1 9 procnto 15r RECEIVE 1
2 1 proc/boot/devc-con 10r RECEIVE 1
4099 1 proc/boot/pci-bios 10r RECEIVE 1
4100 1 proc/boot/io-net 10r SIGWAITINFO
4100 2 proc/boot/io-net 10r RECEIVE 1
4100 3 proc/boot/io-net 10r RECEIVE 1
4100 4 proc/boot/io-net 10r RECEIVE 1
4100 5 proc/boot/io-net 21r RECEIVE 5
4100 6 proc/boot/io-net 10r RECEIVE 10
4100 7 proc/boot/io-net 10r RECEIVE 1
4100 9 proc/boot/io-net 10r CONDVAR 80701f8
4100 11 proc/boot/io-net 18r RECEIVE 15
4101 1 c/boot/dhcp.client 10r NANOSLEEP
4102 1 sbin/tinit 10r REPLY 1
4103 1 usr/sbin/slogger 10r RECEIVE 1
8200 1 sbin/pipe 15r RECEIVE 1
8200 2 sbin/pipe 10r RECEIVE 1
8200 3 sbin/pipe 10r RECEIVE 1
8200 4 sbin/pipe 15r RECEIVE 1
20489 1 sbin/mqueue 10r RECEIVE 1
131082 1 usr/sbin/random 10r SIGWAITINFO
131082 2 usr/sbin/random 10r RECEIVE 1
131082 3 usr/sbin/random 10r NANOSLEEP
90123 1 sbin/devc-par 10r RECEIVE 1
90123 2 sbin/devc-par 9r CONDVAR 804f938
135180 1 sbin/devc-pty 20r RECEIVE 1
90125 1 usr/sbin/spooler 10r NANOSLEEP
90126 1 sbin/devc-ser8250 24r RECEIVE 1
282639 1 usr/sbin/dumper 10r RECEIVE 1
299024 1 bin/sh 10r SIGSUSPEND
94225 1 sbin/devb-eide 10r SIGWAITINFO
94225 2 sbin/devb-eide 21r RECEIVE 1
94225 3 sbin/devb-eide 21r RECEIVE 4
94225 4 sbin/devb-eide 10r RECEIVE 10
94225 5 sbin/devb-eide 10r CONDVAR b037866c
94225 6 sbin/devb-eide 10r RECEIVE 7
94225 7 sbin/devb-eide 10r RECEIVE 7
94226 1 sbin/devb-fdc 10r SIGWAITINFO
94226 2 sbin/devb-fdc 21r RECEIVE 1
94226 3 sbin/devb-fdc 10r RECEIVE 7
94226 4 sbin/devb-fdc 10r CONDVAR b037866c
94226 5 sbin/devb-fdc 10r RECEIVE 4
94226 6 sbin/devb-fdc 10r RECEIVE 4
94227 1 sbin/io-audio 10r SIGWAITINFO
94227 2 sbin/io-audio 10r RECEIVE 1
94227 3 sbin/io-audio 10r RECEIVE 1
94227 4 sbin/io-audio 10r RECEIVE 1
94227 5 sbin/io-audio 15r INTR
299028 1 bin/login 10r REPLY 2
299029 1 bin/login 10r REPLY 2
299030 1 bin/login 10r REPLY 2
299031 1 bin/login 10r REPLY 2
299032 1 bin/login 10r REPLY 2
299033 1 bin/login 10r REPLY 2
299034 1 bin/login 10r REPLY 2
299035 1 bin/login 10r REPLY 2
442396 1 usr/sbin/inetd 10r SIGWAITINFO
454685 1 bin/pidin 10r REPLY 1

(Did you want some other form of pidin output? Please let me know.)

I discovered that “inetd” wasn’t running the first time (so I couldn’t
telnet in). After running “inetd”, there was an improvement in
Photon’s response: the shelves appeared reliably. (Why would that be?)
All the other problems remained however.

Here’s the output (wrapped) from “sh -x /usr/bin/ph” under the telnet
session:

sh -x /usr/bin/ph

  • alias sa=. ~/.alias
  • test ! -z
  • test ! -z -a ! -z 127.1:0
  • test -z nto
  • package_root=/usr
  • test -z qnet
  • file_unique=.qnet
  • export PHOTON_PATH=/usr/photon
  • export PHOTON2_PATH=/usr/photon
  • export PHTK_PATH=/usr/photon
  • graphics_root=/usr/photon
  • test ! -d /usr/photon
  • add_path /usr/photon/bin
  • add_path /usr/photon/appbuilder
  • export LD_LIBRARY_PATH=/lib:/lib/dll:/usr/lib:/dev/shmem:
    /opt/vame/ive/bin
  • add_libpath /usr/photon/lib
  • add_libpath /usr/photon/dll
  • X11_PATH=/usr/X11R6
  • add_path /usr/X11R6/bin
  • add_libpath /usr/X11R6/lib
  • test -z 127.1:0
  • export PHOTON=/dev/photon
  • export PHWM=pwm
  • export PHFONT=/dev/phfont
  • export FONTSLEUTH=/dev/fontsleuthctrl
  • export ABLPATH=/usr/photon/translations
  • export USER_NAME=/dev/photon
  • let phsafe=0
  • let didcrttrap=0
  • let loadshlib=1
  • let runwelcome=0
  • getopts n:svcNx opt
  • test -z -a -z
  • crttrap locate
  • TRAPFILE=/etc/system/config/graphics-modes
  • crttrap chksum
  • test 0 -ne 0
  • test ! -r /etc/system/config/graphics-modes
  • test ! /dev/photon -ef /dev/photon
  • test ! -z root
  • test 0 -ne 0
  • typeset -i i=0
  • test ! /dev/photon -ef /dev/photon -a 0 -lt 5
  • Photon
  • sleep 1
  • let i=i+1
  • test ! /dev/photon -ef /dev/photon -a 1 -lt 5
  • unset i
  • test ! /dev/photon -ef /dev/photon
  • do_font locate
  • FONT_TRAPFILE=/etc/system/config/font-traplist
  • is_modified /usr/photon/font_repository
    /etc/system/config/font-traplist
  • test -e /etc/system/config/font-traplist
  • test ! /dev/phfont -ef /dev/phfont
  • typeset -i i=0
  • test ! /dev/phfont -ef /dev/phfont -a 0 -lt 5
  • phfont -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/phfont -ef /dev/phfont -a 1 -lt 5
  • unset i
  • test ! /dev/phfont -ef /dev/phfont
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • typeset -i i=0
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 0 -lt 5
  • fontsleuth -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 1 -lt 5
  • unset i
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • test
  • [ /dev/photon = /dev/photon ]
  • [ 0 = 0 ]
  • phin -TG -q
  • crttrap start
  • phin -TPK -q
  • inputtrap start
  • test
  • [ 0 != 0 ]
  • test /dev/photon -ef /dev/photon
  • test root
  • test ! -r /root/.ph
  • export PHSTART=1
  • phin -qPpwm
  • [ 0 -eq 0 ]
  • typeset -i i=0
  • test 0 -lt 15
  • pwm
  • phin -TK -q
  • [ 0 -gt 0 ]
  • echo # Waiting for the Input driver to startup…

Waiting for the Input driver to startup…

  • sleep 1
  • let i=i+1
  • test 1 -lt 15
  • phin -TK -q
  • [ 1 -gt 0 ]
  • break
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPpwm
  • [ 5 -gt 0 ]
  • break
  • unset i
  • [ = ]
  • phin -qPshelf
  • [ 0 -eq 0 ]
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPshelf
  • shelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 1 -lt 30
  • phin -qPshelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 2 -lt 30
  • phin -qPshelf
  • [ 1 -gt 0 ]
  • break
  • unset i
  • phin -qPbkgdmgr
  • [ 0 -eq 0 ]
  • bkgdmgr
  • wmswitch
  • saver
  • test 0 = 1
  • test -r /etc/config/trap/run.qnet
  • prjobs -r
  • [ 0 = 0 ]
  • test -x /root/.ph/phapps
  • test -x /usr/X11R6/bin/Xphoton -a -d /usr/X11R6/lib/X11/fonts
  • Xphoton -once
  • test nto = nto
  • export SYSNAME=pkg
  • unset USER_NAME
  • exit 0
  • gtwm
  • /dev/null

  • 2>&1
    error opening security policy file
    /usr/X11R6/lib/X11/xserver/SecurityPolicy

I took note of the timing of events, starting from a text-mode login
shell on the workstation:

  • 8 seconds into /usr/bin/ph, the workstation’s screen went blank
    (black)
  • @ 12 seconds, screen changed to gray
  • @ 15 seconds, “gtwm” showed on the trace (telnet session)
  • @ 19 seconds, the QNX backdrop appeared on the workstation
  • @ 21 seconds, the shelves appeared

I also took output from “pidin” every second while running /usr/bin/ph;
please let me know if you’d like to see it (and where to send it).


Thanks
Brenda


Thanks, Brenda!

– DavidG


Hardware Support Account wrote:


Hi David,

See below…

David Goodger <> dgoodger@atsautomation.com> > wrote:


Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.


I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!


Tech details:

\

  • Network: switched 100Mbit ethernet

    \
  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

    \
  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.


    I’ve constructed a build file for a QNX6 network boot floppy, which
    works well (if a bit klugey; attached below). The startup script loads
    a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
    and libsocket. It runs dhcp-client to get its IP address.


    Then it mounts its filesystem. I tried different approaches:

    \
  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).


    This shouldn’t work, I cannot remember the reason for this, perhaps the

OS

guys could comment. There is a reason from what I remember but I did

this

with another customer and the way it has to be done is using the

symlinks

(your 3rd way).


\

  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

    \
  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.


    This is the correct method from what I understand.



    It’s a kluge, but this is the best result I’ve had. The build file
    below reflects this approach.


    Next the startup script runs a modified /etc/system/sysinit. This
    starts up the rest of the drivers, and does a few special things:

    \
  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::


    ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config


    This must be done before rc.devices is called, because it modifies
    /etc/system/config/graphics-traplist and other files. This allows a
    single filesystem to hold multiple hosts’ configurations.


    (BTW, the crttrap docs are wrong. They say that
    /etc/config/trap/crt.$NODE files are created and used, as in QNX4,
    but they aren’t. I wish they were!)


    They are, but they are in /etc/system/config/graphics-modes

Your right though, the docs say /etc/config/trap/crt.$NODE, I will file
a PR against this. Thanks for pointing this out.



Is there a better way to do this? I want the same functionality of

QNX4’s

/etc/config/trap files.

\

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

    \
  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

    \
  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

    \
  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

    \
  • Finishes up with exec’ing tinit.


    I don’t know much more about getting Photon up and going (I’m hardware)
    Someone in the Photon group would be best to comment on why your shelf
    doesn’t appear all the time in Photon.

Best of luck.

Erick.





(If you’d like to see the sysinit system I’ve cobbled together, pl


ease


let me know.)


This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.


When I try to run Photon (ph), I get the following symptoms:

\

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

    \
  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.


    I saw these dialogs during one session (the text was cut off; this
    is exactly what I saw)::


    Application Error: Voyager: Unable to make CONFIG d
    not implemented) in (init g


    Config Error: Unable to save the configuration. Restore back
    to the old
    (No such file or directory)

    \
  • The Launch menu doesn’t work at all. I click on it, nothing happens.

    \
  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

    \
  • Sometimes the shelf process won’t terminate, and I have to kill it.


    Does anybody have any suggestions? I’m open to any ideas, no matter
    how unlikely.


    Thank you.


    David Goodger, Systems Administrator & Programmer
    Automation Tooling Systems Inc., Advanced Systems
    730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
    direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
    e-mail: > dgoodger@atsautomation.com


    ############################################################

/boot/build/netfloppy:



[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

\

Bootstrap Script

================



[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

\

Startup Script

==============



[+script] startup-script = {


LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86

/d

ll

\

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1


display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

\

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

\

Start the pci server

pci-bios &
waitfor /dev/pci

\

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/


reopen /dev/con1


display_msg “Starting up network…”

\

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u


display_msg “Mounting server filesystem…”


waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

\

Give control to the network system initialization file.

/etc/system/sysinit
}

\

File List

=========



libc.so # C shared lib (also contains the runtime

linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed

location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

\

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

\

The files above this line can be shared by mutiple processes



[data=c]

\

List executables below this line



devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP
\

Hi David,

One major thing that can cause some of your problems is that $HOME
points to / which is not a writeable directory in your case. The ph
script and voyager try to put their config files in $HOME/.ph - if this
directory doesn’t exist it tries to create it. This is where the error
messages you mention are coming from.

Try creating a real directory for your home and let me know what happens.

Regards
Brenda


David Goodger wrote:

“GUI Group” <> gui@qnx.com> > wrote:

Hi David,

For the photon problems your having can you post the output of
“pidin” from the system having the problems and can you try
telneting into the problem system and running the following command:
“sh -x /usr/bin/ph”
This will start photon but will display what it is trying to run to
the screen. Can you post this output also ?


Here’s the pidin output from the diskless workstation, before running
“ph”:

pid tid name prio STATE Blocked
1 1 procnto 0f READY
1 2 procnto 10r RUNNING
1 3 procnto 63r RECEIVE 1
1 4 procnto 10r RECEIVE 1
1 5 procnto 15r RECEIVE 1
1 6 procnto 10r RECEIVE 1
1 7 procnto 10r RECEIVE 1
1 8 procnto 15r RECEIVE 1
1 9 procnto 15r RECEIVE 1
2 1 proc/boot/devc-con 10r RECEIVE 1
4099 1 proc/boot/pci-bios 10r RECEIVE 1
4100 1 proc/boot/io-net 10r SIGWAITINFO
4100 2 proc/boot/io-net 10r RECEIVE 1
4100 3 proc/boot/io-net 10r RECEIVE 1
4100 4 proc/boot/io-net 10r RECEIVE 1
4100 5 proc/boot/io-net 21r RECEIVE 5
4100 6 proc/boot/io-net 10r RECEIVE 10
4100 7 proc/boot/io-net 10r RECEIVE 1
4100 9 proc/boot/io-net 10r CONDVAR 80701f8
4100 11 proc/boot/io-net 18r RECEIVE 15
4101 1 c/boot/dhcp.client 10r NANOSLEEP
4102 1 sbin/tinit 10r REPLY 1
4103 1 usr/sbin/slogger 10r RECEIVE 1
8200 1 sbin/pipe 15r RECEIVE 1
8200 2 sbin/pipe 10r RECEIVE 1
8200 3 sbin/pipe 10r RECEIVE 1
8200 4 sbin/pipe 15r RECEIVE 1
20489 1 sbin/mqueue 10r RECEIVE 1
131082 1 usr/sbin/random 10r SIGWAITINFO
131082 2 usr/sbin/random 10r RECEIVE 1
131082 3 usr/sbin/random 10r NANOSLEEP
90123 1 sbin/devc-par 10r RECEIVE 1
90123 2 sbin/devc-par 9r CONDVAR 804f938
135180 1 sbin/devc-pty 20r RECEIVE 1
90125 1 usr/sbin/spooler 10r NANOSLEEP
90126 1 sbin/devc-ser8250 24r RECEIVE 1
282639 1 usr/sbin/dumper 10r RECEIVE 1
299024 1 bin/sh 10r SIGSUSPEND
94225 1 sbin/devb-eide 10r SIGWAITINFO
94225 2 sbin/devb-eide 21r RECEIVE 1
94225 3 sbin/devb-eide 21r RECEIVE 4
94225 4 sbin/devb-eide 10r RECEIVE 10
94225 5 sbin/devb-eide 10r CONDVAR b037866c
94225 6 sbin/devb-eide 10r RECEIVE 7
94225 7 sbin/devb-eide 10r RECEIVE 7
94226 1 sbin/devb-fdc 10r SIGWAITINFO
94226 2 sbin/devb-fdc 21r RECEIVE 1
94226 3 sbin/devb-fdc 10r RECEIVE 7
94226 4 sbin/devb-fdc 10r CONDVAR b037866c
94226 5 sbin/devb-fdc 10r RECEIVE 4
94226 6 sbin/devb-fdc 10r RECEIVE 4
94227 1 sbin/io-audio 10r SIGWAITINFO
94227 2 sbin/io-audio 10r RECEIVE 1
94227 3 sbin/io-audio 10r RECEIVE 1
94227 4 sbin/io-audio 10r RECEIVE 1
94227 5 sbin/io-audio 15r INTR
299028 1 bin/login 10r REPLY 2
299029 1 bin/login 10r REPLY 2
299030 1 bin/login 10r REPLY 2
299031 1 bin/login 10r REPLY 2
299032 1 bin/login 10r REPLY 2
299033 1 bin/login 10r REPLY 2
299034 1 bin/login 10r REPLY 2
299035 1 bin/login 10r REPLY 2
442396 1 usr/sbin/inetd 10r SIGWAITINFO
454685 1 bin/pidin 10r REPLY 1

(Did you want some other form of pidin output? Please let me know.)

I discovered that “inetd” wasn’t running the first time (so I couldn’t
telnet in). After running “inetd”, there was an improvement in
Photon’s response: the shelves appeared reliably. (Why would that be?)
All the other problems remained however.

Here’s the output (wrapped) from “sh -x /usr/bin/ph” under the telnet
session:

sh -x /usr/bin/ph

  • alias sa=. ~/.alias
  • test ! -z
  • test ! -z -a ! -z 127.1:0
  • test -z nto
  • package_root=/usr
  • test -z qnet
  • file_unique=.qnet
  • export PHOTON_PATH=/usr/photon
  • export PHOTON2_PATH=/usr/photon
  • export PHTK_PATH=/usr/photon
  • graphics_root=/usr/photon
  • test ! -d /usr/photon
  • add_path /usr/photon/bin
  • add_path /usr/photon/appbuilder
  • export LD_LIBRARY_PATH=/lib:/lib/dll:/usr/lib:/dev/shmem:
    /opt/vame/ive/bin
  • add_libpath /usr/photon/lib
  • add_libpath /usr/photon/dll
  • X11_PATH=/usr/X11R6
  • add_path /usr/X11R6/bin
  • add_libpath /usr/X11R6/lib
  • test -z 127.1:0
  • export PHOTON=/dev/photon
  • export PHWM=pwm
  • export PHFONT=/dev/phfont
  • export FONTSLEUTH=/dev/fontsleuthctrl
  • export ABLPATH=/usr/photon/translations
  • export USER_NAME=/dev/photon
  • let phsafe=0
  • let didcrttrap=0
  • let loadshlib=1
  • let runwelcome=0
  • getopts n:svcNx opt
  • test -z -a -z
  • crttrap locate
  • TRAPFILE=/etc/system/config/graphics-modes
  • crttrap chksum
  • test 0 -ne 0
  • test ! -r /etc/system/config/graphics-modes
  • test ! /dev/photon -ef /dev/photon
  • test ! -z root
  • test 0 -ne 0
  • typeset -i i=0
  • test ! /dev/photon -ef /dev/photon -a 0 -lt 5
  • Photon
  • sleep 1
  • let i=i+1
  • test ! /dev/photon -ef /dev/photon -a 1 -lt 5
  • unset i
  • test ! /dev/photon -ef /dev/photon
  • do_font locate
  • FONT_TRAPFILE=/etc/system/config/font-traplist
  • is_modified /usr/photon/font_repository
    /etc/system/config/font-traplist
  • test -e /etc/system/config/font-traplist
  • test ! /dev/phfont -ef /dev/phfont
  • typeset -i i=0
  • test ! /dev/phfont -ef /dev/phfont -a 0 -lt 5
  • phfont -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/phfont -ef /dev/phfont -a 1 -lt 5
  • unset i
  • test ! /dev/phfont -ef /dev/phfont
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • typeset -i i=0
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 0 -lt 5
  • fontsleuth -d /usr/photon/font_repository
  • sleep 1
  • let i=i+1
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl -a 1 -lt 5
  • unset i
  • test ! /dev/fontsleuthctrl -ef /dev/fontsleuthctrl
  • test
  • [ /dev/photon = /dev/photon ]
  • [ 0 = 0 ]
  • phin -TG -q
  • crttrap start
  • phin -TPK -q
  • inputtrap start
  • test
  • [ 0 != 0 ]
  • test /dev/photon -ef /dev/photon
  • test root
  • test ! -r /root/.ph
  • export PHSTART=1
  • phin -qPpwm
  • [ 0 -eq 0 ]
  • typeset -i i=0
  • test 0 -lt 15
  • pwm
  • phin -TK -q
  • [ 0 -gt 0 ]
  • echo # Waiting for the Input driver to startup…

Waiting for the Input driver to startup…

  • sleep 1
  • let i=i+1
  • test 1 -lt 15
  • phin -TK -q
  • [ 1 -gt 0 ]
  • break
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPpwm
  • [ 5 -gt 0 ]
  • break
  • unset i
  • [ = ]
  • phin -qPshelf
  • [ 0 -eq 0 ]
  • unset i
  • typeset -i i=0
  • test 0 -lt 30
  • phin -qPshelf
  • shelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 1 -lt 30
  • phin -qPshelf
  • [ 0 -gt 0 ]
  • sleep 1
  • let i=i+1
  • test 2 -lt 30
  • phin -qPshelf
  • [ 1 -gt 0 ]
  • break
  • unset i
  • phin -qPbkgdmgr
  • [ 0 -eq 0 ]
  • bkgdmgr
  • wmswitch
  • saver
  • test 0 = 1
  • test -r /etc/config/trap/run.qnet
  • prjobs -r
  • [ 0 = 0 ]
  • test -x /root/.ph/phapps
  • test -x /usr/X11R6/bin/Xphoton -a -d /usr/X11R6/lib/X11/fonts
  • Xphoton -once
  • test nto = nto
  • export SYSNAME=pkg
  • unset USER_NAME
  • exit 0
  • gtwm
  • /dev/null

  • 2>&1
    error opening security policy file
    /usr/X11R6/lib/X11/xserver/SecurityPolicy

I took note of the timing of events, starting from a text-mode login
shell on the workstation:

  • 8 seconds into /usr/bin/ph, the workstation’s screen went blank
    (black)
  • @ 12 seconds, screen changed to gray
  • @ 15 seconds, “gtwm” showed on the trace (telnet session)
  • @ 19 seconds, the QNX backdrop appeared on the workstation
  • @ 21 seconds, the shelves appeared

I also took output from “pidin” every second while running /usr/bin/ph;
please let me know if you’d like to see it (and where to send it).


Thanks
Brenda


Thanks, Brenda!

– DavidG


Hardware Support Account wrote:


Hi David,

See below…

David Goodger <> dgoodger@atsautomation.com> > wrote:


Abstract: Help! I’m trying to get QNX6 to boot over the network from a
floppy, getting its entire filesystem from a QNX6
“filesystem server”. Photon is not working out.


I’m trying to set up the QNX6 (6.1.0A) equivalent of our QNX4 network.
We run two networks in parallel: a corporate Windows net and a
departmental QNX4 net. On the QNX4 network, we have file,
application, print/connectivity (Samba), and session (Phindows) servers.
I make up a boot floppy for each workstation that will be using the QNX
network. It works quite well for us, but with QNX4’s decline, it’s
time for the upstart QNX6 to take its place. It’s being very stubborn
though!


Tech details:

\

  • Network: switched 100Mbit ethernet

    \
  • Workstation: 500MHz PIII, 256MB RAM, Dell Precision 220, Matrox G400
    video.

    \
  • Server: 800MHz PIII, 512MB RAM, Dell Precision 420.


    I’ve constructed a build file for a QNX6 network boot floppy, which
    works well (if a bit klugey; attached below). The startup script loads
    a minimum of drivers, including io-net, the NIC driver, qnet, tcpip,
    and libsocket. It runs dhcp-client to get its IP address.


    Then it mounts its filesystem. I tried different approaches:

    \
  • Use “procmgr_symlink /net/odin /” (odin is the server): doesn’t
    work. This is the closest I could come to QNX4’s “sinit -r file://1/”
    (which mounts node 1’s filesystem at the network-booted nodes root).


    This shouldn’t work, I cannot remember the reason for this, perhaps the

OS

guys could comment. There is a reason from what I remember but I did

this

with another customer and the way it has to be done is using the

symlinks

(your 3rd way).


\

  • Use “fs-nfs2 192.168.6.80:/ /” to do the same thing (6.80 is odin’s
    IP). This worked to a degree, but I had problems with the
    pseudo-directories like /net: I got the server’s copy of
    everything (except /dev, perhaps). I couldn’t get Photon to start
    though.

    \
  • Use “procmgr_symlink /net/odin/bin /bin”, similarly for /etc, /lib,
    /sbin, and /usr. Once connected, /etc/system/sysinit calls a script
    that makes “ln -sP” symlinks for any directories on the server but
    not existing locally. This way, I keep my own /dev, /net, /proc,
    etc.


    This is the correct method from what I understand.



    It’s a kluge, but this is the best result I’ve had. The build file
    below reflects this approach.


    Next the startup script runs a modified /etc/system/sysinit. This
    starts up the rest of the drivers, and does a few special things:

    \
  • Link /etc/system/config to a host-specific directory (creating it
    first if necessary)::


    ln -sP /etc/system/config.host/$HOSTNAME /etc/system/config


    This must be done before rc.devices is called, because it modifies
    /etc/system/config/graphics-traplist and other files. This allows a
    single filesystem to hold multiple hosts’ configurations.


    (BTW, the crttrap docs are wrong. They say that
    /etc/config/trap/crt.$NODE files are created and used, as in QNX4,
    but they aren’t. I wish they were!)


    They are, but they are in /etc/system/config/graphics-modes

Your right though, the docs say /etc/config/trap/crt.$NODE, I will file
a PR against this. Thanks for pointing this out.



Is there a better way to do this? I want the same functionality of

QNX4’s

/etc/config/trap files.

\

  • Link /etc/net.cfg to /etc/system/config/net.cfg, which is now
    host-specific. Again, this is so that the server’s filesystem can
    support multiple hosts.

    \
  • Run a slightly crippled /etc/rc.d/rc.devices
    (/etc/system/enum/devices/net has been removed, and is dynamically
    added only for non-netboot hosts).

    \
  • Does some host-specific setup (sysinit contains a big case
    statement, one entry per host), including network setup for
    non-netboot hosts such as the server itself.

    \
  • Runs most of the stuff from /etc/rc.d/rc.sysinit.

    \
  • Finishes up with exec’ing tinit.


    I don’t know much more about getting Photon up and going (I’m hardware)
    Someone in the Photon group would be best to comment on why your shelf
    doesn’t appear all the time in Photon.

Best of luck.

Erick.





(If you’d like to see the sysinit system I’ve cobbled together, pl


ease


let me know.)


This setup lets me boot over the network and mount the server’s
filesystem almost as if it were my own (full of ugly symlinks though).
I log in in text mode, and everything seems fine. There’s some delay,
but it’s attributable to the network.


When I try to run Photon (ph), I get the following symptoms:

\

  • Photon starts up very slowly. It takes a long time, up to a minute
    or two for the shelves to appear. Sometimes the shelves never
    appear. According to netstat and nicinfo, the network is working
    fine. How many megabytes of object code does Photon go through when
    it starts up? Can that and the network account for the long delay?

    \
  • I can’t run Voyager. I get the splash screen and the outline of the
    browser window, but no contents. The windows don’t go away. I can’t
    close the browser window by mouse, only by slaying the process.


    I saw these dialogs during one session (the text was cut off; this
    is exactly what I saw)::


    Application Error: Voyager: Unable to make CONFIG d
    not implemented) in (init g


    Config Error: Unable to save the configuration. Restore back
    to the old
    (No such file or directory)

    \
  • The Launch menu doesn’t work at all. I click on it, nothing happens.

    \
  • Sometimes I can’t end the Photon session. The shelves and backdrop
    disappear, and I end up with a black screen and mouse pointer.

    \
  • Sometimes the shelf process won’t terminate, and I have to kill it.


    Does anybody have any suggestions? I’m open to any ideas, no matter
    how unlikely.


    Thank you.


    David Goodger, Systems Administrator & Programmer
    Automation Tooling Systems Inc., Advanced Systems
    730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
    direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
    e-mail: > dgoodger@atsautomation.com


    ############################################################

/boot/build/netfloppy:



[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

\

Bootstrap Script

================



[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto
}

\

Startup Script

==============



[+script] startup-script = {


LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86

/d

ll

\

Start up some consoles

devc-con -n9 &
waitfor /dev/con1
reopen /dev/con1


display_msg “”
display_msg ATS Advanced Systems QNX6.1 Network Boot Test (QNET)

\

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

\

Start the pci server

pci-bios &
waitfor /dev/pci

\

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/


reopen /dev/con1


display_msg “Starting up network…”

\

Start NIC driver with QNET networking. (@@@)

io-net -d el900 -pqnet bind=ether,host=qnet.atsauto.com -ptcpip &
waitfor /dev/socket

(@@@) no domain after hostname

dhcp.client #-h qnet -i en0 -u


display_msg “Mounting server filesystem…”


waitfor /net/odin
procmgr_symlink /net/odin/bin /bin
procmgr_symlink /net/odin/etc /etc
procmgr_symlink /net/odin/lib /lib
procmgr_symlink /net/odin/sbin /sbin
procmgr_symlink /net/odin/usr /usr

\

Give control to the network system initialization file.

/etc/system/sysinit
}

\

File List

=========



libc.so # C shared lib (also contains the runtime

linker)

Programs require the runtime linker (ldqnx.so) to be at a fixed

location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

\

Networking libs:

devn-el900.so # 3C90x
npm-qnet.so
npm-tcpip.so
libsocket.so

\

The files above this line can be shared by mutiple processes



[data=c]

\

List executables below this line



devc-con # console driver
pci-bios # pci server
seedres
io-net
dhcp.client # for dynamic IP
\

Can you also post a pidin once ph is started also?

Your wish is my command.

BTW, I retract my statement about inetd helping Photon shelves. Just now,
with inetd running, I got no shelves in Photon.

– DavidG

pid tid name prio STATE Blocked
1 1 procnto 0f READY
1 3 procnto 15r RECEIVE 1
1 4 procnto 10r RUNNING
1 5 procnto 15r RECEIVE 1
1 7 procnto 15r RECEIVE 1
1 8 procnto 10r RECEIVE 1
1 10 procnto 10r RECEIVE 1
1 11 procnto 15r RECEIVE 1
1 12 procnto 15r RECEIVE 1
1 13 procnto 15r RECEIVE 1
1 14 procnto 15r RECEIVE 1
2 1 proc/boot/devc-con 10r RECEIVE 1
4099 1 proc/boot/pci-bios 12r RECEIVE 1
4100 1 proc/boot/io-net 10r SIGWAITINFO
4100 2 proc/boot/io-net 10r RECEIVE 1
4100 3 proc/boot/io-net 10r RECEIVE 1
4100 4 proc/boot/io-net 10r RECEIVE 1
4100 5 proc/boot/io-net 21r RECEIVE 5
4100 6 proc/boot/io-net 10r RECEIVE 10
4100 8 proc/boot/io-net 10r RECEIVE 1
4100 9 proc/boot/io-net 10r CONDVAR 80701f8
4100 11 proc/boot/io-net 18r RECEIVE 15
4101 1 c/boot/dhcp.client 10r NANOSLEEP
4102 1 sbin/tinit 10r REPLY 1
4103 1 usr/sbin/slogger 15r RECEIVE 1
8200 1 sbin/pipe 10r RECEIVE 1
8200 2 sbin/pipe 10r RECEIVE 1
8200 3 sbin/pipe 10r RECEIVE 1
20489 1 sbin/mqueue 10r RECEIVE 1
131082 1 usr/sbin/random 10r SIGWAITINFO
131082 2 usr/sbin/random 10r RECEIVE 1
131082 3 usr/sbin/random 10r NANOSLEEP
90123 1 sbin/devc-par 10r RECEIVE 1
90123 2 sbin/devc-par 9r CONDVAR 804f938
135180 1 sbin/devc-pty 10r RECEIVE 1
90125 1 usr/sbin/spooler 10r NANOSLEEP
90126 1 sbin/devc-ser8250 24r RECEIVE 1
159759 1 usr/sbin/inetd 10r SIGWAITINFO
278544 1 usr/sbin/dumper 10r RECEIVE 1
94225 1 sbin/devb-eide 10r SIGWAITINFO
94225 2 sbin/devb-eide 21r RECEIVE 1
94225 3 sbin/devb-eide 21r RECEIVE 4
94225 4 sbin/devb-eide 10r RECEIVE 10
94225 5 sbin/devb-eide 10r CONDVAR b037866c
94225 6 sbin/devb-eide 10r RECEIVE 7
94225 7 sbin/devb-eide 10r RECEIVE 7
94226 1 sbin/devb-fdc 10r SIGWAITINFO
94226 2 sbin/devb-fdc 21r RECEIVE 1
94226 3 sbin/devb-fdc 10r RECEIVE 7
94226 4 sbin/devb-fdc 10r CONDVAR b037866c
94226 5 sbin/devb-fdc 10r RECEIVE 4
94226 6 sbin/devb-fdc 10r RECEIVE 4
94227 1 sbin/io-audio 10r SIGWAITINFO
94227 2 sbin/io-audio 10r RECEIVE 1
94227 3 sbin/io-audio 10r RECEIVE 1
94227 4 sbin/io-audio 10r RECEIVE 1
94227 5 sbin/io-audio 15r INTR
294932 1 bin/sh 10r REPLY 2
294933 1 bin/login 10r REPLY 2
294934 1 bin/login 10r REPLY 2
294935 1 bin/login 10r REPLY 2
294936 1 bin/login 10r REPLY 2
294937 1 bin/login 10r REPLY 2
294938 1 bin/login 10r REPLY 2
294939 1 bin/login 10r REPLY 2
294940 1 bin/login 10r REPLY 2
585757 1 ton/bin/helpviewer 10r REPLY 6@odin
360478 1 /photon/bin/Photon 10r RECEIVE 1
405535 1 ton/bin/fontsleuth 6o RECEIVE 1
405535 2 ton/bin/fontsleuth 6o RECEIVE 1
405535 3 ton/bin/fontsleuth 6o RECEIVE 1
405535 4 ton/bin/fontsleuth 10o RECEIVE 1
466976 1 usr/photon/bin/pwm 10r RECEIVE 1
397345 1 hoton/bin/phfontFA 10r RECEIVE 1
438306 1 on/bin/io-graphics 12r REPLY 360478
454691 1 ton/bin/devi-hirun 15r RECEIVE 1
454691 2 ton/bin/devi-hirun 10r REPLY 2
454691 3 ton/bin/devi-hirun 12r SIGWAITINFO
512036 1 r/photon/bin/shelf 10r REPLY 1@odin
512036 2 r/photon/bin/shelf 10r REPLY 1@odin
548901 1 photon/bin/bkgdmgr 10r RECEIVE 1
548902 1 hoton/bin/wmswitch 10r RECEIVE 2
548903 1 r/photon/bin/saver 10r RECEIVE 1
589864 1 n/bin/vserver.file 10r RECEIVE 1
548905 1 /X11R6/bin/Xphoton 10r REPLY 4105@odin
589866 1 usr/sbin/telnetd 10r SIGWAITINFO
589867 1 bin/sh 10r SIGSUSPEND
643116 1 bin/pidin 10r REPLY 1

Hi Brenda,

Thanks for your help; I really do appreciate it.

One major thing that can cause some of your problems is that $HOME
points to / which is not a writeable directory in your case. The ph
script and voyager try to put their config files in $HOME/.ph - if this
directory doesn’t exist it tries to create it. This is where the error
messages you mention are coming from.

Try creating a real directory for your home and let me know what happens.

I assume you’re referring to the “HOME=/” line in the boot image build file?
That was just blindly copied from one of the original samples…

I’ve got the system set up so I get the login prompt in text mode
(‘nophoton’ file present). By the time I’ve logged in, $HOME is set to
“/root”. After I log in, I run Photon manually (“ph”). Could the unwriteable
$HOME affect the workings during boot-up, before login or Photon is run?

I rebuilt the boot floppy, first with HOME=/root, then with no HOME= line at
all. There was no noticeable difference from before.

What shall we try next? :slight_smile:

– DavidG

“Adam Mallory” <amallory@qnx.com> wrote:

“David Goodger” <> dgoodger@atsautomation.com> > wrote in message
news:3c35fb88$> 1@ats2.sentex.ca> …

I tried your suggestion (below) of running the pkg filesystem remotely.
It’s
still not the equivalent of QNX4’s “sinit -r”. It runs, but I have
access
only to those files originating from the canned packages and spillfiles.
I
don’t have access to the server’s underlying filesystem. My modified
/etc/system/sysinit doesn’t can’t see the extra files I’ve created. Is
there
any way to mount the underlying filesystem from a server, and then run
the
package filesystem on top of that?

Well, could use the tcp/ip stack and nfs mount the server.

I tried that (see my original post; it was idea 2); it didn’t work well.
Worse problems than with qnet:

Or write a small
script that symlinks all files on the server side to the local machine,
except the dev,proc and net directories.

That’s what I’ve got running now. I symlink /bin, /etc, /lib/, /sbin, and
/usr in the boot image, then late in the sysinit I symlink all directories
present on the server but not on the workstation (thus skipping /dev, /proc,
and /net, which exist locally by then).

Perhaps you could make a “remote-root” directory on the server which would
contain (or symlink) all the dir/files you wish to export, then use the
export= directive when you start qnet on the server.

I don’t seem to have any problem with access to files at this point. I’ve
got the server’s entire filesystem symlinked piecemeal from /net/.
It’s just that Photon refuses to play ball.

Do you know of anybody who’s already set up this kind of network,
successfully?

Thanks.

– DavidG

Hi David,


David Goodger wrote:

Hi Brenda,

Thanks for your help; I really do appreciate it.


One major thing that can cause some of your problems is that $HOME
points to / which is not a writeable directory in your case. The ph
script and voyager try to put their config files in $HOME/.ph - if this
directory doesn’t exist it tries to create it. This is where the error
messages you mention are coming from.

Try creating a real directory for your home and let me know what happens.


I assume you’re referring to the “HOME=/” line in the boot image build file?
That was just blindly copied from one of the original samples…

I’ve got the system set up so I get the login prompt in text mode
(‘nophoton’ file present). By the time I’ve logged in, $HOME is set to
“/root”. After I log in, I run Photon manually (“ph”). Could the unwriteable
$HOME affect the workings during boot-up, before login or Photon is run?

I rebuilt the boot floppy, first with HOME=/root, then with no HOME= line at
all. There was no noticeable difference from before.

This will create the enviroment variable for the HOME directory but it
doesn’t actually create the directory. You could use
mkdir “home_directory”
to create the directory within your sysinit or you could point HOME to
something that exists - for instance, somewhere inside one of the
symlinks that you created.


What shall we try next? > :slight_smile:

– DavidG

“GUI Group” <gui@qnx.com> wrote in message news:3C3AEEA4.8030406@qnx.com

One major thing that can cause some of your problems is that $HOME
points to / which is not a writeable directory in your case. The ph
script and voyager try to put their config files in $HOME/.ph - if this
directory doesn’t exist it tries to create it. This is where the error
messages you mention are coming from.

Try creating a real directory for your home and let me know what
happens.


I assume you’re referring to the “HOME=/” line in the boot image build
file?
That was just blindly copied from one of the original samples…

I’ve got the system set up so I get the login prompt in text mode
(‘nophoton’ file present). By the time I’ve logged in, $HOME is set to
“/root”. After I log in, I run Photon manually (“ph”). Could the
unwriteable
$HOME affect the workings during boot-up, before login or Photon is
run?

I rebuilt the boot floppy, first with HOME=/root, then with no HOME=
line at
all. There was no noticeable difference from before.


This will create the enviroment variable for the HOME directory but it
doesn’t actually create the directory. You could use
mkdir “home_directory”
to create the directory within your sysinit or you could point HOME to
something that exists - for instance, somewhere inside one of the
symlinks that you created.

/root DOES exist; it gets symlinked during startup (by my
/etc/system/sysinit). By the time I log in, all files on the server are
available on the workstation. The existence of the HOME directory is not the
problem. Which is why this behaviour is such a mystery.

I’ll ask again: has this type* of QNX6 network been successfully deployed by
anyone?

(* Boot-floppy-only workstations booting via the network, mounting the
server’s filesystem as their own.)

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
e-mail: dgoodger@atsautomation.com

Hi David,

I am emailing you a sample build image that was successfully used to do
this.

Regards
Brenda

David Goodger wrote:

“GUI Group” <> gui@qnx.com> > wrote in message news:> 3C3AEEA4.8030406@qnx.com> …

One major thing that can cause some of your problems is that $HOME
points to / which is not a writeable directory in your case. The ph
script and voyager try to put their config files in $HOME/.ph - if this
directory doesn’t exist it tries to create it. This is where the error
messages you mention are coming from.

Try creating a real directory for your home and let me know what

happens.

I assume you’re referring to the “HOME=/” line in the boot image build

file?

That was just blindly copied from one of the original samples…

I’ve got the system set up so I get the login prompt in text mode
(‘nophoton’ file present). By the time I’ve logged in, $HOME is set to
“/root”. After I log in, I run Photon manually (“ph”). Could the

unwriteable

$HOME affect the workings during boot-up, before login or Photon is

run?

I rebuilt the boot floppy, first with HOME=/root, then with no HOME=

line at

all. There was no noticeable difference from before.


This will create the enviroment variable for the HOME directory but it
doesn’t actually create the directory. You could use
mkdir “home_directory”
to create the directory within your sysinit or you could point HOME to
something that exists - for instance, somewhere inside one of the
symlinks that you created.


/root DOES exist; it gets symlinked during startup (by my
/etc/system/sysinit). By the time I log in, all files on the server are
available on the workstation. The existence of the HOME directory is not the
problem. Which is why this behaviour is such a mystery.

I’ll ask again: has this type* of QNX6 network been successfully deployed by
anyone?

I have checked and yes this type of system has been successfully
deployed. I have

(* Boot-floppy-only workstations booting via the network, mounting the
server’s filesystem as their own.)

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
730 Fountain Street, Building 3, Cambridge, Ontario, Canada N3H 4R7
direct: +1-519-653-4483 ext. 7121 fax: +1-519-650-6695
e-mail: > dgoodger@atsautomation.com