n1升级armbian系统

n1升级armbian系统

n1的系统已经多年没有更新过了,还停留在了古老的5.77版本。虽然稳定压倒一切,但这么久了也得升级一下。

下载固件

这次打算直接重装系统,armbian选择debian,先去debian里挑最新稳定版本号。
然后到github里下载对应的固件。

例如N1的CPU是s905d,当下debian的最新稳定版是bookworm。当下最新的内核实测启动会报搭理的错误日志,虽然好像不影响使用,
但为保险内核选择了次新的,所以我选择了Armbian_24.2.0_amlogic_s905d_bookworm_6.1.76_server_2024.02.01.img.gz。
下载下来之后校验一下hash,避免文件损坏。

制作启动盘

固件官方推荐使用rufus或者balenaEtcher
来把固件写到U盘里。由于我是Linux系统,所以用了balenaEtcher来刷。
以前使用5.77版本的时候,还需要手动替换dtb文件,不然系统负载会升高。现在使用这个固件,刷完就可以直接用了。

刷入EMMC

备份好N1里的重要文件。

把刷好的U盘插到靠近HDMI的USB口,断电重启。一切顺利就会进入到U盘系统里(默认用户: root, 默认密码: 1234)。

执行armbian-install将系统刷进EMMC里。按提示操作,刷完之后关机,拔掉U盘,插上网线,重启。

系统配置与软件安装

开机登录后查看获取到的IP,为了方便复制粘贴,推荐在别的电脑里ssh进行操作。

替换apt源

https://mirrors.tuna.tsinghua.edu.cn/help/debian/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo nano /etc/apt/sources.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
1
2
sudo cp /etc/apt/sources.list.d/armbian.list /etc/apt/sources.list.d/armbian.list.bak
sudo sed -i.bak 's#http://apt.armbian.com#https://mirrors.tuna.tsinghua.edu.cn/armbian#g' /etc/apt/sources.list.d/armbian.list
1
2
3
sudo apt update -y
sudo apt upgrade -y
sudo apt install sudo vim curl wget git htop -y

配置静态IP

我发现我的N1每次重启MAC都会变,导致通过MAC分配固定IP。
网上虽然有固定MAC的解决办法,但我试过都没用,所以只好之间配固定IP。

1
2
3
4
5
6
7
8
9
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
sudo vim /etc/network/interfaces
#删除或者注释掉原因配置
auto eth0
iface eth0 inet static
address 192.168.123.5
netmask 255.255.255.0
gateway 192.168.123.1
dns-nameservers 192.168.123.1

中文乱码

没找到解决办法,终端远程中文时能正常显示的,但直连显示器里时乱码的

其他

vps安装系统常用记要n1安装armbian做小pc

清理

1
2
3
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove

观察负载

1
htop

参考文献


n1升级armbian系统
https://cellargalaxy.github.io/posts/折腾/28.n1升级armbian系统/
作者
cellargalaxy
发布于
2024年2月8日
许可协议