Linksys WRT1900ACS 라우터에서 OpenWRT를 시스템 업그레이드하지 못함

Linksys WRT1900ACS 라우터에서 OpenWRT를 시스템 업그레이드하지 못함

그만큼sysupgrade기반 업그레이드 지침sysupgrade에 대해 다음 예를 제안하십시오.

cd /tmp wget http://downloads.openwrt.org/chaos_calmer/15.05/****/generic/filename-of-downloaded-sysupgrade.bin
sysupgrade -v /tmp/filename-of-downloaded-sysupgrade.bin

OpenWRT의 내 라우터 페이지기술 데이터: Linksys WRT1900ACS v1"펌웨어 OpenWrt 업그레이드 URL"은 다음과 같습니다.https://downloads.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar-- -- tar보다는 bin--이게 중요한지는 모르겠지만- 그렇지 않습니다.

다운로드:

root@OpenWrt:~# wget https://downloads.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar
--2018-02-04 16:23:18--  https://downloads.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar
Resolving downloads.openwrt.org... 2a01:4f8:202:43ea::3, 148.251.78.235
Connecting to downloads.openwrt.org|2a01:4f8:202:43ea::3|:443... failed: Permission denied.
Connecting to downloads.openwrt.org|148.251.78.235|:443... connected.
ERROR: cannot verify downloads.openwrt.org's certificate, issued by 'CN=Let\'s Encrypt Authority X3,O=Let\'s Encrypt,C=US':
  Unable to locally verify the issuer's authority.
To connect to downloads.openwrt.org insecurely, use `--no-check-certificate'.

Let's Encrypt 인증서가 좋지 않은 것 같습니다 :(

root@OpenWrt:~# wget --no-check-certificate https://downloads.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar
--2018-02-04 16:23:28--  https://downloads.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar

Resolving downloads.openwrt.org... 2a01:4f8:202:43ea::3, 148.251.78.235
Connecting to downloads.openwrt.org|2a01:4f8:202:43ea::3|:443... failed: Permission denied.
Connecting to downloads.openwrt.org|148.251.78.235|:443... connected.
WARNING: cannot verify downloads.openwrt.org's certificate, issued by 'CN=Let\'s Encrypt Authority X3,O=Let\'s Encrypt,C=US':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://archive.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar [following]
--2018-02-04 16:23:28--  https://archive.openwrt.org/chaos_calmer/15.05.1/mvebu/generic/openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar
Resolving archive.openwrt.org... 81.0.124.218
Connecting to archive.openwrt.org|81.0.124.218|:443... connected.
WARNING: cannot verify archive.openwrt.org's certificate, issued by 'CN=Let\'s Encrypt Authority X3,O=Let\'s Encrypt,C=US':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 4239360 (4.0M) [application/octet-stream]
Saving to: 'openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar'

openwrt-15.05.1-mvebu-armada-385-linksys-shelby-sq 100%[===============================================================================================================>]   4.04M  3.35MB/s   in 1.2s   

2018-02-04 16:23:29 (3.35 MB/s) - 'openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar' saved [4239360/4239360]

다음을 사용하여 업그레이드를 시도합니다.타르파일

root@OpenWrt:/tmp# sysupgrade -v openwrt-15.05.1-mvebu-armada-385-linksys-shelby-squashfs-sysupgrade.tar
Saving config files...
etc/collectd.conf
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/luci
etc/config/luci_statistics
etc/config/network
etc/config/openvpn
etc/config/openvpn_recipes
etc/config/pptpd
etc/config/qos
etc/config/rpcd
etc/config/samba
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/config/wireless
etc/crontabs/root
etc/dnsmasq.conf
etc/dropbear/dropbear_dss_host_key
etc/dropbear/dropbear_rsa_host_key
etc/firewall.user
etc/group
etc/hosts
etc/inittab
etc/openvpn/AU Melbourne.ovpn
etc/openvpn/AU Sydney.ovpn
etc/openvpn/Brazil.ovpn
etc/openvpn/CA North York.ovpn
etc/openvpn/CA Toronto.ovpn
etc/openvpn/France.ovpn
etc/openvpn/Germany.ovpn
etc/openvpn/Hong Kong.ovpn
etc/openvpn/Ireland.ovpn
etc/openvpn/Israel.ovpn
etc/openvpn/Italy.ovpn
etc/openvpn/Japan.ovpn
etc/openvpn/Mexico.ovpn
etc/openvpn/Netherlands.ovpn
etc/openvpn/Romania.ovpn
etc/openvpn/Russia.ovpn
etc/openvpn/Singapore.ovpn
etc/openvpn/Sweden.ovpn
etc/openvpn/Switzerland.ovpn
etc/openvpn/Turkey.ovpn
etc/openvpn/UK London.ovpn
etc/openvpn/UK Southampton.ovpn
etc/openvpn/US California.ovpn
etc/openvpn/US East.ovpn
etc/openvpn/US Florida.ovpn
etc/openvpn/US Midwest.ovpn
etc/openvpn/US New York City.ovpn
etc/openvpn/US Seattle.ovpn
etc/openvpn/US Silicon Valley.ovpn
etc/openvpn/US Texas.ovpn
etc/openvpn/US West.ovpn
etc/openvpn/authuser
etc/openvpn/ca.crt
etc/openvpn/crl.pem
etc/openvpn/piageneric.ovpn
etc/opkg.conf
etc/opkg/customfeeds.conf
etc/opkg/keys/53bad1233d4c98c5
etc/passwd
etc/ppp/chap-secrets
etc/ppp/filter
etc/ppp/options
etc/ppp/options.pptpd
etc/pptpd.conf
etc/profile
etc/protocols
etc/rc.local
etc/samba/smb.conf.template
etc/services
etc/shadow
etc/shells
etc/ssl/openssl.cnf
etc/sysctl.conf
etc/sysupgrade.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd crond uhttpd smbd nmbd collectd ntpd dnsmasq ubusd askfirst 
Sending KILL to remaining processes ... askfirst 
Switching to ramdisk...
Performing system upgrade...
Cannot parse config file: No such file or directory
Cannot parse config file: No such file or directory
Error: environment not initialized
cannot find target partition
@OpenWrt:/tmp# 

tar제가 사용하고 있는 파일이 좋지 않은 것 같습니다 . 대체 파일이 있어야 합니까 bin? 아니면 또 무엇을 제안하시겠습니까?

업데이트:

나는 이것을 다시 시도했다.내 라우터의 Lede 세부정보- 이번에는 .bin파일...

cd /tmp wget --no-check-certificate https://downloads.lede-project.org/releases/17.01.4/targets/mvebu/generic/lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin
sysupgrade -v lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin

출력 하단에 동일한 오류가 발생합니다.

Saving config files...
etc/collectd.conf
etc/config/dhcp
...
etc/uhttpd.crt
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd crond uhttpd 
smbd nmbd collectd ntpd dnsmasq ubusd askfirst 
Sending KILL to remaining processes ... askfirst 
Switching to ramdisk...
Performing system upgrade...
Cannot parse config file: No such file or directory
Cannot parse config file: No such file or directory
Error: environment not initialized
cannot find target partition

더 자세히 살펴보면 다음과 같은 부분이 실패하고 있습니다.Cannot parse config file

그리고 [이전에 본]](https://forum.openwrt.org/viewtopic.php?pid=298046#p298046) 내 라우터와 관련이 kernel1있습니다 kernel2./proc/mtd

/proc/mtd에 정의된 하나의 장치 "펌웨어" 또는 "linux" 대신 WRT1900AC 및 WRT1900ACS에는 중복되는 "kernel1" 및 "kernel2" 두 개가 있습니다. 현재 펌웨어가 첫 번째로 실행 중이면 두 번째로 업그레이드가 플래시되어야 합니다. 그런 다음 문제가 발생하면 다시 돌아갈 가능성이 있습니다. 깜박인 후에는 두 번째 플래시로 전환해야 합니다.

-- 에서https://forum.openwrt.org/viewtopic.php?pid=298084#p298084

업그레이드를 위한 다음 단계가 무엇인지 알 수 없습니다. 어떤 도움이나 의견이라도 환영합니다.

답변1

조금 더 읽은 후 안타깝게도 누락된 올바른 구성 파일을 추가하도록 시스템을 업데이트했습니다.

# from https://github.com/openwrt/openwrt/blob/master/package/boot/uboot-envtools/files/mvebu

touch /etc/config/ubootenv

. /lib/uboot-envtools.sh
. /lib/functions.sh
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"

config_load ubootenv
config_foreach ubootenv_add_app_config ubootenv

reboot

이를 통해 최신 버전의 LEDE로 성공적으로 업그레이드할 수 있었습니다.

root@OpenWrt:/tmp# cd /tmp;  wget --no-check-certificate https://downloads.lede-project.org/releases/17.01.4/targets/mvebu/generic/lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin
--2018-02-05 11:16:05--  https://downloads.lede-project.org/releases/17.01.4/targets/mvebu/generic/lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin
Resolving downloads.lede-project.org... 2a01:4f8:202:43ea::3, 148.251.78.235
Connecting to downloads.lede-project.org|2a01:4f8:202:43ea::3|:443... failed: Permission denied.
Connecting to downloads.lede-project.org|148.251.78.235|:443... connected.
WARNING: cannot verify downloads.lede-project.org's certificate, issued by 'CN=Let\'s Encrypt Authority X3,O=Let\'s Encrypt,C=US':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 4853942 (4.6M) [application/octet-stream]
Saving to: 'lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin'

lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sys 100%[===============================================================================================================>]   4.63M  2.22MB/s   in 2.1s   

2018-02-05 11:16:08 (2.22 MB/s) - 'lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin' saved [4853942/4853942]

root@OpenWrt:/tmp# sysupgrade -v lede-17.01.4-mvebu-linksys-wrt1900acs-squashfs-sysupgrade.bin
Saving config files...
etc/collectd.conf
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/luci
etc/config/luci_statistics
etc/config/network
etc/config/openvpn
etc/config/openvpn_recipes
etc/config/pptpd
etc/config/qos
etc/config/rpcd
etc/config/samba
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/config/wireless
etc/crontabs/root
etc/dnsmasq.conf
etc/dropbear/dropbear_dss_host_key
etc/dropbear/dropbear_rsa_host_key
etc/firewall.user
etc/fw_env.config
etc/group
etc/hosts
etc/inittab
etc/openvpn/AU Melbourne.ovpn
etc/openvpn/AU Sydney.ovpn
etc/openvpn/Brazil.ovpn
etc/openvpn/CA North York.ovpn
etc/openvpn/CA Toronto.ovpn
etc/openvpn/France.ovpn
etc/openvpn/Germany.ovpn
etc/openvpn/Hong Kong.ovpn
etc/openvpn/Ireland.ovpn
etc/openvpn/Israel.ovpn
etc/openvpn/Italy.ovpn
etc/openvpn/Japan.ovpn
etc/openvpn/Mexico.ovpn
etc/openvpn/Netherlands.ovpn
etc/openvpn/Romania.ovpn
etc/openvpn/Russia.ovpn
etc/openvpn/Singapore.ovpn
etc/openvpn/Sweden.ovpn
etc/openvpn/Switzerland.ovpn
etc/openvpn/Turkey.ovpn
etc/openvpn/UK London.ovpn
etc/openvpn/UK Southampton.ovpn
etc/openvpn/US California.ovpn
etc/openvpn/US East.ovpn
etc/openvpn/US Florida.ovpn
etc/openvpn/US Midwest.ovpn
etc/openvpn/US New York City.ovpn
etc/openvpn/US Seattle.ovpn
etc/openvpn/US Silicon Valley.ovpn
etc/openvpn/US Texas.ovpn
etc/openvpn/US West.ovpn
etc/openvpn/authuser
etc/openvpn/ca.crt
etc/openvpn/crl.pem
etc/openvpn/piageneric.ovpn
etc/opkg.conf
etc/opkg/customfeeds.conf
etc/opkg/keys/53bad1233d4c98c5
etc/passwd
etc/ppp/chap-secrets
etc/ppp/filter
etc/ppp/options
etc/ppp/options.pptpd
etc/pptpd.conf
etc/profile
etc/protocols
etc/rc.local
etc/samba/smb.conf.template
etc/services
etc/shadow
etc/shells
etc/ssl/openssl.cnf
etc/sysctl.conf
etc/sysupgrade.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd crond uhttpd smbd nmbd collectd ntpd dnsmasq ubusd askfirst 
Sending KILL to remaining processes ... askfirst 
Switching to ramdisk...
Performing system upgrade...
Unlocking kernel1 ...

Writing from <stdin> to kernel1 ...     
ubiattach: error!: cannot attach mtd5
           error 22 (Invalid argument)
ubiformat: mtd5 (nand), size 35651584 bytes (34.0 MiB), 272 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 271 -- 100 % complete  
ubiformat: 85 eraseblocks are supposedly empty
ubiformat: warning!: 187 of 272 eraseblocks contain non-UBI data
ubiformat: warning!: only 0 of 272 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 271 -- 100 % complete  
UBI device number 2, total 272 LEBs (34537472 bytes, 32.9 MiB), available 248 LEBs (31490048 bytes, 30.0 MiB), LEB size 126976 bytes (124.0 KiB)
Volume ID 0, size 22 LEBs (2793472 bytes, 2.7 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 28696576
Volume ID 1, size 226 LEBs (28696576 bytes, 27.4 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful

재부팅하면 성공적인 업그레이드가 표시됩니다.

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

관련 정보