Notebook

これは日々の作業を通して学んだことや毎日の生活で気づいたことをを記録しておく備忘録である。

HTML ファイル生成日時: 2025/07/30 08:17:51.269 (台灣標準時)

NetBSD-10.0 から 10.1 にバージョンを上げる

https://www.netbsd.org/docs/guide/en/chap-updating.html の記述に従って NetBSD-10.0 から 10.1 にバージョンを上げてみるでござる。

まず、新しい userland を構築するでござる。


% su -m -
# cd /usr/src
# ./build.sh -j 6 -O ../obj -T ../tools -U distribution

.....

===> Summary of results:
         build.sh command:    ./build.sh -j 6 -O ../obj -T ../tools -U distribution
         build.sh started:    Mon Jul 14 09:40:17 CST 2025
         NetBSD version:      10.1_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 10.0_STABLE amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/../tools
         DESTDIR path:        /usr/src/../obj/destdir.amd64
         RELEASEDIR path:     /usr/src/../obj/releasedir
         Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
         Successful make distribution
         build.sh ended:      Mon Jul 14 11:19:44 CST 2025
===> .

次に、新しいカーネルを作るでござる。


# cd /usr/src/sys/arch/amd64/conf
# cp -pi GENERIC MITAKA_GEN_20250714
# vi MITAKA_GEN_20250714
# cd /usr/src
# ./build.sh -j 6 -O ../obj -T ../tools -U kernel=/usr/src/sys/arch/amd64/conf/MITAKA_GEN_20250714

.....

===> Summary of results:
         build.sh command:    ./build.sh -j 6 -O ../obj -T ../tools -U kernel=/usr/src/sys/arch/amd64/conf/MITAKA_GEN_20250714
         build.sh started:    Mon Jul 14 11:24:50 CST 2025
         NetBSD version:      10.1_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 10.0_STABLE amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/../tools
         DESTDIR path:        /usr/src/../obj/destdir.amd64
         RELEASEDIR path:     /usr/src/../obj/releasedir
         Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
         Building kernel without building new tools
         Building kernel:     /usr/src/sys/arch/amd64/conf/MITAKA_GEN_20250714
         Build directory:     /usr/src/../obj/sys/arch/amd64/compile/MITAKA_GEN_20250714
         Kernels built from /usr/src/sys/arch/amd64/conf/MITAKA_GEN_20250714:
          /usr/src/../obj/sys/arch/amd64/compile/MITAKA_GEN_20250714/netbsd
         build.sh ended:      Mon Jul 14 11:34:26 CST 2025
===> .

カーネルモジュールを作るでござる。


# ./build.sh -j 6 -O ../obj -T ../tools -U modules

.....

===> Summary of results:
         build.sh command:    ./build.sh -j 6 -O ../obj -T ../tools -U modules
         build.sh started:    Mon Jul 14 11:38:15 CST 2025
         NetBSD version:      10.1_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 10.0_STABLE amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/../tools
         DESTDIR path:        /usr/src/../obj/destdir.amd64
         RELEASEDIR path:     /usr/src/../obj/releasedir
         Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
         Building modules without building new tools
         Building kernel modules for NetBSD/amd64 10.1_STABLE
         Successful build of kernel modules for NetBSD/amd64 10.1_STABLE
         build.sh ended:      Mon Jul 14 11:44:54 CST 2025
===> .

新しく作ったカーネルモジュールをインストールするでござる。


# ./build.sh -O ../obj -T ../tools -U installmodules=/

.....

===> Summary of results:
         build.sh command:    ./build.sh -O ../obj -T ../tools -U installmodules=/
         build.sh started:    Mon Jul 14 13:52:46 CST 2025
         NetBSD version:      10.1_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 10.0_STABLE amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/../tools
         DESTDIR path:        /usr/src/../obj/destdir.amd64
         RELEASEDIR path:     /usr/src/../obj/releasedir
         Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
         Successful installmodules to /
         build.sh ended:      Mon Jul 14 13:53:02 CST 2025
===> .

新しく作ったカーネルをインストールするでござる。


# file /usr/obj/sys/arch/amd64/compile/MITAKA_GEN_20250714/netbsd
/usr/obj/sys/arch/amd64/compile/MITAKA_GEN_20250714/netbsd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for NetBSD 10.1, not stripped
# cp -pi /netbsd /netbsd.old
# cp -pi /usr/obj/sys/arch/amd64/compile/MITAKA_GEN_20250714/netbsd /netbsd
overwrite /netbsd? y
# ls -l /netbsd*
-rwxr-xr-x  1 root  wheel  29529616 Jul 14 11:34 /netbsd
-rwxr-xr-x  1 root  wheel  29513648 Jul 30  2024 /netbsd.old

新しいカーネルで起動するでござる。


# shutdown -r now

新しいカーネルで起動できたかどうか確認してみるでござる。


# uname -srmp
NetBSD 10.1_STABLE amd64 x86_64

ユーザーランドをインストールするでござる。


# cd /usr/src
# ./build.sh -O ../obj -T ../tools -U install=/

.....

===> Summary of results:
         build.sh command:    ./build.sh -O ../obj -T ../tools -U install=/
         build.sh started:    Mon Jul 14 14:06:17 CST 2025
         NetBSD version:      10.1_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 10.1_STABLE amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/../tools
         DESTDIR path:        /usr/src/../obj/destdir.amd64
         RELEASEDIR path:     /usr/src/../obj/releasedir
         Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
         Successful installworld to /
         build.sh ended:      Mon Jul 14 14:07:02 CST 2025
===> .

設定ファイルを更新するでござる。


# /usr/sbin/postinstall -s /usr/src check

.....

postinstall checks passed: atf autofsconfig blocklist bluetooth catpages ddbonpanic dhcpcd dhcpcdrundir envsys fontconfig gid gpio hosts iscsi makedev manconf motd named opensslcertsconf pam periodic pf ptyfsoldnodes pwd_mkdb rc ssh tcpdumpchroot uid varrwho varshm wscons x11 xkb
postinstall checks failed: defaults mtree opensslcertsrehash obsolete
To fix, run:
    sh /usr/sbin/postinstall -s /usr/src -d / fix defaults mtree opensslcertsrehash obsolete
Note that this may overwrite local changes.
# /usr/sbin/postinstall -s /usr/src -d / fix defaults mtree opensslcertsrehash obsolete

.....

postinstall fixes passed: defaults mtree obsolete
postinstall fixes failed: opensslcertsrehash
# /usr/sbin/etcupdate -s /usr/src

.....

x11 check:
xkb check:
obsolete check:
postinstall checks passed: atf autofsconfig blocklist bluetooth catpages ddbonpanic defaults dhcpcd dhcpcdrundir envsys fontconfig gid gpio hosts iscsi makedev manconf motd mtree named opensslcertsconf pam periodic pf ptyfsoldnodes pwd_mkdb rc ssh tcpdumpchroot uid varrwho varshm wscons x11 xkb obsolete
postinstall checks failed: opensslcertsrehash
To fix, run:
    sh /usr/sbin/postinstall -s /usr/src -d / fix opensslcertsrehash
Note that this may overwrite local changes.
*** All done

これでよいようでござる。



Frequently accessed files

  1. Misc___Taiwan/20240819_00.html
  2. Computer___TeX/20231107_00.html
  3. Computer___NetBSD/20250301_01.html
  4. Computer___NetBSD/20250728_00.html
  5. Misc___Taiwan/20240207_00.html
  6. Computer___Hardware/20250319_00.html
  7. Misc___Taiwan/20220831_4.html
  8. Computer___TeX/20240410_00.html
  9. Computer___Network/20230516_00.html
  10. Food___Taiwan/20230608_04.html
  11. Misc___Taiwan/20250728_01.html
  12. Computer___NetBSD/20240805_03.html
  13. Food___Taiwan/20220605_4.html
  14. Food___Taiwan/20230609_06.html
  15. Computer___NetBSD/20250409_00.html
  16. Computer___Python/20240101_00.html
  17. Food___Taiwan/20220811_9.html
  18. Computer___NetBSD/20230119_00.html
  19. Food___Taiwan/20230604_00.html
  20. Food___Cooking/20230625_03.html
  21. Travel___Taiwan/20230525_09.html
  22. Computer___FreeBSD/20240123_00.html
  23. Food___Cooking/20220821_5.html
  24. Food___Taiwan/20210216_1.html
  25. Food___Taiwan/20230622_10.html
  26. Misc___Taiwan/20240903_01.html
  27. Computer___TeX/20230726_01.html
  28. Computer___NetBSD/20241102_00.html
  29. Computer___NetBSD/20220729_0.html
  30. Food___Taiwan/20230725_24.html


HTML file generated by Kinoshita Daisuke.