Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a partition mounted with mount -t ext3 /dev/sda3 /foo.

Each time I reboot, I need to remount. How can I keep this mounted after every reboot?

share|improve this question
add comment

2 Answers

up vote 13 down vote accepted

You need to make an entry in /etc/fstab for the mount, something like:

/dev/sda3 /foo                       ext3    defaults        1 1

For more information see:

http://www.tuxfiles.org/linuxhelp/fstab.html

share|improve this answer
add comment

Sometimes, one may face critical issues due to /etc/fstab entries. So, the alternative is crontab.

Just add below entry in root's crontab.

$ sudo crontab -e

@reboot mount -t ext3 /dev/sda3 /foo

share|improve this answer
    
Are you really suggesting to use an ugly hack instead of the proper way of doing it, which has been in use for decades and never actually caused those "critical issues" to anyone?!? –  Massimo Jul 3 '13 at 7:29
    
I faced this situation while working on cloud machine on AWS. There was some problem while mounting using /etc/fstab, and the system was halting boot process. So, the system became useless as it was remote. So, i prefer safe boot (without specifying an entry in fstab) and then issue mount in crontab. –  user180118 Oct 25 '13 at 13:22
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.