Difference between revisions of "RAM partition on boot"

From Idrive
Jump to navigation Jump to search
(Created page with "==Mounting a tmpfs RAM partition on boot== • The first step is to create a directory where the tmpfs partition will be mounted: example: mkdir -p /mnt/ramdisk • After tha...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Mounting a tmpfs RAM partition on boot==
 
==Mounting a tmpfs RAM partition on boot==
  
The first step is to create a directory where the tmpfs partition will be mounted:
+
* The first step is to create a directory where the tmpfs partition will be mounted:
 
example: mkdir -p /mnt/ramdisk
 
example: mkdir -p /mnt/ramdisk
After that, /etc/fstab must be opened with a text editor like vi.
+
 
At the end of the file write the following line and DO NOT edit anything else:
+
* After that, /etc/fstab must be opened with a text editor like vi.
tmpfs /mnt/ramdisk tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=128M 0 0
+
 
 +
* At the end of the file write the following line and DO NOT edit anything else:
 +
 
 +
tmpfs /mnt/ramdisk tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=128M 0 0
 +
 
 
where /mnt/ramdisk can be replaced by any existent directory you want and 128M can be replaced with
 
where /mnt/ramdisk can be replaced by any existent directory you want and 128M can be replaced with
 
the maximum amount of space the partition will have.
 
the maximum amount of space the partition will have.
Save the file.
+
 
On each boot you will have a tmpfs ramdisk mounted on the specified directory with size equal
+
* Save the file.
 +
 
 +
* On each boot you will have a tmpfs ramdisk mounted on the specified directory with size equal
 
to the specified size.
 
to the specified size.

Latest revision as of 09:22, 8 August 2014

Mounting a tmpfs RAM partition on boot

  • The first step is to create a directory where the tmpfs partition will be mounted:

example: mkdir -p /mnt/ramdisk

  • After that, /etc/fstab must be opened with a text editor like vi.
  • At the end of the file write the following line and DO NOT edit anything else:
tmpfs /mnt/ramdisk tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=128M 0 0

where /mnt/ramdisk can be replaced by any existent directory you want and 128M can be replaced with the maximum amount of space the partition will have.

  • Save the file.
  • On each boot you will have a tmpfs ramdisk mounted on the specified directory with size equal

to the specified size.