For auto-mounting, you need to edit /etc/fstab file. If you add a partition in /etc/fstab file, that partition will be auto-mounted.
# <file system> <mount point> <type> <options> <dump> <pass>This line which is already present in the /etc/fstab file tell the format.
<file system> --> the partition to mount for ex. /dev/sda4 or //192.168.1.1/share
<mount point> --> An empty folder where you want to mount the partition
<type> --> file system type for ex. ntfs-3g, smbfs etc..
<options> --> additions options. You can simply put it "default".
<dump> --> an appropriate number which decides whether to backup the partition
<pass>--> 0 in most cases
So, for mounting an ntfs partition, we will write something like this:-
/dev/sda5 /media/Abhijeet ntfs-3g defaults,locale=en_IN 0 0For mounting a samba(windows) share, add:-
//10.100.56.21/Lecture /home/shadyabhi/Lecture smbfs username=user,password=pass 0 0Here is a sample of the /etc/fstab file i use...