how to boot or run QNX 4.25 from RAMDISK?

The DiskOnChip2000 in my system occasionally crash. So I have a plan to run QNX in RAMDISK to reduce the access to DOC.

Can anybody give me some advice or help?
Thanks.

You cannot boot from a RAMDISK ( unless it’s a device that looks like a harddisk, like the RAM disk card from GIGABYTES).

But you can run from it. At boot time copy a the file to the ram disk ( see -r option of Fsys ) and set your path to load from there.
Or once the copy is completed you can unmount the DOC and mount the ramdisk as /. There are lots of possibility.

What do you mean by the DOC crashes?

Thsnks. It is a good idea. I will try to do it.

The control box which run QNX in a DOC is in a relative terrible environment. Sometimes QNX can not startup after about half a year’s operation. Maybe some file in DOC is missing or damage and the Message “Input/output error” is printed.

Unless you can disable the DOC, cutting power to it, I very much doubt running from ram will make any difference. You could maybe run the DOC in readonly mode in case it some write operation that creates the problem.

I has rebuilt the boot image with “Fsys -r” option.
And I wrote the file sysinti.1:

[code]dinit /dev/ram
mount /dev/ram /ram

…make dir and copy some files to ramdisk…

cd /ram/bin
ln -s ksh sh
ln -s Dev32 Dev
ln -s Dev32.ansi Dev.ansi
ln -s Dev32.pty Dev.pty

cd /
prefix -R /=/ram/
export TZ=cst-08
/bin/rtc -l hw

Dev &
Dev.ansi -Q -n1 &
reopen /dev/con1
Dev.pty &

tinit -t /dev/con1 &[/code]

then reboot, I get the message:

prefix: can't detach prefix (/):Resource busy

Maybe when sinit is processing the sysinit.1, prefix can’t detach (/).
After loginng on, I input the command “prefix -R /=/ram”, the command execute successfully.

Now my problem is the system can not execute the command “prefix -R /=/ram” automaticlly.