Ramdisk

The normal way we make a ramdisk is to make a .boot file with

Fsys -r 1024

in to get a 1M ram disk and then after boot do

dinit /dev/ram
mount /dev/ram /ramdisk

However, if we are on an existing system without a ramdisk and want to make
one on the fly (to do some troubleshoot logging without straining the
flashdisk), what can we do? If we try to start Fsys again we get

Fsys failed to attach name: Resource busy

since “/” (root) is owned by the already running Fsys. Any tips?

Terje Trane <trane@systek.no> wrote:

The normal way we make a ramdisk is to make a .boot file with

Fsys -r 1024

in to get a 1M ram disk and then after boot do

dinit /dev/ram
mount /dev/ram /ramdisk

However, if we are on an existing system without a ramdisk and want to make
one on the fly (to do some troubleshoot logging without straining the
flashdisk), what can we do? If we try to start Fsys again we get

Fsys failed to attach name: Resource busy

since “/” (root) is owned by the already running Fsys. Any tips?

You can use the (undocumented) -N option to Fsys to start a second
invocation of Fsys.

e.g.

Fsys -Nfs -r1024 &
dinit /dev/ram
mound /dev/ram /ramdisk

Or, you could try the vdir utility.

-David

QNX Training Services
dagibbs@qnx.com