Full system upgrade by upgrading every package

At the moment I use a raspberry pi 2 with a custom selection of packages. This was compiled using OpenWRT Barrier Breaker r45620. Is it ok to upgrade by reinstalling every package with opkg or is it better to reinstall the system by flashing a new sdcard and copy my configuration. I think the wiping all data is not the smart way for raspberry devices. Am I right that everything is a package which is handled by the opkg package manager? Why not upgrading every installed package? Is there anything I got wrong using this way for future device upgrades?

The kernel image is not packaged with opkg (a limitation inherited from other LEDE targets) therefore it is not possible to perform a complete in-place upgrade.

1 Like

Except the kernel, every package is registered inside opkg, right? Then it would be possible to create a kernel package which mounts the raspberry boot partition and writes the kernel. Then a full in place upgrade is possible.

Well, jumping from BB to Lede 17 might not allow a smooth upgrade anyway as some package or core function may have been changed.

There might also be a squashfs read-only partition. If your image is full ext4 or f2fs then yeah, having a kernel package would allow upgrading.
This is valid also for x86 images and some others like kirkwood where you need to have a custom uboot anyway.

1 Like

this cmd worked for me to upgrade all packages:

opkg update
opkg list-upgradable | awk -F ' - ' '{print $1}' | xargs opkg upgrade

Why don't you just upgrade it the expected way? It will be easier than going the long route and trying to upgrade each package separately...

3 Likes

the pre-built image has everything compressed, when you upgrade a package the
result is not compressed, so upgrading every package the way you would a
'normal' linux system will usually not fit in your flash.

2 Likes

there were 20-30 packages to upgrade
it would be to much work to upgrade each package separately with:
opkg upgrade xyz-package

this cmd upgrades all packages

I was from the begining at LEDE Reboot 17.01.4 but now many packages
were outdated. now all packages are up to date ((git-18.061.17832-d092772))

is there a better way to upgrade to whole system ?

When you "remove" or "replace" something that was in the ROM flashed, it is still there, still consuming space. There's just the new version "hiding" it. If you've got plenty of space in your device, hey, it works. Well, except I recall that you can't upgrade the kernel and its modules that way.

The recommended approach is generally to flash with a current image containing at least the packages you need to boot, if not to run.

If you're upgrading packages that you installed after you flashed the ROM (namely ones not "built in" to the ROM), then you generally are replacing one file on the overlay with another.

1 Like

This thread explains why it's a bad idea to upgrade all packages...

1 Like

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