Upgrading NetBSD from 11.0 to 11.1
Upgrading NetBSD from 11.0 to 11.1
Home→Archive↴ Upgrading NetBSD from 11.0 to 11.1 Last edited on 2026-11-05 • Tagged under #netbsd #bsd
主页→归档↴ 将 NetBSD 从 11.0 升级到 11.1 最后编辑于 2026-11-05 • 标签 #netbsd #bsd
I successfully upgraded my NetBSD amd64 system (with one hiccup, detailed below) from 11.0 to 11.1: $ uname -v NetBSD 11.1 (GENERIC) #0: Mon Nov 2 16:34:32 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC This was my first time upgrading NetBSD and I’m happy with how it all turned out!
我成功地将我的 NetBSD amd64 系统从 11.0 升级到了 11.1(中间出现了一个小插曲,详见下文):$ uname -v NetBSD 11.1 (GENERIC) #0: Mon Nov 2 16:34:32 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC 这是我第一次升级 NetBSD,我对最终的结果感到满意!
NetBSD’s Guide describes two different methods for performing an upgrade: boot from NetBSD install media and use sysinst(8), or use sysupgrade(8) to do an in-place upgrade of the system. With a bit of research, I get the sense that for major version changes (i.e 10.1 -> 11.1) sysinst is the preferred method, while sysupgrade is a convenient alternative for minor version bumps. So sysupgrade it is.
NetBSD 指南描述了两种不同的升级方法:从 NetBSD 安装介质启动并使用 sysinst(8),或者使用 sysupgrade(8) 进行系统的就地升级。经过一番研究,我了解到对于大版本变更(例如 10.1 -> 11.1),sysinst 是首选方法,而 sysupgrade 是小版本升级的便捷替代方案。所以我选择了 sysupgrade。
First, I install the package: # pkgin update # pkgin install sysupgrade Then simply run: # sysupgrade auto https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.1/$(uname -m)/ This will proceed to download the kernel and sets appropriate for your computer, unpack them, then prompt you to review and merge new configuration changes.
首先,我安装了该软件包:# pkgin update # pkgin install sysupgrade 然后只需运行:# sysupgrade auto https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.1/$(uname -m)/ 这将继续下载适合您计算机的内核和集合,解压它们,然后提示您审查并合并新的配置更改。
There were only a few files that needed hands-on editing like passwd and sshd_config and I liked how NetBSD shows the diffs between the old and new files and its handling of merging differences. I had one postinstall check that failed: # postinstall checks failed: opensslcertsrehash
只有少数几个文件需要手动编辑,例如 passwd 和 sshd_config,我喜欢 NetBSD 显示旧文件和新文件之间差异的方式,以及它处理合并差异的方法。我有一个 postinstall 检查失败了:# postinstall checks failed: opensslcertsrehash
I resolved the issue by wiping the legacy cache, then letting certctl(8) take over by rehasing the certs: # rm -rf /etc/openssl/certs/* # certctl rehash Verify certctl successfully populated the directory: # certctl list
我通过清除旧缓存解决了这个问题,然后让 certctl(8) 通过重新哈希证书来接管:# rm -rf /etc/openssl/certs/* # certctl rehash 验证 certctl 是否成功填充了目录:# certctl list
I manually re-run postinstall fix [issue] and confirm that it now passes inspection (which it did): # sysupgrade postinstall fix opensslcertsrehash # sysupgrade clean Reboot the computer and start enjoying the upgrade!
我手动重新运行了 postinstall fix [issue] 并确认它现在通过了检查(确实通过了):# sysupgrade postinstall fix opensslcertsrehash # sysupgrade clean 重启计算机并开始享受升级吧!
NOTE In addition, edit /usr/pkg/etc/pkgin/repositories.conf and point pkgin to the new 11.1 repositories. You can like, share, or comment on this post on the Fediverse 💬 Thanks for reading! Read other posts? « Previous: Customize the Login on NetBSD
注意:此外,请编辑 /usr/pkg/etc/pkgin/repositories.conf 并将 pkgin 指向新的 11.1 存储库。您可以在 Fediverse 上点赞、分享或评论这篇文章 💬 感谢阅读!阅读其他文章?« 上一篇:自定义 NetBSD 登录界面