OpenWRTのバージョンアップ2025年12月03日 19:41

素直にsysupgradeするとパッケージが全部消えるので、手順をメモ
 
1.事前にパッケージと kmod のリストを退避しておく
opkg list-installed | grep kmod | cut -f 1 -d ' ' > /root/kmod-list.txt
opkg list-installed | cut -f 1 -d ' ' > /root/packages-list.txt
 
.root 配下も sysupgrade すると素直に消えるので、ログを取っておく

2.Web-UI から sysupgrade する
 
3.再起動して立ち上がってきたら、ssh で入る
 
4.パッケージアップデートする
opkg update
opkg upgrade $(opkg list-upgradable | cut -f 1 -d ' ')
※パッケージのアップデートは後でWEB-UIから
 やったほうがいいかもしれず
 
5.diff できないので、diffutilsを入れる
opkg install diffutils
 
6.新しいファームでパッケージのリストをとり、差分を取る
opkg list-installed | grep kmod | cut -f 1 -d ' ' > /root/kmod-list.new
opkg list-installed | cut -f 1 -d ' ' > /root/packages-list.new
 
7.差分で出たのをWEB-UIでインストールする