how to mount ramdisk at boot?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: plug-discuss@lists.PLUG.phoenix.az.us
Date:  
Subject: how to mount ramdisk at boot?
Here's how I do it (taken from
http://www.georgetoft.com/linux/firewall/index.html)

in /etc/rc.d/rc.sysinit
# Added 06/16/01 to support RAMDISK logs
action "Setting up /var/log on ramdisk" /bin/true
dd if=/dev/zero of=/dev/ram bs=1k count=4096 > /dev/null
mke2fs -vm0 /dev/ram 4096 > /dev/null
###

See above html page for exact placement - it follows these lines:
# Enter root and /proc into mtab. also added /initrd/loopfs for loopback root
mount -f /initrd/loopfs 2>/dev/null
mount -f /
mount -f /proc


and in /etc/fstab:
/dev/ram /var/log ext2 defaults 1 1

Regards,

George







Quoting Eric <>:

>
> Hi,
>
> I made a ramdisk thus,
> mkdir /tmp/ramdisk0
> mke2fs /dev/ram0
> mount /dev/ram0 /tmp/ramdisk0
>
> What syntax should I use in fstab to remount it at boot? Anything else
> I
> should do?
>
> thx,
>
> Eric
>
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't
> post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>