自动安装位于Ubuntu上的驱动器并自动共享该驱动器的Window

我试图找到解决方案很多天但我找不到一个。 所有这些都是关于自动挂载来自Window的共享文件夹的。 但我的情况是备份驱动器位于Ubuntu 12.04桌面上,我想在启动时安装我的驱动器(/ dev / sda3)然后自动共享该驱动器以便从Window用户访问。 请你帮助我好吗!

我将它分为两​​部分:

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 

现在,您可以从Window访问共享驱动器(lnxBackUp)。

干杯