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?

3 Answers 3


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:


  • 2
    You may want to use nofail flag so that you'll able to normally boot your system when /dev/sda3 is not able to mount for some reason. Oct 12, 2018 at 14:29
  • To find out the file system type, run file -s /dev/sda3 Jul 15, 2022 at 20:03

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

  • 4
    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, 2013 at 7:29
  • 2
    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. Oct 25, 2013 at 13:22
  • @Massimo actually "critical issues" do exist. Here's what a Google engineer says about mounting a certain cloud storage (like Amazon S3) FUSE filesystem via fstab at boot: "let me urge you to not do this. Requests to GCS are not nearly as reliable as local disk, and you're likely to find yourself with a system that hangs on boot if anything goes wrong" ( here )
    – KajMagnus
    Jul 23, 2016 at 14:32
  • Not sure what to do instead though, but crontab and @reboot makes sense to me. Perhaps in combination with a fstab noauto row, or mount directly in the crontab. — Anyway, upvoted from -3 to -2, because this answer is actually useful, in some rare cases. (And edit suggestoin: "sometimes" --> "in rare cases" :- ) )
    – KajMagnus
    Jul 23, 2016 at 14:33
  • This is what I did in my case: @reboot echo '/opt/ed/mount-google-cloud-storage-backups-bucket.sh >> /opt/ed/cron.log 2>&1' | at now + 3 minutes, works OK perhaps not for everyone, but for my use case.
    – KajMagnus
    Jul 23, 2016 at 15:29

For OpenSuse, coming from Novell Automatically mount a windows share at boot time with Linux

//winserver/share /mnt/winshare cifs gid=users,file_mode=0664,dir_mode=0775,auto,username=john,password=johnpass 0 0

Please add single quotes if the folder names contains spaces:

'//winserver/share with spaces' '/mnt/winshare with spaces' cifs gid=users,file_mode=0664,dir_mode=0775,auto,username=john,password=johnpass 0 0

Check the end of the article if you don't want to put passwords in fstab.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .