QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Cannot delete first two files on RAMDISK using QNX4.25. |
Ref. No. |
QNX.000009346 |
Category(ies) |
Filesystem |
Issue |
For some reason the RAMDISK under QNX 4.25 will not allow the first two files to be deleted. |
Solution |
There is a problem with the first two files. QNX expects four files to be created with the dinit. These four files cannot be removed. They are the .inode, .bitmap, .altboot and .boot. When creating a ramdisk with 4.25 the .altboot and the .boot files are not being created. This means the first two files which you create on your ramdisk will not be able to be removed.
If you are booting from disk, then you need to specify the -r <ramdisk_sz> option to Fsys in your boot image.
Fsys -r 4096
This creates an entry in the namespace called /dev/ram
Then in your /etc/config/sysinit.<node> file you need to initialize the ramdisk:
dinit /dev/ram
Then mount the ramdisk:
mount /dev/ram /ram
At this point if you use the following command:
ls -la /ram
you should see:
drwxrwxr-x 3 root wheel 2048 Feb 23 11:27 ./ drwxrwxr-x 3 root wheel 2048 Feb 23 11:27 ../ -r--r--r-- 1 root wheel 250 Feb 23 11:26 .bitmap -r--r--r-- 1 root wheel 512 Feb 23 11:26 .inodes
To eliminate the problem described earlier about the missing files, you should create two dummy files right after you mount the ramdisk:
touch /ram/.ignore1 touch /ram/.ignore2
Then a subsequent "ls -la /ram" will show: drwxrwxr-x 3 root wheel 2048 Feb 23 11:27 ./ drwxrwxr-x 3 root wheel 2048 Feb 23 11:27 ../ -r--r--r-- 1 root wheel 250 Feb 23 11:26 .bitmap -rw-rw-r-- 1 root support 0 Feb 23 11:26 .ignore1 -rw-rw-r-- 1 root support 0 Feb 23 11:26 .ignore2 -r--r--r-- 1 root wheel 512 Feb 23 11:26 .inodes
|
|