OpenWrt Forum Archive

Topic: Sysupgrade - Newbie question

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Im quite new to OpenWRT, but i have fiddled a wee bit with linux and ofc other variants of wifi firmware (dd-wrt and tomatousb)..

Now, i dont really understand the approach to "sysupgrade", and what it really does. I know in eg. dd-wrt when you upgrade the image, everything will be replaced, and even tho its not recommended, your config will be preserved. This thing with "sysupgrade", does it just flash "over" the current image like doing a fw upgrade in dd-wrt, or is it more like upgrading the kernel files, while keeping everything else?

Lets say i have installed a "custom build" by "A". I remove some addons and stuff i dont need from his build. Then i figure id like to try out the custom build by "B". He have set things up using a wee bit different addons and things, but some are the same.

What will happen during a sysupgrade?
Will :
A: I upgrade whatever kernel and main binaries that i am running when i do the sysupgrade?
B: Everything will be reinstalled, including the addons in the new image, and old addons and things i have added on my previous setup is gone?
C: I should really really just dont think about this, and just set everything up again after doing a upgrade?

If case C: above, should i then use the "factory" image, and not the sysupgrade one?

C

After you installed OpenWrt on your embedded hardware, you do not need to use the "factory"-images. You can do so, but there is no point.

Please find/extrapolate further information from the wiki: OpenWrt Sysupgrade

Orca wrote:

After you installed OpenWrt on your embedded hardware, you do not need to use the "factory"-images. You can do so, but there is no point.

Please find/extrapolate further information from the wiki: OpenWrt Sysupgrade

Well.. i have read the wiki, but it does not describe in detail what happens to my already installed addons, xept for :

You cannot save installed binaries, you will have to install them again after sysupgrade

The thing this tells me, is that i have to install all binaries again, and tbh thats quite a list i guess. How would i easily keep track of that?

It also does not tell me what happens if the image im sysupgrading to has a different setup of addons too.

From the http://wiki.openwrt.org/doc/techref/opkg, it sais :

Upgrading packages is generally not recommended for most users, because a typical OpenWrt system stores the base system in a read-only SquashFS partition. And while the upgrade process works just fine, it uses far more space than a default installation as the base packages are duplicated in the base SquashFS partition and the user JFFS2 partition.
Thus, instead of upgrading, reflashing OpenWrt with a newer firmware image is recommended.

Basically doing a "working" sysupgrade is not really recommended? Ie, after doing a sysupgrade and rebooting, i would believe from the info above that the luci web gui will NOT work (as it is not updated), and more or less, im not recommended to upgrade it either? smile

Why am i being so stubborn and ask such useless questions you think.. Well, its cos one one hand i would like to use some recent patches that supposedly helps on the wifi disconnects on my WNDR3700v2, but on the other hand, i would also like to NOT have to set it all up again. I find the config and addons to be a wee bit "too much" sometimes smile I got my hopes up reading about the sysupgrade function, and thought it would work similar to doing a "apt-get upgrade" in ubuntu smile

C

PS. I have managed to compile a "working" image for my DIR-600b2 test router, but there was so many compile options i must have missed something vital, cos i dont get a working luci, nor wpa2 config.. Anyone have some nice scripts for building a minimal setup with luci web gui, wireless tools, and the most basics?

If the OpenWrt sysupgrade howto does not explain it, maybe the OpenWrt sysupgrade technical reference does (will one day...) In any case there is already a link to the browsable source files:

https://dev.openwrt.org/browser/trunk/p … sysupgrade

Have a look at it, and find out what it does.

To "keep track" of all installed packages, I would use a simple list. After sysupgrade: opkg install "list"

sysupgrade will save ALL configfiles in config, but you can additionally name files to preserve.

Yes, newer package versions can have problems with config files written for older packages... sigh. If you do not want that, use OpenWrt stable, to get only security updates.

Thanks, Cybmax & Orca for asking & addressing my question. I'm still curious why "factory" is named what it is and why it's so much bigger than sysupgrade - sized to fit all the available flash? From the FAQ:

What is the difference between the different image formats?

    a factory image is one built for the bootloader flasher or stock software flasher
    a sysupgrade image (previously named trx image) is designed to be flashed from within openwrt itself

Cybmax, I had the same no-Luci issue in my first build. As you seem to have realized, the Luci package has to be installed after the flash update. Instructions are here:

http://wiki.openwrt.org/doc/howto/luci.essentials

If you ever found a script that built an image including luci please point me to it - it seems odd that it's not part of the standard build.

(Last edited by stitch626 on 3 Mar 2012, 01:44)

Not everybody employing OpenWrt want's a WebUI!

To build OpenWrt yourself, start reading here.

LuCI is a feed...

I dont really understand the approach to "sysupgrade", and what it really does. I know in eg. dd-wrt when you upgrade the image, everything will be replaced, and even tho its not recommended, your config will be preserved

integrated management system

I believe sysupgrade is meant for those who do not build image themselves, but would want to upgrade the firmware. Using sysupgrade, they might be able to do so without losing all configurations.
Those who build image themselves would prefer factory, because they can put all (updated) configuration files into new image and do not need to worry about "updating" them after firmware is written.

From : http://wiki.openwrt.org/about/latest


Finally, decide which version you need:

If you are going to install via the normal OEM firmware upload, grab the file with "factory" in the name, e.g. openwrt-ar71xx-generic-wrt400n-jffs2-factory.bin

If you already have OpenWRT and you wish to upgrade while keeping your settings, use the file with "sysupgrade" in the name, e.g. openwrt-ar71xx-generic-wrt400n-jffs2-sysupgrade.bin

The "factory" has the full flash layout, with the unused space set clear, thus erasing the area what will be "rootfs_data" , as it could have erratic data from the original firmware.
The "sysupgrade" has only the kernel+rootfs, and leaves "rootfs_data" intact, so you can upgrade openwrt witout losing data.

Cybmax wrote:

Lets say i have installed a "custom build" by "A". I remove some addons and stuff i dont need from his build. Then i figure id like to try out the custom build by "B". He have set things up using a wee bit different addons and things, but some are the same.

Don't know if you have gotten around to that in the meantime, but you cannot remove stuff from builds (ie firmware images). The firmware image itself is read-only, the way OpenWrt stores settings and extra packages is by installing it onto the overlay. You can only remove packages you have installed separately; not stuff that was already built into the firmware.

Hi,
I have a Netgear DG834G with openWRT 12.09 installed. Since it very slow, I would like to downgrade to previous version 10.03.1. However, I cannot installed the firmware neither via GUI nor via sysupgrade. In particular, in the latter case I get the message "Firmware upgrade is not implemented for this platform." when I use sysupgrade -v openwrt-10.03-ar7-generic-squashfs.bin. What could be the problem?
Thank you

The discussion might have continued from here.