[SOLVED] Does Hard/Soft Reset recover deleted (system) base-files? (`opkg` not working)

I "accidently" deleted openwrt system base-files :frowning: and few more
(kmod-ath1k-ct kmod-ath kmod-mac80211 kmod-cfg80211 iw wpad-basic-wolfssl swconfig base-files netifd odhcpd-ip v6only iwinfo libiwinfo20210430 libnl-tiny1)
so that opkg is not working :frowning:

TLDR: Will Hard Reset restore deleted openwrt base packages?

As opkg is not working :frowning: and I'm affraid to reboot:

/home/marcin # opkg update
/home/marcin # opkg install kmod-ath1k-ct kmod-ath kmod-mac80211 kmod-cfg80211 iw wpad-basic-wolfssl swconfig base-files netifd odhcpd-ip v6only iwinfo libiwinfo20210430 libnl-tiny1
Unknown package 'kmod-ath1k-ct'.
Unknown package 'kmod-ath'.
Unknown package 'kmod-mac80211'.
Unknown package 'kmod-cfg80211'.
Unknown package 'iw'.
Unknown package 'wpad-basic-wolfssl'.
Unknown package 'swconfig'.
Installing base-files (1489-r19700-90e4c8c6e6) to root...
Installing netifd (2022-05-19-507c0513-1) to root...
Unknown package 'odhcpd-ip'.
Unknown package 'v6only'.
Unknown package 'iwinfo'.
Unknown package 'libiwinfo20210430'.
Unknown package 'libnl-tiny1'.
Collected errors:
 * opkg_install_cmd: Cannot install package kmod-ath1k-ct.
 * opkg_install_cmd: Cannot install package kmod-ath.
 * opkg_install_cmd: Cannot install package kmod-mac80211.
 * opkg_install_cmd: Cannot install package kmod-cfg80211.
 * opkg_install_cmd: Cannot install package iw.
 * opkg_install_cmd: Cannot install package wpad-basic-wolfssl.
 * opkg_install_cmd: Cannot install package swconfig.
 * opkg_download_pkg: Package base-files is not available from any configured src.
 * opkg_install_pkg: Failed to download base-files. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package base-files.
 * opkg_download_pkg: Package netifd is not available from any configured src.
 * opkg_install_pkg: Failed to download netifd. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package netifd.
 * opkg_install_cmd: Cannot install package odhcpd-ip.
 * opkg_install_cmd: Cannot install package v6only.
 * opkg_install_cmd: Cannot install package iwinfo.
 * opkg_install_cmd: Cannot install package libiwinfo20210430.
 * opkg_install_cmd: Cannot install package libnl-tiny1.
/home/marcin # 

Please help

I just find info that hard reset restores "to the configuration it had just after flashing" so I understand it won't restore the deleted sys files :frowning:

`

Right Bill, as my router is xr500 so target seems to be Target: ipq806x

and I'm on snapshot openwrt (as there's no stable yet)

I did found snapshot base-files*.ipk for my router and download it on router:
$ wget https://downloads.openwrt.org/snapshots/targets/ipq806x/generic/packages/base-files_1489-r19704-efff48529b_arm_cortex-a15_neon-vfpv4.ipk

then in mc I extracted all files from inner archive (data.tar.gz) files to / filessystem, and executed postinstall.

After that opkg start to work :smiley:

/home/marcin # opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/ipq806x/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/snapshots/targets/ipq806x/generic/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base/Packages.sig
Signature check passed.
(...)

Yes.

--
(at least on squashfs+overlay based images).

2 Likes

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