Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I added the third line to /etc/fstab.

proc  /proc       proc    defaults                   0     0
none  /dev/pts    devpts  rw                         0     0
tmpfs /dev/shm    tmpfs   defaults,noexec,nosuid     0     0

Then I run mount -a to mount it. The problem is that when I reboot, I again have to run mount -a. Is there another file I should be editing to make these changes permanent, or have mount -a run automatically?

In case it matter, I'm running on a VPS on MediaTemple.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

find your Linux distributions $ cat /etc/*-release

for RH based you can

  • add your modify /etc/rc.local (add mount -a in the end of file)
  • Run "gnome-session-properties" (GUI) and add your mount to startup

for Debian based

  • modify /etc/xdg/autostart (add your mount -a in the end of file)
  • Run "gnome-session-properties" (GUI) and add your mount to startup

for more information you can google <ditro name> start up <script | application>

share|improve this answer
    
Thanks for the info. I am running Ubuntu 11.04. It has both /etc/xdg/autostartand /etc/rc.local. Some googling made me think I should use the rc.local. Is one preferred? –  Alexis K May 29 '12 at 0:37
1  
I'm not sure this is the way to go. mount -a should be called during the boot process already. I suspect that either the tmpfs module or the dev/shm isn't available yet when it is called. –  Bram May 29 '12 at 9:13
    
@AlexisK i think rc.local is perfered. PS this script is executed at the end of each multiuser runlevel. –  Maxwell S. May 29 '12 at 15:27
    
@Bram Thanks for the info. I did have to modify the tmpfs to get some packages to install correctly. Can you expand a little bit about why tempfs module would be ready at boot. –  Alexis K May 29 '12 at 17:11
    
@Alexis-k: I suspect this because the mount appears to fail during boot but is successful afterwards. If I look at one of our RHEL6 systems I see that the tmpfs filesystem is mounted in /etc/rc.sysinit, a grep -r tmpfs /etc/* should show you if this is configured on your system as well or not. The relevant mount commands are after the various sections that set up devices and after the startup of udev. –  Bram May 30 '12 at 6:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.