How do i create RAM drive under ubuntu. And would he automounted at startup?
2 Answers
Quote from http://www.omgubuntu.co.uk/2010/11/move-google-chrome-cache-to-ramdisk/:
gksu gedit /etc/fstab
Add the following line to the bottom of the text file that opens but BE CAREFUL – do not touch, edit or enter ANYTHING else:
tmpfs /media/ramdisk tmpfs defaults,noatime,mode=1777 0 0
-
-
-
1
-
2It looks like the source was deleted / moved. But all the important stuff is written in the post above :)– PrawełJan 12, 2011 at 8:30
-
1Note that directory /media/ramdisk must exists of the tmpfs mount will fail. Doing
mkdir -p /media/ramdisk
once before adding the above infstab
will be enough. May 8, 2020 at 8:12
I don't quite know what you mean with a RAM drive but if you mean more swapspace, you'll have to use a livecd with gparted, add a new swap partition, and then edit /etc/fstab to make the swap partition mount on boot.
Be careful, though, since making a mistake while editing fstab could have disastrous results and your system may not boot up anymore.
Also, you can mount two partitions under the same name, like swap.
-
It woul boot up, if backup fstab and if error occurred recover it with live cd =), but i mean a RAM-Drive, not swap or anything else. I want to take a lot of space from my RAM, and make it space as drive...– litvin05Nov 7, 2010 at 20:08