Bernhard Frühmesser wrote: > Chunky Kibbles wrote: >> Before having a proper gaming binge, I usually dump whichever game >> it's going to be onto a ramdisk. > Ramdisk! Well i am still exploring all the "secrets" of Linux, so i > don't know how to do many things, but "thanks to whoever" there are the > HOWTO´S. Linux has no secrets... It's open-source! Right. That aside, if you're using a kernel with ramdisks built-in [hint: I never found a website describing how to do this properly], you need to set the maximum size at boot time with the option "ramdisk_size=something". The default is probably 4096k. Leaving out the option just gives you the default. It's ok; if it's built into the kernel, it's already enabled (= If, OTOH, you're using a kernel with them built as modules, you need to [as root, obviously], modprobe rd rd_size=something Again, the default [if you just do "modprobe rd"] is probably not far off 4096k. If you're using SuSE, I'm led to believe the default is 60M. 60M of ram suddenly getting used on your machine for trying what I'm describing here is potentially a bit daft. Anyway. That being done, you need to tell linux to actually make a ramdisk, then you need to put a filesystem on it, and mount it, before you can actually use it. Which is a lot easier than it sounds. First, create a blank ramdisk [well, you could create a big, ugly one, if you really wanted to, but we feel that it would just be a waste of wholesome, useful, entropy (=] dd if=/dev/zero of=/dev/ram0 bs=1M count=4 Which would generate a 4M ramdisk. If you just wanna fill up the ramdisk to it's maximum, you can just pull off a dd if=/dev/zero of=/dev/ram0 and it'll stop when you've run out of space. The maximum is set as described above... When it stops, it'll probably error with something like dd: /dev/ram0: No space left on device which is perfectly normal; it means that the rd module stopped you from using up all your ram with zeros... Using less than the maximum will, actually, use less RAM. So if all you want to do is create a floppy image to play with, you can do it in just 1.44M of RAM. [Notice that you're actually able to create up to 8 ramdisks, /dev/ram{0-7}. With a bit of creativity, you could use a kernel with rd enabled to the default maximum size and lvm, and create an effectively 64M ramdisk. Elsewise, you could just re-complile the kernel with 64M max rd size. The above is left as an altogether pointless exercise to the reader] Anyway. What you now have is a 4M block of allocated space in RAM, for use as a ramdisk. Now you need to create a filesystem on it. [the first time I played with ramdisks, this bit had me stumped for ages because I couldn't simply mount it, and that confused me... grrr....] mke2fs /dev/ram0 Obviously you should read the manpage for mke2fs, or you may want to be playing with mkdosfs or something, but mke2fs is probably your best first bet. Right. What you now have is something in /dev, that has a usable filesystem on it... so mount it: mount -t ext2 /dev/ram0 /mnt/ram0 [you'll probably need to create /mnt/ram0] And that's that. /mnt/ram0 is a 4M piece of space, in RAM. Now, if you're using kernel 2.4, there's a couple other things to do with ramdisks that may or may not be of interest: There's a filesystem called "tmpfs", or "shmfs" on slightly older versions. If you've used Solaris before, you'll know about this. Basically, it's a dynamically resizing virtual filesystem stored in RAM. Mmmm. So whaddya do with it? mount -t tmpfs nothing /tmp Now, your /tmp is a very fast filing system. It is your friend. Use it as a temporary place for compiling things. Use it as a temporary place for totally random other things. It's nice. Do what I do; put some of the bigger bits of UT, quake3, or others in it. Put the whole of quake1 in it. EUS, quake1, and a few others, all at the same time. Why? because I can. If you do not have a lot of primary memory, this will hurt you a lot. Yes, you can smoke your machine with this. But then, to be fair, there are a lot of easier ways to smoke your machine. Notice that, all the way through this, when I say "this uses RAM", what I actually mean is "this uses virtual memory". The difference, by the way, is quite important: If you do overshoot your physical RAM at any point [which linux will quite happily let you do], you also end up using swap. While this may not always be a significant problem for you [as in, stuff that's paged out and isn't going to be needed for ages], if you suddenly get huge issues with hard drive activity [if you play UT with an nVidia, you'll know what this is like], I urge you to stop. But it's your machine, and it's up to do. Hope that was of at least mild interest, Gary (-; PS swapon /dev/ram0 is NOT your friend