Behaviour of upgrading luci-base

Every time I upgrade luci-base, I get an error message 'can't update /etc/config/luci, writing to /etc/config/luci-opkg'.

Editing the files shows some syntactic differences.
Adjusting /etc/config/luci according to the ...-opkg file is possible. No problem when running and rebooting my system.

But: with the next upgrade the situation rehappens. If I check /etc/config/luci before the upgrade, the files contents is just as edited before. After upgrade the file shows the 'odd' contents again.

Do I something wrong? Is there a misconfiguration?
BTW, mount shows

/dev/root on / type ext4 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/sda1 on /boot type ext4 (rw,noatime)
/dev/sda1 on /boot type ext4 (rw,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)

The double entry for /dev/sda1 is suspicious. The partition table lists

Device     Boot Start     End Sectors  Size Id Type
/dev/sda1  *      512   33279   32768   16M 83 Linux
/dev/sda2       33792 7962191 7928400  3.8G 83 Linux
2 Likes

This means, only sysupgrades are reliable and opkg is obsolete?

How to manage with urgent corrections to modules? Is it possible to upgrade after a sysupgrade is announced? ( For the last two upgrades this was not true)

Nevertheless, the recommendation doesn't explain my problem. It is true, doing nothing doesn't make errors. :wink:

All of opkg is obsolete, apk is the new king, but opkg (and apk) upgrade shouldn't be used.

New minor release...

1 Like

Nice to hear. But I'm just a simple user of openwrt. And I do my updates using the web interface. It is the duty of this module to chose the right tools. :wink:

Is this feasible? Why is can't we just use the existing package manager?

It's only done if it's something critical.

Opkg isn't very good at handling dependencies.
Opkg upgrade could potentially soft brick your device, by missing a dependency when upgrading a package.

With 'package manager' I refer to the WUI topic System --> Software.

It's executing opkg/apk in the background.

I hoped so.:wink:

BTW: I just did an update of the programs list. Now I see a bunch of upgradable packets. Is it safe to do that? Especially, as luci-base is one of them.

On your own risk, sooner or later you might end up with something broken.
I'd never do it, don't see any reason why it'd be needed...

1 Like

Thanks for the frank answer.

I think, I will remain on the state of now.
And serach for a better maintained OS for my old x86 ALIX board. :frowning:

Not sure why you'd call Openwrt badly maintained, keep in mind the firmware is designed for devices with limited RAM and flash space.

A proper package manager and the deps it requires, is simply too big for an OS with a minimum flash size requirement of 16MB.

2 Likes

Either there is a package manager, which allows successful package updates, or you have to release frequently reliable sysupgrades ( which should preserve the installed packages and their configs ).

A package manager, which may demage my system, or a sysupgrade, which forces me to reinstall my packages, is of no use to me.

There are other distributions, handling this processes much better.
I was hoping, that OpenWRT with its little requirements, is maintained much better in this field.
I have experience in embedded systems (including reliable updates!) with small requirements. Therefore I know, it is not easy to do that but possible.

The owut package can do this for you.

Did those cost $0, too ?

1 Like

No. But free software should function nevertheless. The base system Linux does cost $0, also. But you trust and rely on it.

Indeed, but it won't fit a 16MB flash chip :slight_smile:
Corners were cut for a reason.

Back to the topic.

I just looked at the config file. Without doing an update, the contents switched to the odd state.

Thus the discussion about dangers in upgrading were useless. There is just another problem.
Where does the file content come from and why? At the moment I can't give timing informations, because I supposed the update process changed the file.

In order to better understand your issue, you should consider being more clear in describing the problem. In 1 post, you said you both did and didn't perform an update (which again, isn't recommended).

Frankly, there's been many threads of users who expect OpenWrt- an OS primarily for embedded systems, to behave similar to those designed for e.g. an x86_64 personal computer. Not sure why. :man_shrugging:

Provide the exact steps you've undertaken.

I thought the discussion was regarding a confif file change after an upgrade?

Then the steps were simply to use the new file (assuming you never altered it). Is there some reason you don't just:

cp /etc/config/luci /etc/config/luci-old
rm /etc/config/luci
cp /etc/config/luci-opkg /etc/config/luci

It's still unclear why you're "editing" them.

Lastly, you haven't mentioned which version of OpenWrt.

1 Like

I'll start from the beginning.

Yes, only sysupgrades are reliable for various historical reasons covered above.

opkg is more properly called "incomplete". Its version management is insufficient to support a full-blown upgradable Linux distro, and its use should be restricted to installing and uninstalling packages (and even then you'll, on rare occasion, have issues).

The best way to keep your device up-to-date is to use the Attended Sysupgrade (ASU) system. So, if you like to use the LuCI gui, install the luci-app-attendedsysupgrade package (which will appear under System -> Attended Sysupgrade), or if you prefer CLI (and assuming 24.10 or newer), then opkg install owut (see https://openwrt.org/docs/guide-user/installation/sysupgrade.owut).

Alternatively, you can do ASU builds online/off-device using Firmware Selector, but that requires that you do a lot of the bookkeeping that LuCI ASU and owut can do for you (since they are on-device and know what's installed).

ASU creates a new image for your device that contains your existing package installation, then sysupgrade installs it retaining your config, so it's usually completely seamless (less so when crossing release boundaries, like 23.05 -> 24.10, but typically transparent for say, 24.10.0 -> 24.10.1).

Since the ASU server utilizes opkg or apk to create the image, it can have problems, but those problems are sandboxed on the server, and if image creation fails, no installation is attempted. This leaves your device as-is, no chance of a soft- or hard-brick from package installation issues...

2 Likes

What is OpenWrt other than an OS tailored for small network systems?
Especially in this area it is urgent, that the system is trustfully and can be updated in a secure manner. Functionalities which are harmful, should not be included in the standard user interface ( the WUI ), IMO.

I must merge the two files, because some entries are not in the default config file. The design and language for example.

I am using OpenWrt 24.10.1 (r28597-0425664679).