指点云用户44 发表于 2022-7-29 20:47:49

OpenWrt 19.07.3 升级到 OpenWrt 21.02.2 遇到的问题

<article id="post-9056" class="post hentry" style="border-bottom: 1px solid rgb(221, 221, 221); margin: 0px 0px 1.625em; padding: 0px 0px 1.625em; position: relative; color: rgb(55, 55, 55); font-family: Source Sans Pro, sans-serif; font-size: 14px; white-space: normal;"><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">虽然&nbsp;<a href="https://openwrt.org/releases/21.02/notes-21.02.0" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(29, 153, 243); text-decoration-line: none; overflow-wrap: break-word; overflow: hidden;">OpenWrt 21.02</a>&nbsp;已经发布很久了,可是近些年工作越来越忙,实在没有精力折腾,就懒得<a href="https://cnzhx.net/blog/general-steps-to-upgrade-openwrt-in-home-router/" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(29, 153, 243); text-decoration-line: none; overflow-wrap: break-word; overflow: hidden;">升级自家 Netgear R8000 上的 OpenWrt</a>&nbsp;了。最近发现在网络繁忙的时候路由器上的 5G 无线热点就会崩溃,找不到原因,就想着升级一下看看吧。然后 OpenWrt 19.07.3 升级到 OpenWrt 21.02.2 的过程中遇到了两个问题。下面是找到的解决办法。</p><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;"><span id="more-9056" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"></span></p><p><span style="border: 0px; font-family: inherit; font-style: inherit; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">目录 Contents</span></p><ul class="toc_list list-paddingleft-2" style="list-style-type: none;"><li><p><a href="https://cnzhx.net/blog/issues-in-upgrading-openwrt-19-07-3-to-openwrt-21-02-2/#i-1" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(29, 153, 243); text-decoration-line: none; overflow-wrap: break-word; overflow: hidden;">1. 网页管理界面无法打开</a></p></li><li><p><a href="https://cnzhx.net/blog/issues-in-upgrading-openwrt-19-07-3-to-openwrt-21-02-2/#i-2" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(29, 153, 243); text-decoration-line: none; overflow-wrap: break-word; overflow: hidden;">2. 无线无法使用。</a></p></li></ul><h2 id="i-1" style="border: 0px; font-family: inherit; font-size: 1.2em; font-style: inherit; margin: 0px 0px 0.8125em; outline: 0px; padding: 0.3em; vertical-align: baseline; clear: both; color: rgb(245, 245, 245); text-indent: 10px; background: rgb(29, 153, 243); text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0px;">1. 网页管理界面无法打开<span class="anchorlink" style="border: 0px; font-family: inherit; font-size: smaller; font-style: inherit; font-weight: inherit; margin: 0px 0.25em; outline: 0px; padding: 0px 0.5em; vertical-align: baseline; background-color: transparent; color: transparent;"><a href="https://cnzhx.net/blog/issues-in-upgrading-openwrt-19-07-3-to-openwrt-21-02-2/#i-1" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; text-decoration-line: none; overflow-wrap: break-word; overflow: hidden; background-color: transparent;">¶</a></span></h2><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">提示错误,</p><pre style="border-width: 0px 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(128, 9, 24); border-image: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 0.875rem; line-height: 1.5; font-family: Source Code Pro, monospace; margin-top: 0px; margin-bottom: 1.625em; outline: 0px; padding: 0px 1.625em; vertical-align: baseline; background-color: rgb(244, 244, 244); overflow: auto;">/usr/lib/lua/luci/dispatcher.lua:427:&nbsp;/etc/config/luci&nbsp;seems&nbsp;to&nbsp;be&nbsp;corrupt,&nbsp;unable&nbsp;to&nbsp;find&nbsp;section&nbsp;main</pre><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">参考这里:https://techoverflow.net/2021/05/04/how-i-fixed-openwrt-luci-error-etc-config-luci-seems-to-be-corrupt-unable-to-find-section-main/</p><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">解决方案:SSH 登录后编辑&nbsp;<code style="border: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Source Code Pro, monospace; margin: 0.1em 0px; outline: 0px; padding: 0.2em 0.3em; vertical-align: baseline; background: rgb(238, 238, 238);">/etc/config/luci</code>,在&nbsp;<code style="border: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Source Code Pro, monospace; margin: 0.1em 0px; outline: 0px; padding: 0.2em 0.3em; vertical-align: baseline; background: rgb(238, 238, 238);">config core main</code>&nbsp;这个区块里增加下面一行配置选项(如果已有类似的,就注释掉原来那条再增加下面这条),</p><pre style="border-width: 0px 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(128, 9, 24); border-image: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 0.875rem; line-height: 1.5; font-family: Source Code Pro, monospace; margin-top: 0px; margin-bottom: 1.625em; outline: 0px; padding: 0px 1.625em; vertical-align: baseline; background-color: rgb(244, 244, 244); overflow: auto;">option&nbsp;socket&nbsp;/var/run/ubus.sock</pre><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">然后将系统中的&nbsp;<code style="border: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Source Code Pro, monospace; margin: 0.1em 0px; outline: 0px; padding: 0.2em 0.3em; vertical-align: baseline; background: rgb(238, 238, 238);">rpcd</code>&nbsp;配置备份后用默认的配置文件替换,</p><pre style="border-width: 0px 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(128, 9, 24); border-image: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 0.875rem; line-height: 1.5; font-family: Source Code Pro, monospace; margin-top: 0px; margin-bottom: 1.625em; outline: 0px; padding: 0px 1.625em; vertical-align: baseline; background-color: rgb(244, 244, 244); overflow: auto;">cp&nbsp;/etc/config/rpcd&nbsp;/etc/config/rpcd.bak
cp&nbsp;/rom/etc/config/rpcd&nbsp;/etc/config/rpcd</pre><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">重启路由器,应该可以解决 LuCI 网页界面无法正常打开的问题了。</p><h2 id="i-2" style="border: 0px; font-family: inherit; font-size: 1.2em; font-style: inherit; margin: 0px 0px 0.8125em; outline: 0px; padding: 0.3em; vertical-align: baseline; clear: both; color: rgb(245, 245, 245); text-indent: 10px; background: rgb(29, 153, 243); text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0px;">2. 无线无法使用。<span class="anchorlink" style="border: 0px; font-family: inherit; font-size: smaller; font-style: inherit; font-weight: inherit; margin: 0px 0.25em; outline: 0px; padding: 0px 0.5em; vertical-align: baseline; background-color: transparent; color: transparent;"><a href="https://cnzhx.net/blog/issues-in-upgrading-openwrt-19-07-3-to-openwrt-21-02-2/#i-2" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; text-decoration-line: none; overflow-wrap: break-word; overflow: hidden; background-color: transparent;">¶</a></span></h2><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">在「系统」==「网络」==「无线」页面中显示有下面的状态信息。</p><pre style="border-width: 0px 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(128, 9, 24); border-image: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 0.875rem; line-height: 1.5; font-family: Source Code Pro, monospace; margin-top: 0px; margin-bottom: 1.625em; outline: 0px; padding: 0px 1.625em; vertical-align: baseline; background-color: rgb(244, 244, 244); overflow: auto;">Device&nbsp;is&nbsp;not&nbsp;active</pre><pre style="border-width: 0px 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(128, 9, 24); border-image: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 0.875rem; line-height: 1.5; font-family: Source Code Pro, monospace; margin-top: 0px; margin-bottom: 1.625em; outline: 0px; padding: 0px 1.625em; vertical-align: baseline; background-color: rgb(244, 244, 244); overflow: auto;">Wireless&nbsp;is&nbsp;not&nbsp;associated</pre><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">参考这里:https://forum.openwrt.org/t/wireless-is-not-associated/63291/38</p><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">解决方案:删除原来配置的无线的 SSID 配置(在「系统」==「网络」==「无线」页面中 radio? 下面的那个条目,? 代表 0、1、2),然后重新配置无线接入点。如果还希望使用原来的配置的话,可以先把原来的配置记下来备用。</p><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;">但是经过测试,虽然这样会解决上述问题,但似乎并不彻底。暂时没有时间进一步探索。<a href="https://cnzhx.net/blog/issues-in-upgrading-openwrt-19-07-3-to-openwrt-21-02-2/" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(29, 153, 243); text-decoration-line: none; overflow-wrap: break-word; overflow: hidden;"><span style="color:#ccc;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">©</span></a></p><p style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-top: 0px; margin-bottom: 1em; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.625em;"><br/></p></article><ul class="related_post list-paddingleft-2" style="list-style-type: circle;"></ul><p><ins class="adsbygoogle" data-ad-client="ca-pub-4902986045244904" data-ad-slot="3983956290" data-ad-format="auto" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; background: rgb(255, 249, 192); text-decoration-line: none; display: block;"></ins></p><p></p><nav id="nav-single" style="clear: both; overflow: hidden; padding: 0px 0px 1.625em; color: rgb(55, 55, 55); font-family: Source Sans Pro, sans-serif; font-size: 14px; white-space: normal;"></nav><p></p><p><br/></p><link rel="stylesheet" href="//www.zhidianyun.cn/source/plugin/wcn_editor/public/wcn_editor_fit.css?v134_TZ8" id="wcn_editor_css"/>
页: [1]
查看完整版本: OpenWrt 19.07.3 升级到 OpenWrt 21.02.2 遇到的问题