Re: 2.1.118 ramdisk

Fuzzy Fox (fox@dallas.net)
Mon, 31 Aug 1998 00:18:44 -0500


Charlie Ross <rossc@cs.colostate.edu> wrote:
>
> I am a little confused about tht behavior of the ramdisk.

The ramdisk is a block device, but you are trying to treat it like a
character device.

> If I cp /etc/fstab /dev/ram1, I get an I/O error, and when I cat /dev/ram1
> to see if anything made it in, it turns out that only the first 1024 bytes
> make it, and then I get a second I/O error on the read.

That's because it wants blocks of data, not bytes.

The useful way to use a ramdisk is to treat it like a disk device (a
small one), and create a filesystem on it. newfs /dev/ram1, mount it,
etc.

-- 
   fox@dallas.net (Fuzzy Fox)      || "Nothing takes the taste out of peanut
sometimes known as David DeSimone  ||  butter quite like unrequited love."
  http://www.dallas.net/~fox/      ||                       -- Charlie Brown

- 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