![cbc2144880d290e1ed4b6d706a453e65.png](https://img-blog.csdnimg.cn/img_convert/cbc2144880d290e1ed4b6d706a453e65.png)
文章目录
- Ubuntu使用virtualbox安装树莓派
- 安装
- 安装virtualbox
- 安装树莓派
- 开启虚拟机
- 使用
- 下载
- 参考文献
- 安装
Ubuntu使用virtualbox安装树莓派
之前用qemu装的树莓派怎么整也没办法联网
![1e51f6171186471a27e675841f2ab996.png](https://img-blog.csdnimg.cn/img_convert/1e51f6171186471a27e675841f2ab996.png)
安装
安装virtualbox
首先是安装virtualbox
下载:https://www.virtualbox.org/wiki/Download_Old_Builds_6_0
![478da950502c6d08cd6617eeb6cab55b.png](https://img-blog.csdnimg.cn/img_convert/478da950502c6d08cd6617eeb6cab55b.png)
这种方式下载的软件没办法更新,想更新的话添加oracle
的仓库下载virtualbox
即可,详情参考:如何安在Ubuntu上安装VirtualBox [入门教程][1](链接在文章末尾)
![85c5699739a9aabee9e4b6fa2f53b8d9.png](https://img-blog.csdnimg.cn/img_convert/85c5699739a9aabee9e4b6fa2f53b8d9.png)
安装树莓派
找到virtualbox
打开即可,剩下的操作和在Windows下一样了。
![a5cb66ef43fa940a90ce975b74eda710.png](https://img-blog.csdnimg.cn/img_convert/a5cb66ef43fa940a90ce975b74eda710.png)
1.新建虚拟机
![62edcc96dd759bddb89e1645a5140f62.png](https://img-blog.csdnimg.cn/img_convert/62edcc96dd759bddb89e1645a5140f62.png)
2.选择操作系统及创建的位置
我这选择默认位置,操作系统为其他
,名字为raspi
![00965d02e1f6006825d0821de2f28454.png](https://img-blog.csdnimg.cn/img_convert/00965d02e1f6006825d0821de2f28454.png)
3. 分配内存
据说树莓派3
是1024MB
,所以我也给他分了1024MB
![f310585448cdba543d46a83291d0dee9.png](https://img-blog.csdnimg.cn/img_convert/f310585448cdba543d46a83291d0dee9.png)
4. 创建虚拟硬盘
![0c91c5dd1cb4b5f314dcb67b47f1c817.png](https://img-blog.csdnimg.cn/img_convert/0c91c5dd1cb4b5f314dcb67b47f1c817.png)
看个人空间需求选择固定大小还是动态分配
![80de51879c504bd67d16a380fcc9c853.png](https://img-blog.csdnimg.cn/img_convert/80de51879c504bd67d16a380fcc9c853.png)
考虑到树莓派的镜像有4GB
大小,再考虑我的使用情况,姑且分配10GB
给他
![a813d9d07e29ce8fd1a8382fcf5a8077.png](https://img-blog.csdnimg.cn/img_convert/a813d9d07e29ce8fd1a8382fcf5a8077.png)
5. 准备安装
点击设置
![41abd1ee43c777a20e68d03172fdbd5c.png](https://img-blog.csdnimg.cn/img_convert/41abd1ee43c777a20e68d03172fdbd5c.png)
选择存储
,点击下方的添加图标,选择添加软盘控制器
![8cb4a8f60b5dcddcb9460cfd688e57bd.png](https://img-blog.csdnimg.cn/img_convert/8cb4a8f60b5dcddcb9460cfd688e57bd.png)
添加软盘
![650e5d108ae1fd33133a4b7be06036d4.png](https://img-blog.csdnimg.cn/img_convert/650e5d108ae1fd33133a4b7be06036d4.png)
选择磁盘
![1ed2292c19481ed9affb09be3348a5c5.png](https://img-blog.csdnimg.cn/img_convert/1ed2292c19481ed9affb09be3348a5c5.png)
点击注册
![6c8b984d911be0c71f094ad92e4fd5ce.png](https://img-blog.csdnimg.cn/img_convert/6c8b984d911be0c71f094ad92e4fd5ce.png)
选择树莓派的镜像文件
![2e5efbf39122fe96f552b7f08be30e0a.png](https://img-blog.csdnimg.cn/img_convert/2e5efbf39122fe96f552b7f08be30e0a.png)
结果会报错
![6103f62dbaa18d8aea2920198d3fc63c.png](https://img-blog.csdnimg.cn/img_convert/6103f62dbaa18d8aea2920198d3fc63c.png)
经过尝试与学习,查到的博主使用的均是iso的镜像,所以重新下载了一个iso的镜像:
![909e54fbd08386fb6e688aca5d0e0d55.png](https://img-blog.csdnimg.cn/img_convert/909e54fbd08386fb6e688aca5d0e0d55.png)
这样也就不需要再添加软盘控制器
:
![6ac9b1dea568ab2564aa171d788b0ff5.png](https://img-blog.csdnimg.cn/img_convert/6ac9b1dea568ab2564aa171d788b0ff5.png)
在分配光驱处选择一个虚拟光驱文件,选择下载的iso文件,点击确定即可开启虚拟机
![f8eb65d14b9a54825d2523bb9c0494a1.png](https://img-blog.csdnimg.cn/img_convert/f8eb65d14b9a54825d2523bb9c0494a1.png)
开启虚拟机
点击启动就行了
![5bcb3d8fbf8ca487e34635378ca3ad48.png](https://img-blog.csdnimg.cn/img_convert/5bcb3d8fbf8ca487e34635378ca3ad48.png)
install
![cdacb2ddaa0465485bb07ad67a91e314.png](https://img-blog.csdnimg.cn/img_convert/cdacb2ddaa0465485bb07ad67a91e314.png)
选择键盘布局
![0ecbb7080c098ea3dd32011a3b170f0b.png](https://img-blog.csdnimg.cn/img_convert/0ecbb7080c098ea3dd32011a3b170f0b.png)
等待
![f3f1ad46b114d9bd67b77961d2bb328b.png](https://img-blog.csdnimg.cn/img_convert/f3f1ad46b114d9bd67b77961d2bb328b.png)
引导选项,默认即可——使用整块磁盘
![46df56654f9e15faa39c05a7c4f31702.png](https://img-blog.csdnimg.cn/img_convert/46df56654f9e15faa39c05a7c4f31702.png)
这里选择的磁盘就是之前创建的虚拟磁盘,所以提示中数据全部清除也不用在意
![9cd6921512e93036e8cc4093d8654b1b.png](https://img-blog.csdnimg.cn/img_convert/9cd6921512e93036e8cc4093d8654b1b.png)
如果是小白的话,选择第一项就好(翻译)——意思是所有文件放在一个分区,也就是/
分区,这点和众多Linux
分区一毛一样
![e4afc601990c587a9ff6c8c45d15bc44.png](https://img-blog.csdnimg.cn/img_convert/e4afc601990c587a9ff6c8c45d15bc44.png)
完成分区并写入镜像
![9772a00faf8e014c466ea4e368bf83ae.png](https://img-blog.csdnimg.cn/img_convert/9772a00faf8e014c466ea4e368bf83ae.png)
使用tab
键选择yes
![e24c5bf7f473d2c40684679c0fccb4b8.png](https://img-blog.csdnimg.cn/img_convert/e24c5bf7f473d2c40684679c0fccb4b8.png)
等待
![a3379493bb91cc7100650859e56001dd.png](https://img-blog.csdnimg.cn/img_convert/a3379493bb91cc7100650859e56001dd.png)
是否写入bootloader
,当然选择yes
咯
![a612139a466b4c3600b1196c5248c5c9.png](https://img-blog.csdnimg.cn/img_convert/a612139a466b4c3600b1196c5248c5c9.png)
选择bootloader
的安装设备,身为小白,初次尝试,能自己动,就别手动设置了,选择虚拟磁盘噢
![a245838ddeb17ffb33761dece3299c4d.png](https://img-blog.csdnimg.cn/img_convert/a245838ddeb17ffb33761dece3299c4d.png)
移除安装介质,直接回车即可
![da522960a14d2e419af6819f61279668.png](https://img-blog.csdnimg.cn/img_convert/da522960a14d2e419af6819f61279668.png)
使用
等到如下界面回车即可进入操作系统
![586fabab42e3d64d89c82dee7ac22305.png](https://img-blog.csdnimg.cn/img_convert/586fabab42e3d64d89c82dee7ac22305.png)
奥利给!完事了,点击next进行一些设置
![83627b307b8994719cdcb5015fb13aa6.png](https://img-blog.csdnimg.cn/img_convert/83627b307b8994719cdcb5015fb13aa6.png)
选择地区、语言和时区
![dcf07fe915aff6928ed9f191fc0508a8.png](https://img-blog.csdnimg.cn/img_convert/dcf07fe915aff6928ed9f191fc0508a8.png)
重设密码
![f39a646505f2d4bf19ae929b23440f21.png](https://img-blog.csdnimg.cn/img_convert/f39a646505f2d4bf19ae929b23440f21.png)
系统和软件更新,这里我选择跳过
![675b14b0334f4430f4e275b09fe7067c.png](https://img-blog.csdnimg.cn/img_convert/675b14b0334f4430f4e275b09fe7067c.png)
设置完成后需要重启一次
![97fa98369004e21aa05b27bcacdc1ae2.png](https://img-blog.csdnimg.cn/img_convert/97fa98369004e21aa05b27bcacdc1ae2.png)
奥利给,这就算是完事了,接下来看看联网问题
![399dbdc5b6e83f55e3a29b25beadf9a7.png](https://img-blog.csdnimg.cn/img_convert/399dbdc5b6e83f55e3a29b25beadf9a7.png)
使用我的导航网页测试了一下,默认安装是没有问题的
![4b5d9f24005600b6b240c68e3d18649c.png](https://img-blog.csdnimg.cn/img_convert/4b5d9f24005600b6b240c68e3d18649c.png)
如果有问题的话,可以在虚拟机的设置界面进行设置
![1d9e47232be1ae955297b00fd139da09.png](https://img-blog.csdnimg.cn/img_convert/1d9e47232be1ae955297b00fd139da09.png)
下载
virtualbox:https://www.virtualbox.org/wiki/Downloads
树莓派桌面系统——官网:https://www.raspberrypi.org/downloads/raspberry-pi-desktop/
树莓派桌面系统——清华软件源(推荐):https://mirrors.tuna.tsinghua.edu.cn/raspbian-images/rpd_x86/images/rpd_x86-2020-02-14/
参考文献
[1]
如何安在Ubuntu上安装VirtualBox [入门教程]: https://itsfoss.com/install-virtualbox-ubuntu/[2]
【笔记】虚拟机安装树莓派系统: https://www.jianshu.com/p/1a65cb0b8f58[3]
【完整速装】树莓派虚拟机系统创建与安装WordPress网站: https://www.bilibili.com/video/BV1t7411m7XF?from=search&seid=2851836006535052667
往期回顾
- 自己封装一个专属的Windows10系统
- Ubuntu19.10使用Qemu安装树莓派
- 电脑必备软件清单3——下载类
- 电脑必备软件清单2——工具类
- 电脑必备软件清单1——卸载类