Caution: This version of this document is no longer maintained. For the latest documentation, see


Driver for RAM disk interface (QNX Neutrino)

Note: You must be root to start this driver.


devb-ram [cam option[,option]...]
         [disk option[,option]...] 
         [ram option[,option]...]
         [blk option[,option]...] &

Runs on:



Note: Use commas (,) to separate the options. You can put the cam, disk, ram, and blk groups of options in any order.

cam options

Be quiet: don't display any information on startup.
Be verbose.

disk options

The disk options control the driver's interface to If specified, they must follow the disk keyword. For more information, see

ram options

The ram options control the driver's interface to RAM:

The physical address to overlay. The default is not to overlay.
Set the sector size. The default is 512 bytes.
Specify the capacity of the RAM drive in the blocks of the size specified by the blksize option. The default is 4096 blocks (2 MB).
Don't partition the RAM disk or format a QNX 4 filesystem on it.

blk options

The blk options control These options must follow the blk keyword and must be specified after any general or disk options. For more information, see


The devb-ram driver creates a RAM disk interface. When the capacity option isn't specified, devb-ram creates a 2 MB RAM disk.

By default, devb-ram partitions the RAM disk, leaving one block for the partition table itself, and making the remainder of the RAM disk (capacity minus 1) a t77 partition, which it then initializes (internally, not by spawning dinit) to have a blank filesystem on it. If you specify the nodinit option, you can later manually format it, optionally partition the RAM disk with fdisk (but you can make the whole thing a filesystem), and then mount it.

Note: By default, allocates 15% of system RAM for cache. The devb-ram system looks like a disk drive to, so it doesn't know that the cache is unnecessary. You should use the blk cache=... option to reduce the cache size.

Because devb-ram is a block device which reads from and writes to RAM, its operations go through a lot of layers before they actually get to RAM. For a RAM disk with better performance, use the blk ramdisk=... option to For more information, see RAM disks in the Connecting Hardware chapter of the QNX Neutrino User's Guide.


Create a 4 MB RAM drive:

devb-ram ram capacity=8192 &


The devb-ram driver causes to adopt various block special devices under /dev. These devices are normally named hdn, where n is the physical unit number of the device.

This driver could also require the following shared objects:

Binary Required For RAM disk access. Always

Exit status:

The devb-ram driver terminates only if an error occurs during startup, or if it has successfully forked itself upon startup because it hadn't been initially started in the background.

The devb-ram driver wasn't started in the background and therefore forked itself. The original process terminated with a zero exit status, the forked process continued.
> 0
An error occurred during startup.


While there's no limit to the size of a disk or partition, I/O (i.e. the lseek(), read() and write() functions) is currently limited to 2 gigabytes per partition (or disk). This I/O limit has no effect on the partition size for mounted filesystems.

Known supported functions include:

chmod(), chown(), close(), closedir(), creat(), devctl(), dup(), dup2(), fcntl(), fpathconf(), fstat(), lseek(), mkdir(), mkfifo(), mknod(), open(), opendir(), pathconf(), read(), readdir(), readlink(), rewinddir(), rmdir(), stat(), symlink(), unlink() (not supported for directories), utime(), write()

Note that certain calls (such as pipe(), as well as read() and write() on FIFOs) may require the pipe manager.

See also:

cam-*, devb-*, dinit, fdisk, fs-*,

RAM disks in the Connecting Hardware chapter, and Filesystems and block I/O (devb-*) drivers in the Fine-Tuning Your System chapter of the QNX Neutrino User's Guide