Unable to update package "base files"

Hello! I have compiled latest version from git and want keep it updated.

Model TP-Link TL-WR743N/ND v2
Firmware Version OpenWrt SNAPSHOT r7045-c8fdd0e9c8 / LuCI Master (git-18.143.80802-59d91d8
root@OpenWrt:~# uname -a
Linux OpenWrt 4.9.102 #0 Fri May 25 14:01:59 2018 mips GNU/Linux

I am unable to update device - getting error:

root@OpenWrt:~# opkg list-upgradable
base-files - 190-r7045-c8fdd0e9c8 - 190-r7046-5857088c5e
root@OpenWrt:~# opkg upgrade base-files
Upgrading base-files on root from 190-r7045-c8fdd0e9c8 to 190-r7046-5857088c5e...
Downloading http://downloads.lede-project.org/snapshots/targets/ar71xx/tiny/packages/base-files_190-r7046-5857088c5e_mips_24kc.ipk
umount: devpts busy - remounted read-only
umount: tmpfs busy - remounted read-only
umount: can't remount tmpfs read-only
umount: proc busy - remounted read-only
Collected errors:
 * copy_file: unable to open `/etc/group-opkg.backup': Read-only file system.
 * file_copy: Failed to copy file /etc/group to /etc/group-opkg.backup.
 * backup_make_backup: Failed to copy /etc/group to /etc/group-opkg.backup
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/base-files.list: Read-only file system.

My question: how to solve such issues? Should I re-compile and re-flash image r we have some trick for release "base files" until update? Thank You!

Yes, upgrading the base system on a running system, or even things like busybox are challenging at best, likely leading to a soft brick. In general, flashing a current image is the best course for anything but packages installed after a firmware flash, both for reliability, as well as preserving free space. If you "upgrade" a package that is in the squashfs image, you don't remove the original and the new package is not compressed, as it is when in the squashfs image.

As a notable exception, if you've got a security issue with a package or two, its better to get them upgraded while you're building / downloading a new version of the firmware than to leave yourself exposed.

1 Like

My understanding is base-files should never be upgraded, as only non-system related packages should ever be upgraded.

  • Such things as base-files, kmod-*, and any other packages dependent on kernel versions should never be upgraded.

As @jeff mentioned, if wanting to upgrade system based packages that are dependent on kernel versions, flashing the most recent image available would be the preferred option.

1 Like