System Hangs at Boot

Hi again,

I am trying to get a custom kernel to boot on a PC104 board.

I can build the image and transfer it to the hard drive successfully. (Finally figured that out!)

However, after starting pterm in the background, the boot just hangs forever-I can’t press any keys or esc or open a terminal etc.

I have made the .ifs file from the buildfile.

The kernel runs a series of scripts on startup-started in the buildfile. It is these scripts that seem to be hanging.

So the buildfile calls: → mounts the hard drive> does nothing and calls>starts rest of the boot programs hangs after starting the pterm on the last line:
pterm /proc/boot/ksh &

I am trying to figure out where the failure is in the files and am not sure where to go from here. I am wondering how to determine if the failure is in the pterm start line above or if the failure occurs later on in the buildfile after these scripts have been run.

The 3 files have been attached.

If you can, start tcpip and qconn then use the IDE to do diagnostic.

Thanks mario-I have tried this and everything seems to be okay-at least when I telnet in.

However-its very annoying that I don’t have a terminal or anything when I attach the keyboard/mouse/screen, and I am going to need it later I think when I configure this drive for a bridge network.

Is there something I can add to the script to prompt a display of a login terminal? How is this setup when building a kernel?



Looking at your script everything seems to be doing exactly what is expected.

devc-con -n6
waitfor /dev/con1 
display_msg "Opening con1"
reopen /dev/con1
### finds adlink bootable hard disk and mount it as / 
[+session] /proc/boot/
### starts inturn, all the drivers are started
### in script. The log will be in start1.log
[+session] /adlink/ &
reopen /dev/con2
[+session] ksh &  

It runs your script. Then you launch ksh into the background as a daemon process. Hence it’s not attaching to the console. Try removing the & after the ksh.

Note: If you ever exit/logout of this console, you’ll never get back in again because at that point there is nothing to restart ksh. This is why I typically use tinit to perpetually re-open consoles.


Hi Tim,

After a pause in the project:

I had a look at that. I tried removing the & after ksh and nothing changed. System still hung after “Starting terminal”

I also tried removing the & after ksh starts in and got a memory fault and the hang.

Not sure where in the script the hang is coming from yet.

*On a side note, with some compatibility issues between the processors, this script:

boots the wrong drives, but spits out a terminal in the end. Can’t see how my initializations are any different? I’ve tried to modify the calls to be similar but still no command line interface.


Looking again in your build file I see:

  1. [+session] /adlink/ &

But you don’t have a At least not in the zip archive you uploaded. You only have a I doubt this is the problem but you can at least clean this up if there is no longer a

  1. reopen /dev/con2
    [+session] ksh &

This means you are starting your terminal on console 2, not console 1. By default you see console 1 when you exit photon/boot QNX. You need to press CTRL-ALT-2 to get to console 2. Your login may be there waiting for you.

I looked in the my own build script and mine ends with

reopen /dev/con1
[+session] login &
reopen /dev/con2
[+session] login &
reopen /dev/con3
[+session] login &
reopen /dev/con4
[+session] login &

Which gives me 4 consoles waiting at the login prompt (with a -f username you can autologin).


P.S. I can’t access the script you linked to without a user account there.

ah-sorry about that-didn’t realize.

I seem to have found a solution for now. As is, I tried the commands to switch to different consoles without success.

I then removed everything relating to io-display, photon, windows manager, etc. from the script.

After that, while I still get photon errors, I am able to change to a different console with a command line. I will need to look into the script to see exactly which line removed was causing the issues.

Thanks for the help!