You are not logged in.

#1 2004-04-10 01:38:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Ram disk setup

big_smile  smile

   Wish to try ramdisk in kernel 2.6.5 and desire 64MB size.  Have 1gb ram.

   Have the following steps derived from internet..

     mkdir /mnt/tmp
      mkdir /tmp/ramdisk0
     mke2fs /dev/ram0 [size in base2kB]; in my case 65536 (kernel entry is 4096)
    mount -t /dev/ram0/tmp/ramdisk0

    Perhaps the following is required in fstab:

   /dev/ram0       /mnt/tmp   ext2     defaults,users      0      1
 
   The above is a little confusing as to the mnt commands...

   Is there also a requirement for lilo even if ramdisk isn't used for boot?

   This question is prompted by the references made to initrd in the internet examples stating it was required for ramdisk use.  Lilo also permits the change in size, which might be required as well.  This is shown established as an append=...........

     Please advise big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2004-04-12 15:48:49

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ram disk setup

big_smile  smile

   After many google searches, found a solution to my ramdisk setup...

  I use Lilo to boot so the append statement has an added entry:

       "ramdisk_size=384000"   ......(Size desired in KB is entered here)

       Run /sbin/lilo...

       Reboot....

   At command line enter the following:

      mkdir /tmp/ramdisk0....enter
      mke2fs /dev/ram0...enter
      mount -t ext2 /dev/ram0 /tmp/ramdisk0

  The ramdisk will then be mounted and made available in disc free kde where it can be entered into file manager.
     Each time the system is rebooted, the ram disk size is available but the three entries above will have to be re-entered in order to use ramdisk....
   

............................................................................................................................................

0=1, When?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2004-04-13 06:04:58

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ram disk setup

big_smile
  Another possible method to enable ramdisk(s)....

        mkdir /mnt/ramdisk(number of disk is entered here, ie.ramdisk2...3....4....5..etc
        mount ext2 /mnt/ramdisk(number) -t tmpfs

       also possible:
        mount ext3 /mnt/ramdisk(number) -t tmpfs

  Mount of both ext2 and ext3 on separate ramdisks is possible.

     My system has lilo append set to 500000KB and each of the two ramdisks accepts 449mb of video files providing half of a divx DVD on each ramdisk.

     Perhaps there is another way?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2004-04-13 06:36:11

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ram disk setup

big_smile
   Another possibility...
      mkdir /mnt/ramdiskx /mnt/ramdiskx+1 /mnt/ramdiskx+2....etc

     mount X /mnt/ramdiskx -t tmpfs..... x is the ramdisk number...

    mount as many as desired up to 255

         Sample;  mount 2 /mnt/ramdisk2 -t tmps

      Works fine!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2004-04-16 01:55:15

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ram disk setup

big_smile  smile

   Still another method(Which might be the best)...
             mkdir -p /RAMX   (where X is a number i.e.2,3 ,4 ....)
             mount -t ramfs none /RAMX -o maxsize=(desired file size KB)

  Install file to be run in RAMX.  (or more RAMX files as needed)

    In my case, DVD vidx or .vob files are intended.

   Files run in gmplayer in ram eliminating use of hard drive for hours of operation.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2004-04-16 17:58:04

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Ram disk setup

big_smile
  A new twist in the ramdisk story...

   If a file is loaded in RAM1 and the system is rebooted, the file in RAM1 remains in RAM1 until the ramfs is remounted. 

  If one desires to retain the file in RAM1 it can be transferred to disk prior to remount of the ramdisk RAM1.  Thusly, data in ramdisk can be recovered after reboot.

  If one remounts ramfs in RAM1, the data therein is wiped.

If one leaves RAM1 with data installed upon reboot, a second ramfs in RAM2 can be initiated without disturbing RAM1.  The contents of RAM1 are available for entry into RAM2 if the situation warrants such file handling.

The ram limit is one half of physical ram and is available on RAM2 in the case described.

  If two RAM files are mounted simultaneously, the ram limit applies in toto for the two(or more) RAM files mounted.

    big_smile  big_smile  big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB