Can't mount a ramdisk on startup
I want a 'ramdisk' on my server, so some temporary files can be stored in the RAM. I can create a ramdisk like this:
riksserver root # mke2fs -j /dev/ram0
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2048 inodes, 8192 blocks
409 blocks (4.99%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
riksserver root # mount -t ext3 /dev/ram0 /ramdisk
And it works! But I want this to be done every time Linux boots.
So I put this in the fstab:
/dev/ram0 /ramdisk ext3 noatime 0 0
But of course it doesn't work, because /dev/ram0 needs to be created with an ext3 filesystem first.
How can I mount ram0 as ext3 every time I boot Linux?
I am using Gentoo Linux, btw.
|