Opkg update failed with code 7 on Linksys EA7500v2

At first everything is working fine, in the middle of installing additional scripts via LuCI to support DDNS auto-updates it starts to report installation failure. Try "opkg update" from the command line:

# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/5.4.159-1-d5d247d0664fcfbbf7d57e7a9a274ff2/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/5.4.159-1-d5d247d0664fcfbbf7d57e7a9a274ff2/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/5.4.159-1-d5d247d0664fcfbbf7d57e7a9a274ff2/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing/Packages.gz, wget returned 1.
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony/Packages.gz, wget returned 1.

Web interface reported "opkg update command failed with code 7"From the Web interface it actually reported "opkg update command failed with code 7"


# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.5M      3.5M         0 100% /rom
tmpfs                   122.7M    268.0K    122.4M   0% /tmp
/dev/ubi0_1              24.6M      1.9M     21.5M   8% /overlay
overlayfs:/overlay       24.6M      1.9M     21.5M   8% /
tmpfs                   512.0K         0    512.0K   0% /dev 

Can't be running out of flash space?


https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/

Your headline say you have 21.02.1 but opkg tries to download for a snapshot but it should try to download from the 21.02.1 files from the address I have linked to above.

So do you have 21.02.1 or master snapshot?

1 Like

I have the snapshot from this link:
https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/openwrt-ramips-mt7621-linksys_ea7500-v2-squashfs-sysupgrade.bin

OpenWrt SNAPSHOT r18195-d1c7df9c4b

Why did you say 21.02.1 in the headline then if you knew you had a snapshot!?

If we talk snapshot these links works for about a day at best then it is obsolete and you need a new openwrt install. That was the short and easy version.

Sorry, I didn't know it can't be named that way, amended.

Just upgraded to Stable via LuCI, I found that root file system is being mounted to ram disk, all configuration are lost upon router reboot, any idea how to fix this?
-----------------------------------------------------
** OpenWrt 21.02.1, r16325-88151b8303**
** -----------------------------------------------------**

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                   123.1M    248.0K    122.8M   0% /tmp
tmpfs                   123.1M     92.0K    123.0M   0% /tmp/root
overlayfs:/tmp/root     123.1M     92.0K    123.0M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev

What errors there are in the system log and kernel log about overlay, jffs2 and ubi ?

1 Like

Relevant output of ubi and jffs2:

# dmesg | grep ubi
[    2.007394] 0x000000580000-0x000002980000 : "ubi"
[    2.807767] ubi0: attaching mtd6
[    3.176665] ubi0: scanning is finished
[    3.196709] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    3.202130] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.208984] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.215755] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.222698] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    3.228687] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.235892] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1637958789
[    3.244996] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    3.254219] ubi0: background thread "ubi_bgt0d" started, PID 503
[    3.256004] block ubiblock0_0: created from ubi0:0(rootfs)
[    3.265706] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[   10.473559] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   10.479236] UBIFS error (ubi0:1 pid 652): 0x802371dc: 'compressor "zstd" is not compiled in
[   10.488550] mount_root: failed to mount -t ubifs /dev/ubi0_1 /tmp/overlay: No error information
[   10.505088] mount_root: switching to ubifs overlay
[   10.509986] mount_root: switching to ubifs failed - fallback to ramoverlay
# dmesg | grep jffs2
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.527713] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
# dmesg | grep overlay
[   10.488550] mount_root: failed to mount -t ubifs /dev/ubi0_1 /tmp/overlay: No error information
[   10.497601] mount_root: overlay filesystem has not been fully initialized yet
[   10.505088] mount_root: switching to ubifs overlay
[   10.509986] mount_root: switching to ubifs failed - fallback to ramoverlay

That part looks new.
Never seen that before.

Could that be similar to this: Xiaomi Redmi AC2100 upgrade to 21.02 doesnt keep config (ubifs zstd ?) - #16 by hnyman

As I am downgrade from Snapshot.

Fixed:

# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.8M      3.8M         0 100% /rom
tmpfs                   123.1M    252.0K    122.8M   0% /tmp
/dev/ubi0_1              24.3M     56.0K     23.0M   0% /overlay
overlayfs:/overlay       24.3M     56.0K     23.0M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev

LuCI Flash new firmware image and UNcheck "Keep settings ..."
Upload and flash again: openwrt-21.02.1-ramips-mt7621-linksys_ea7500-v2-squashfs-sysupgrade

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.