View topic - how to boot or run QNX 4.25 from RAMDISK?

how to boot or run QNX 4.25 from RAMDISK?

For the old QNX2 and QNX4 RTOS

how to boot or run QNX 4.25 from RAMDISK?

Postby cnzxy » Mon Jul 28, 2008 2:02 am

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.
cnzxy
Active Member
 
Posts: 25
Joined: Mon Feb 28, 2005 2:39 am

RE: how to boot or run QNX 4.25 from RAMDISK?

Postby mario » Mon Jul 28, 2008 1:56 pm

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?
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: RE: how to boot or run QNX 4.25 from RAMDISK?

Postby cnzxy » Thu Jul 31, 2008 7:37 am

mario wrote: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.


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

mario wrote:What do you mean by the DOC crashes?


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.
cnzxy
Active Member
 
Posts: 25
Joined: Mon Feb 28, 2005 2:39 am

RE: Re: RE: how to boot or run QNX 4.25 from RAMDISK?

Postby mario » Thu Jul 31, 2008 2:15 pm

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.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby cnzxy » Tue Oct 28, 2008 9:55 am

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

Code: Select all
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 &




then reboot, I get the message:
Code: Select all
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.
cnzxy
Active Member
 
Posts: 25
Joined: Mon Feb 28, 2005 2:39 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 4 guests

cron