[Bootcd-user] A Different RAM Disk Approach / RAMTYPE
Mark Clarkson
markjclarkson@hotmail.com
Sun, 6 Jun 2004 16:18:52 +0100
So tmpfs is a souped up ramfs, and a ramdisk is something completely
different. The only thing gained by using tmpfs is limit checking since
we have no swap. (sounds useful to me)
Vlado Plaga wrote:
> - My current working computer (PPC with a 2.6.6 kernel) does not want
> to mount a tmpfs disk, but mounts ramfs. It says:
>
> mount: wrong fs type, bad option, bad superblock on tmpfs,
> or too many mounted file systems
Scary! - This would make
RAMTYPE="<tmpfs|ramfs|ramdisk|auto>"
to allow you to drop back to ramfs on the 2.6.6 kernel on PPC.
So for the 'auto' case:
If kernel >= 2.4 then
RAMTYPE=tmpfs if CONFIG_TMPFS found
RAMTYPE=ramfs if CONFIG_RAMFS found
otherwise RAMTYPE=ramdisk
else
RAMTYPE=ramfs if CONFIG_RAMFS found
otherwise RAMTYPE=ramdisk
endIf
I suppose we would also need
TMPFS_SIZE=<size in mb|auto>
where auto would be half the memory(?).
To start I would probably keep /ram1 and /ram2 and only symlink
from /ram[1|2] to the tmpfs/ramfs directory. I think this would
'waste' around 4mb in inodes but better than breaking everything.
Hopefully bootcd2disk would not need modifying by doing it this
way.
Also I would only store /tmp, /home, /root and /var on the tmpfs
mount leaving /etc and /dev where they are on /ram1.
Sound okay?
Cheers
Mark.