
树莓派官方在上周放出了 Raspbian 8 Jessie 镜像文件下载。这是 Raspbian Wheezy 2015.5.5 之后的一次更新版本,核心版本升级到了 4.1。而老的 Wheezy 版本也可以通过简单的步骤升级到 Raspbian Jessie 8 且不用重新刷写镜像。下面将介绍如何升级,要知道,升级有可能会破坏现有系统,在此之前请一定注意备份好老的系统。如果你对之前的系统做的更改越小,升级将会越顺利。 1. 建议:- 移除非必要的包
- 完整升级当前系统
- 备份数据
- 虽然用SSH操作问题不大,但还是建议直进入终端来操作
2. 升级当前系统在当前的 Wheezy 下运行:
- apt-get update
- apt-get upgrade
- apt-get dist-upgrade
复制代码
3. 更新 apt sources list- sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
复制代码
注释掉 archive repository. 最终变更为如下: - deb [url]http://mirrordirector.raspbian.org/raspbian[/url] jessie main firmware contrib non-free
- #deb [url]http://archive.raspberrypi.org/debian[/url] jessie main
复制代码
4. 更新到 Raspbian Jessie一旦进入升级,会需要选择手动重启当前运行的所有服务。建议选择手动重启服务(如SSH服务),这也将保证当你用SSH操作时连接不会被中断。建议检查并确保 SSH 没有禁用 root 登录。
一切就绪之后初始化系统并升级到 Raspbian Jessie: - apt-get update
- apt-get upgrade
- apt-get dist-upgrade
复制代码
重启系统: - reboot[indent][color=#333a42][backcolor=initial]
- [/backcolor][/color][/indent][color=#333a42][backcolor=initial]升级成功后,用 hostnamectl 可以看到当前 Raspbian 系统版本是 Raspbian GNU/Linux 8 (jessie):[/backcolor][/color]
复制代码
- [color=rgb(51, 58, 66)]hostnamectl
- Static hostname: pi
- Icon name: computer
- Chassis: n/a
- Machine ID: e8b0569e6af846b7b3c9911191e2da9a
- Boot ID: 273f90ee3a014119a948afa3a3aa95f3
- Operating System: Raspbian GNU/Linux 8 (jessie)
- Kernel: Linux 3.18.0-trunk-rpi
- Architecture: arm[/color]
复制代码
|