[TriLUG] how to make an arbitrarily sized ramdisk?

Benjamin Reed ranger at befunk.com
Wed Oct 3 23:22:25 EDT 2001


Donald Ball [balld at webslingerz.com] wrote:
> hey guys, i'm trying to allocate 64M of memory and mount it as a
> filesystem. i've gotten this far:
> 
> mke2fs /dev/ram0
> mount /dev/ram0 /mnt/ramdisk
> 
> but that just uses that 4M default ramdisk size. it would seem that you
> can change the size of a ramdisk like so:
> 
> rdev -r /dev/ram0 65536
> 
> but that doesn't change anything. any clues for me?

Digging through the source it looks kind of like you have to
pass rd_size=<size in kbytes> on either the kernel command-line
or the insmod command-line if you built it as a module.

I'm no C coder though, so I could be wrong...  The bits I'm finding
are in drivers/block/rd.c in the kernel tree, if you want to look
a little closer.

-- 
Ben Reed a.k.a. Ranger Rick (ranger at befunk.com)
http://defiance.dyndns.org/ / http://radio.scenespot.org/
"Right now Moltar is heating my skull up to a scorching 450 degrees.
It's like getting a scalp massage... from Lucifer." -- Space Ghost



More information about the TriLUG mailing list