LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to create RAM drive? (https://www.linuxquestions.org/questions/slackware-14/how-to-create-ram-drive-67583/)

carboncopy 06-23-2003 08:39 PM

How to create RAM drive?
 
Hello everybody!

I would like to create a RAM drive using my Slackware 9. I tried compiling the RAM disk option and set the size as I wish (of course in Mx1024) in to the kernel.

I check the ramdisk.txt which comes with the kernel doc, that doesn't come helpful.

Basically, I want a RAM drive so I can mount it like any other drive. And use it like any other drive. Specifically, I want to do video editing/recording (maybe not a smart idea for recording :).

Oh yuh, one more question. I have 1GB of RAM on my comp. Why is /proc/meminfo reporting 9024XX(can't remember the exact number)?

Thanks in advance.

Kheng Teong.

zmedico 06-23-2003 09:42 PM

My /var/log/demsg says:
Quote:

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Those disks are accessible in /dev/ram0 through /dev/ram15 and they can be formatted and mounted just like a floppy disk or something.

carboncopy 06-23-2003 10:13 PM

In other words I just need to compile the kernel to support RAM disk and access it by mounting /dev/ramX.

So after booting up my Linux, just format it using
mke2fs [-j] /dev/ram0
and then
mount /dev/ram0 /mnt/ramdrive
and then I would able to use it as I wish.
Please correct me if I am wrong or missing out any steps.

Thanks.

zmedico 06-23-2003 10:32 PM

Quote:

Originally posted by carboncopy
In other words I just need to compile the kernel to support RAM disk and access it by mounting /dev/ramX.
Yes, you can configure the ramdisk parameters before you compile the kernel. Also, you can specify ramdisk parameters as kernel parameters at boot time. See /usr/src/linux/Documentation/kernel-parameters.txt


All times are GMT -5. The time now is 04:16 PM.