RAM partition on boot
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
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.