virtualbox中ubuntu与主机共享文件夹设置

[一]

virtualbox4.3.12版(ubuntu14.04)增强功能安装中如果遇到以下错误:

make [2]: *** [ /tmp/vbox .0 /regops .o] 错误 1
make [1]: *** [_module_ /tmp/vbox .0] 错误 2
make : *** [vboxsf] 错误 2
可以尝试下载4.3.16版增强功能,挂载到系统中后重新安装。

重装显示:


Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used


Installing the Window System drivers
Installing X.Org Server 1.16 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.


Installing graphics libraries and desktop services components ...done.


成功。



[二] (转自http://blog.csdn.net/wzwind/article/details/6656331)

如果在Building VirtualBox Guest Additions kernel modules的时候,缺少kernal的头文件,

使用下面的命令安装(否则跳至[三]):
引用

sudo apt-get install dkms build-essential linux-headers-$(uname -r)

其实build-essential linux-headers已经是最新的了,只是缺少dkms(Dynamic Kernel Module Support),当有新的kernal安装的时候,它能让kernal的设备驱动自动的重新构建。
详情见: http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support
之后再
引用

sudo /etc/init.d/vboxadd setup

成功


[三](部分参考http://www.linuxidc.com/Linux/2011-12/50241.htm)
挂载共享文件夹
进入虚拟Ubuntu,在命令行终端下输入:

sudo mkdir /mnt/share
sudo mount -t vboxsf download /mnt/share

其中"download"是之前创建的共享文件夹的名字,也就是在分配数据空间的时候显示的名称。

要想自动挂载的话,可以在/etc/fstab中添加一项(记得更换相应文件夹名称)
download /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 0

卸载命令:
sudo umount -f /mnt/share
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值