Re: ramdisk size clarification

Mike Castle
2001-12-17T21:14:54Z

On Mon, Dec 17, 2001 at 08:41:32PM +0000, Padraig Brady wrote:
> and also there is no upper limit on the amount of RAM used,
> so the following will kill your system (well it did for me):
> dd if=/dev/zero of=/dev/ram0

Bug in recent 2.4.*. It *should* stop. One line patch has been
posted to the linux-kernel list a couple of times. Check the archive.
It's probably in the recent pre-release kernels as well.

As a work around, try the following:

count=`blockdev --getsize /dev/ram0`
bsize=`blockdev --getss /dev/ram0`
dd if=/dev/zero of=/dev/ram0 count=${count} bs=${bsize}

--
Mike Castle dalgoda@ix.netcom.com www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc