Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A10 => Topic started by: visionimpaired on April 09, 2014, 03:13:22 AM

Title: What is the best way to Automount SATA disk on boot?
Post by: visionimpaired on April 09, 2014, 03:13:22 AM
Hi Everyone.
At the moment, I am using a cron job to automount my SATA (NTFS) disk at reboot. Sometimes it does not mount.
Is there a better way to do it?
Thanks.
VI
Title: Re: What is the best way to Automount SATA disk on boot?
Post by: Chax on April 09, 2014, 01:05:25 PM
If it's always the same drive you can put the mount options in /etc/fstab so that way it mounts at boot. Why did you use a cron job? Is the drive sometimes detached?

Example of line in /etc/fstab

/dev/sdb1     /mnt/mydrive     ntfs     defaults     0     2

where /dev/sdb1 is the drive and partition number of the NTFS partition. /mnt/mydrive is the directory in which the filesystem will be mounted (directory must exist!). Then the filesystem type ntfs is specified with the 'default' options and the 0 and 2 are just some defaults.

Some more info is for example in http://askubuntu.com/questions/113733/how-do-i-correctly-mount-a-ntfs-partition-in-etc-fstab