Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How to mount ramdisk upon startup

  1. #1
    Join Date
    Mar 2010
    Beans
    37

    How to mount ramdisk upon startup

    Whats the easiest way to mount a ramdisk upon startup? Preferably answer with directions for terminal.

  2. #2
    Join Date
    Jul 2010
    Location
    /run/shm
    Beans
    820
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How to mount ramdisk upon startup

    No need. It's already there in /dev/shm. It has 50% of your RAM as possible space, by default (Don't worry, unused shm space is not lost unlike in Windows). Also once Ubuntu 11.10 hits the scene you will also find it in /run/shm
    Quote Originally Posted by Linus Torvalds
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

  3. #3
    Join Date
    Mar 2010
    Beans
    37

    Re: How to mount ramdisk upon startup

    **Edit*** Oh, I see.

    --And I have ubuntu 10.04.
    Last edited by tckotb; September 22nd, 2011 at 07:46 PM.

  4. #4
    Join Date
    Mar 2010
    Beans
    37

    Re: How to mount ramdisk upon startup

    What was that about unused shm space?

  5. #5
    Join Date
    Jul 2010
    Location
    /run/shm
    Beans
    820
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How to mount ramdisk upon startup

    No. /dev/shm is a mountpoint so you see it as a folder and can do stuff inside it like in any other mountpoint or folder.
    And by auto copying you could tell your PC to do that but could you say what exactly you need to copy there? I could show you how to do that later (Eg: File, files (Both never move), folder (Files inside might change)


    When you put something inside /dev/shm, some space in RAM get's allocated to that file, if you delete it, it get's freed. In Windows if you create a RAMDisk, the RAM is permanently allocated for the whole RAMDisk.
    As in, in your RAM, /dev/shm never uses more than it needs to.
    Quote Originally Posted by Linus Torvalds
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

  6. #6
    Join Date
    Mar 2010
    Beans
    37

    Re: How to mount ramdisk upon startup

    Well I need all files and sub directories in /home/user/temp/ to go into /dev/shm/, then at shutdown go back into /home/user/temp/.

  7. #7
    Join Date
    Mar 2010
    Beans
    37

    Re: How to mount ramdisk upon startup

    and the files need to be copied over to /dev/shm before a specific init script runs.

  8. #8
    Join Date
    Aug 2009
    Location
    Under the stairs.
    Beans
    1,408
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to mount ramdisk upon startup

    You realize that the information/data you move there is volatile and can get wiped or corrupted if there is a loss of power. Just saying this isn't such a great idea.
    Dell Inspiron 1764 Laptop, Intel CoreTM i5 520M), 4GB Shared Dual Channel DDR3 at 1066MHz, 512MB ATI Mobility RadeonTM HD4330 Integrated Intel HD.

  9. #9
    Join Date
    Mar 2010
    Beans
    37

    Re: How to mount ramdisk upon startup

    Dont worry about the data being wiped, I already set up a cronjob to back it up every hour.

  10. #10
    Join Date
    Aug 2009
    Location
    Under the stairs.
    Beans
    1,408
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to mount ramdisk upon startup

    I wasn't worrying...it's your data and you failed to mention the cronjob to backup...
    Dell Inspiron 1764 Laptop, Intel CoreTM i5 520M), 4GB Shared Dual Channel DDR3 at 1066MHz, 512MB ATI Mobility RadeonTM HD4330 Integrated Intel HD.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •