n1小主机重装armbian
本文适用于armbian系统重装armbian系统,如果是电视盒子安装或其它系统安装不适合。
需要下载:
系统镜像amlogic-s9xxx-armbian
镜像文件制作U盘启动的工具Rufus
n1盒子使用处理器s905d
镜像
bullseye debian11
bookworm debian12
noble jammy Ubuntu图形化系统
至于server前面的数字为内核版本,后续是可以替换的,推荐低版本的好。
n1老设备推荐bullseye debian11就好,乱七八糟的问题网上基本都能搜索解决,本文是基于bullseye。
N1盒子关机断电,再把U盘插进靠近HDMI接口的USB接口,插入电源开机,这时候应该会进入U盘的Armbian系统,然后登陆路由器后台查看盒子IP,使用SSH工具连接,默认用户名:root,密码:1234。一切顺利就进入了Armbian的欢迎页面。
#这里是设置root账户密码的
Create root password: #这里输入你要root密码
Repeat root password: #重复确认
Support status: community support (looking for a dedicated maintainer)
Choose default system command shell:
#设置你的命令行程序这里推荐bash
1) bash
2) zsh
#输入1 bash,输入2 zsh
Shell: BASH
Creating a new user account. Press <Ctrl-C> to abort
#创建新的帐户,按<Ctrl+C>可以跳过
Please provide a username (eg. your first name): #这里输入新用户名
Create user (admin) password: #这里输入新用户的密码
Repeat user (admin) password: #这里输入新用户的密码
Please provide your real name: 这里输入新用户的真名
Dear Admin, your account admin has been created and is sudo enabled.
Please use this account for your daily work from now on.
Detected timezone: Asia/Shanghai
#根据您的位置设置用户语言?[Y/n]输入"y"设置
Set user language based on your location? [Y/n]
At your location, more locales are possible:
1) bo_CN
2) ug_CN
3) zh_CN.UTF-8
4) Skip generating locales
Please enter your choice:3
#这里推荐zh_CN.UTF-8,不懂的话可输入"4"跳过
Generating locales: zh_CN.UTF-8
一切配置就绪将armbian系统写入盒子EMMC存储,armbian-install
。
这时会提示输入ID,N1盒子(Phicomm-N1)为101,然后选择分区格式,推荐选EXT4,输入1。
等待写入完成,出现以下字样代表写入完成。[ SUCCESS ] Installation successful. Run [ poweroff ], remove the installation media then re-insert the power supply to boot new system.
最后依据提示输入poweroff
命令回车后关机,拔出U盘,重新拔插电源,重装后的Armbian系统就启动了。
重新ssh连接主机,继续配置apt依赖源为中科大镜像,nano /etc/apt/sources.list.d/debian.sources
删除所有内容,粘贴下面配置
Types: deb
URIs: http://mirrors.ustc.edu.cn/debian
Suites: bullseye bullseye-updates bullseye-backports
Components: main contrib non-free
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb
URIs: http://mirrors.ustc.edu.cn/debian-security
Suites: bullseye-security
Components: main contrib non-free
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
保存,最后执行apt update
,刷新软件包。
如果遇到报错The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 93D6889F9F0E78D5
需要安装公钥:
gpg --keyserver keyserver.ubuntu.com --recv-keys 93D6889F9F0E78D5
控制台输出下面内容才表示成功
gpg: key '公钥编码': public key "xxxxxx" imported
gpg: Total number processed: 1
gpg: imported: 1
然后将下载的公钥写入/usr/share/keyrings/armbian.gpg
文件
gpg --export 93D6889F9F0E78D5 | sudo tee /usr/share/keyrings/armbian.gpg > /dev/null
但是在第一步会遇到gpg: keyserver receive failed: Server indicated a failure
无法连接服务器错误,一般来说只需要多尝试几次安装公钥命令即可,如果还是不成功,可以直接获取asc文件手动编码二进制文件。
首先访问keyserver.ubuntu.com
,查找公钥93D6889F9F0E78D5
,然后下载到本地,下载好的文件格式应为.asc
。返回主机新建并编辑文件nano /usr/share/keyrings/armbian-public-key.asc
,内容为下载的文件内容,最后转换.gpg
二进制文件gpg --dearmor -o /usr/share/keyrings/armbian.gpg /usr/share/keyrings/armbian-public-key.asc
。
一切就绪,再次更新软件包apt update
。可选删除刚刚新建的文件rm -r /usr/share/keyrings/armbian-public-key.asc
小主机只作为本地服务器使用,所以关闭蓝牙和wifi服务,首先执行rfkill list
查看状态
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Soft blocked: no 表示软件未禁用,Hard blocked: no 表示硬件开关未关闭,物理设备可用。
禁用服务rfkill block bluetooth
关闭蓝牙,rfkill block wifi
关闭wifi,再次查看状态rfkill list
0: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
Soft blocked: yes 表示软件层面禁用了服务,Hard blocked: no 表示硬件开关没有关闭,物理无线设备是可用的。
需要打开只需将关闭命令中的block
替换为unblock
即可,重启也会自动恢复,需要无感执行的话可以写入shell脚本开机执行。
Special Thanks:
斐讯N1,重装Armbian教程
斐讯N1安装Armbian及优化
amlogic-s9xxx-armbian文档
标签:无