Re: Ramdisk on 2.0.36

Riley Williams (rhw@bigfoot.com)
Tue, 6 Oct 1998 21:19:56 +0100 (GMT)


Hi Jerry.

> I am trying to make a ramdisk and set my TMP directory to it so
> intermediate kernel compile files are stored there and hopefully
> speed up my compiles.

> I have slackware 3.5
> Kernel has ramdisk as a module
> looked at Documentation/ramdisk.txt
> Total mem is 128M

You have presumably loaded the ramdisk module first, or have kerneld
running?

> I thought I could do dd if=/dev/zero of=/dev/ram bs=1k count=32768
> for a 32Meg ramdisk (might be more than I need)

Have you told the ramdisk driver to allow 32M ramdisks? Certainly in
the 2.0.35 kernel in use here, it defaults to a maximum of 4M per
ramdisk.

> then mke2fs /dev/ram/ 32768
> then mount -t ext2 /dev/ram /tmp

> However when I do the dd command it says
> dd: /dev/ram no such device.

> the /dev/ram is there to a link of /dev/ram1 which is a block device.

> What am I doing wrong here?

In my case, I've done the following for a 4M ramdisk:

dd if=/dev/zero of=/etc/rd bs=1k count=4096
mke2fs /etc/rd
gzip -9 /etc/rd

Then as part of my startup script, I have the following command before
the "mount -a" line:

gunzip < /etc/rd.gz > /dev/ram

This works for me every time...

Best wishes from Riley.

-
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.tux.org/lkml/