RaspberryPi 3 B+安装ubuntu server
之前写过一篇文章,是关于RaspberryPi 3如何安装ubuntu server的。但是之前买的那个RaspberryPi 3丢了,又买了一个RaspberryPi 3 B+,按之前的方法安装ubuntu server,发现并不work。
通过网上查资料发现,RaspberryPi 3 B+只能安装官方的RaspberryPi 2的镜像,而且还要做一些改动,那下面就开始吧。
下载官方镜像
我下载的是下面这个:
http://cdimage.ubuntu.com/ubuntu/releases/16.04/release/ubuntu-16.04.5-preinstalled-server-armhf+raspi2.img.xz
然后解压出img文件
将镜像写入到SD中
这一步和之前一样,下载Win32DiskImager,https://sourceforge.net/projects/win32diskimager/
然后将前面的镜像写入到SD中。
调整SD中文件的内容
1、找到标记为system-boot的那个盘,修改config.txt,把原来的kernel修改成下面,注释掉device_tree_address。
kernel=vmlinuz
initramfs initrd.img followkernel
#device_tree_address=0x02000000
2、添加HDMI输出
# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=-30
overscan_right=-30
overscan_top=-30
overscan_bottom=-30
# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1024
framebuffer_height=768
# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=16
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=4
3、更新GPU firmware和bootloader文件
在ubuntu环境下将这个包下载下来:http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-bootloader_1.20180417-1_armhf.deb
然后调用命令解包:
dpkg-deb -x raspberrypi-bootloader_1.20180417-1_armhf.deb /tmp/pi-bootloader
上面这步需要在Ubuntu下面完成,如果没有现成的环境还有些麻烦,这边已经把提取出来的内容放到CSDN资源上了,地址:https://download.csdn.net/download/kevin3683/10804202
然后将/tmp/pi-bootloader/boot下面的文件覆盖掉SD卡下对应的文件。
开机启动
把网线,HDMI显示器,键盘接好,USB通电启动
默认的登录账户密码是ubuntu/ubuntu
搞定!