binary upgrade

玄箱HGを今ごろになって6.1.2に更新したので作業手順をメモ。


まずは/netbsdを更新。一応現状のカーネルをバックアップしておく。

# cp /netbsd /netbsd.bak
# tar xzpvf kern-KUROBOX.tgz -C /

この状態で一度再起動。

# reboot

正常に起動できたらetc以外を展開。X関係は入れていないので省略。

# for i in base comp games man misc modules tests text; do tar xzpvf $i.tgz -C /; done

/tmp/tmprootにetc.tgzを展開。

# mkdir /tmp/tmproot
# tar xzpvf etc.tgz -C /tmp/tmproot

postinstall実行。

# postinstall -s /tmp/tmproot check
...(略)...
postinstall checks passed: bluetooth ddbonpanic defaults dhcpcd envsys fontconfig gid gpio hosts iscsi motd named pam periodic pf pwd_mkdb rc ssh wscons x11 xkb uid varrwho tcpdumpchroot atf catpages obsolete ptyfsoldnodes
postinstall checks failed: makedev mtree
To fix, run:
    sh /usr/sbin/postinstall -s '/tmp/tmproot' -d / fix makedev mtree
Note that this may overwrite local changes.

修正するならコレ実行しやがれということなので。

# sh /usr/sbin/postinstall -s '/tmp/tmproot' -d / fix makedev mtree
...(略)...
postinstall fixes passed: makedev mtree
postinstall fixes failed:

etcupdate実行。

# etcupdate -s /tmp/tmproot
...(差異があるファイルを更新していいか確認してくるので適宜答える)...
*** All done

再起動。

# shutdown -r now

完。