当前位置首页 > Debian知识

DebianonVirtualBox共享win7文件夹

阅读次数:389 次  来源:admin  发布时间:

如果是一个全新的Debian系统,直接安装VirtualBox的Guest Additions,可能会失败,这是因为VirtualBox增强功能需要编译链接工具。

启动debian虚拟机时记得先加载debian安装光盘

aptitude install build-essential linux-headers-`uname -r` dkm

1. 加载增强功能光盘

DebianonVirtualBox共享win7文件夹

cd /cdrom

h ./VBoxLinuxAdditions.ru

其中,有个警告说是系统不支持OpenGL。重启,增强功能包安装完成。

2. 在虚拟机上设置共享文件夹

DebianonVirtualBox共享win7文件夹

3. 挂载

DebianonVirtualBox共享win7文件夹

mkdir /mnt/shared

mount -t vboxsf share /mnt/shared

hare是之前创建的共享文件夹的名字。

umount /mnt/shared

编辑/etc/fstab,自动挂载

hare /mnt/shared vboxsf rw,gid=100,uid=1000,auto 0 0

安装时遇到提示

Building the VirtualBox Guest Additions kernel module

The headers for the current running kernel were not found. If the following

module compilation fails then this could be the reason.

...fail!

有可能是没有安装dkms。

如果共享文件夹名称和挂载点名称相同,在挂载时会出现如下的错误信息:

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

上一篇:apache2的安装与简单配置(转)
下一篇:(004)Nginx默认配置语法解析及演示