>You need to make a filesystem (one of mke2fs /dev/ram1 BLOCKS, mkromfs
>... etc.). Then you need to mount it (mkdir /ramdisk; mount /dev/ram1
>/ramdisk). Then you can poke about in /ramdisk.
Okay, understood, (/dev/ram is a symlink to /dev/ram1) this fixes SOME
problems but the device is still flakey,
Observe:
#mke2fs /dev/ram 4096
mke2fs 0.5b, 14-Feb-95 for EXT2 FS 0.5a, 95/03/19
1024 inodes, 4096 blocks
204 blocks (4.98%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
1 block group
8192 blocks per group, 8192 fragments per group
1024 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
#mount /dev/ram -t ext2 /ramdisk/
#cp /etc/fstab /ramdisk
#ls /ramdisk
fstab lost+found/
#diff /ramdisk/fstab /etc/fstab
#touch /ramdisk/file2
touch: /ramdisk/file2: I/O error
#ls /ramdisk
#umount /ramdisk/
#freeramdisk
Thats an actual copy/paste of my console, Nothing ommitted.. for some
reason after the first couple real read operations, the device goes dead.
Heres another interesting one:
#mke2fs /dev/ram 4096
mke2fs 0.5b, 14-Feb-95 for EXT2 FS 0.5a, 95/03/19
1024 inodes, 4096 blocks
204 blocks (4.98%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
1 block group
8192 blocks per group, 8192 fragments per group
1024 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
#fsck /dev/ram
Parallelizing fsck version 0.5b (14-Feb-95)
e2fsck 0.5b, 14-Feb-95 for EXT2 FS 0.5a, 95/03/19
fsck.ext2: Attempt to read block from filesystem resulted in short read
while trying to open /dev/ram
The filesystem superblock is corrupt. Try running e2fsck with an alternate
superblock using the -b option. (8193 is commonly an alternate superblock;
Hence, 'e2fsck -b 8193 <device>' may recover the filesystem.)
#freeramdisk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html