在Win7 Host的ubuntu虚拟机中自动挂载win7的共享目录。
1.首先在虚拟机设置中配置需要共享的文件夹
2.进入虚拟机后做如下设置
yasin@yasin-v:~$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# YasinLee added the lines below
mount -t vboxsf D_DRIVE /home/yasin/D
mount -t vboxsf E_DRIVE /home/yasin/E
exit 0
yasin@yasin-v:~$
3.重启虚拟机,完毕。