I want to mount my EBS volume and start up the Apache/MySQL servers on my EC2 machine, but I can't even get my script to run at startup.

I've tried putting it in:




None of them are working... Where should I put my script?

  • What operating system? If it is a CentOS/RHEL derivative (e.g. Amazon's Linux) /etc/init.d/ is good, but you also need to run chkconfig, and turn the service on at the correct run levels. – cyberx86 Aug 17 '11 at 5:21
  • Looks like I fixed it by setting the script chmod +x – Andrew M Aug 17 '11 at 5:26

Make sure your script is runnable. (chmod +x)

But why would you use a script to mount it? You can add it to /etc/fstab.

  • Considering the fact that my newbie-ness has let me forget to make a script executable probably means I shouldn't fool around too much with the file system stuff. I know this works and I won't be rebooting the server very often :P – Andrew M Aug 17 '11 at 14:24
  • @Andrew M: No problem :-) – Bart De Vos Aug 17 '11 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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