0x01 bash: /etc/init.d/vboxdrv: 没有那个文件或目录
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
将软件源替换为官方源
先执行下面命令:
sudo gedit /etc/apt/sources.list
# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
将源添加进去
执行命令
apt-get clean
然后执行
apt-get update -y && apt-get dist-upgrade -y && apt-get install linux-headers-$(uname -r) -y && apt-get install virtualbox -y
此时会安装默认的virtualbox,命令行下 输入下面命令
virtualbox
但是弹出了这样的提示
接着继续执行命令
apt-get install virtualbox-dkms
virtualbox卸载掉
apt-get remove virtualbox
apt-get install vagrant
apt-get install virtualbox 或是安装过程中出现"内核不存在",需要解决依赖即dpkg下的info有问题,中间可能会出现输入密码等的安全模式验证,需要进入BIOS中的security(安全)把安全模式关掉
出现一种新的错误
嗯,没错,这个是说vboxdrv内核模块没有被载入。下面一大堆的也不看了,解决方法如下
0x04 修复内核模块问题
|
1 |
|
问题又出现了,但是出现一定是可以解决的。
看看问题详情
很显然是缺少依赖
国际惯例执行修复命令来修复依赖问题,执行下面命令
|
1 |
|
过程中可能需要输入 y 确认
vagrant box add name url.box
vagrant init
vagrant up 启动不成功,看警告,会出现文件夹权限的原因
启动成功后
VBOX提示VT-x/AMD-V硬件加速不可用怎么办
-
如果是重启电脑的,一直接del键,进入BIOS设置。
-
进入BIOS设置页面,切到Configuration页,如下图所示,可以看到Intel Virtual Technology这一项现在是Disabled的。
-
切到该项后回车,在弹出的选择框中选择Enabled后回车。
-
如下图所示,这时可以看到该功能选项被设置成了Enabled。
-
按F10保存,弹出如下对话框,默认是Yes选项,选择直接回车即可。
virtualBox下面安装linux系统如何共享目录
背景:
系统是win+virtualBox 在虚拟机中安装了linuxMint系统。
如何共享目录呢
第一步:
在虚拟机中安装增强功能
2,在virtualBox中设置共享目录
3,在linux下创建共享目录 winShare
mkdir winShare
4,设置挂载,注意linuxMintShare和winShare的名字不能一样。
sudo mount -t vboxsf linuxMintShare /home/komiles/winShare
5,查看文件
linux下面:
windows下面:
6,不想每次都手动挂载,可以编辑/etc/fstab文件
sudo vim /etc/fstab
linuxMintShare /home/komiles/winShare vboxsf rw,gid=100,uid=1000,auto 0 0
7,卸掉挂载
sudo umount -f /home/komiles/winShare
8,查看本机有多少挂载点
df -l 或者df -h
9.关机重启后
输出 VBoxManage --version 得到错误信息
中间如果需要输入密码:进入BOIS 把secure boot 设置为关闭
再次加载
文件别名错误没修改