Skip to contentSkip to conversation

2.6.x mount /dev/ram0 problem.

DISCUSSION Siseci 3 participants 3 messages Mar 29, 2004 – Mar 30, 2004

lore
Share & tools
lore

Siseci

author
#0 lore raw

Hi.
I have a problem about ramdisk.
Kernel version: 2.6.3 and 2.6.4

root@fen:~# dd if=/dev/zero of=/dev/ram0 bs=1024 count=2048
2048+0 records in
2048+0 records out
root@fen:~# mke2fs /dev/ram0
mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
....
root@fen:~# mount /dev/ram0 /mnt
root@fen:~# ls -al /mnt
total 17
drwxr-xr-x   3 root     root         1024 Mar 29 20:28 ./
drwxr-xr-x  22 root     root         4096 Dec 16 02:28 ../
drwxr-xr-x   2 root     root        12288 Mar 29 20:28 lost+found/
root@fen:/mnt# echo test > /mnt/test
root@fen:/mnt# ls -al /mnt
total 18
drwxr-xr-x   3 root     root         1024 Mar 29 20:29 ./
drwxr-xr-x  22 root     root         4096 Dec 16 02:28 ../
drwxr-xr-x   2 root     root        12288 Mar 29 20:28 lost+found/
-rw-r--r--   1 root     root            5 Mar 29 20:29 test
root@fen:~# umount /mnt
root@fen:~# mount /dev/ram0 /mnt
root@fen:~# ls -al /mnt
total 17
drwxr-xr-x   3 root     root         1024 Mar 29 20:28 ./
drwxr-xr-x  22 root     root         4096 Dec 16 02:28 ../
drwxr-xr-x   2 root     root        12288 Mar 29 20:28 lost+found/

My test file does not appear on /mnt.
This was working with 2.4 kernels
i think the problem is related with 2.6 kernels
What is the problem?

#1 lore raw
Quoted 5 lines · Siseci

Hi.
I have a problem about ramdisk.
Kernel version: 2.6.3 and 2.6.4

[SNIPPED...]

Verify that /dev/ram0 is not still mounted on /initrd. I noticed that the stuff that uses initrd and pivot-root for booting, works 'strangely' compared to the past. You may find that /initrd remained mounted when you initialized its virtual device, confusing the issue.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

#2 lore raw
In reply to Siseci
Quoted 9 lines · Siseci
root@fen:~# umount /mnt
root@fen:~# mount /dev/ram0 /mnt
root@fen:~# ls -al /mnt
total 17
drwxr-xr-x   3 root     root         1024 Mar 29 20:28 ./
drwxr-xr-x  22 root     root         4096 Dec 16 02:28 ../
drwxr-xr-x   2 root     root        12288 Mar 29 20:28 lost+found/
Quoted 4 lines

My test file does not appear on /mnt.
This was working with 2.4 kernels
i think the problem is related with 2.6 kernels
What is the problem?

It's a 2.6 bug which I haven't fixed yet.