Auto mount a drive that located on Ubuntu and auto share that drive for Window
I divide it into two parts:
1). Mount the drive at boot time:
* sudo vi /etc/fstab
* then add this line: /dev/sda3 /media/lnxBackUp ext4 users,user 0 0
In my case, sda3 is the drive that I would like to mount and ext4 is the partition of sda3.
2). Install samba server:
* sudo apt-get install samba
* sudo vi /etc/samba/smb.conf
then edit its config file by adding these information at the end of the page:
[lnxBackUp]
writable = yes
path = /media/lnxBackUp
guest ok = yes
create mask = 0777
comment = Backup drive
directory mask = 0777
* Create a folder in /media
* sudo mkdir /medir/lnxBackUp
* sudo mount -a
Now, you can access a drive shared (lnxBackUp) from Window.
cheers