After sysupgrade without -n (by keep setting ) not get ip

hi friends
i upgrade bin file with keep setting in GUI ( or without -n on sysupgrade )
modem can not get ip dhcp on lan and wifi
how solve this problem ?


There are no tips in this page for my problem with sysupgrade

If we can follow your small problem description, you want to reset your device to default settings as it would be with "sysupgrade -n ...", right?

Enter failsafe mode like described in the link and make a factory reset with firstboot -y && reboot now.

If this isn´t what you want, please ask a better question.


I don't want to return the device to its default settings
I want to keep the device with bin settings before upgrading
That is, in gui ==> I set the keep setting in the upgrade section
With Command Line ==> sysupgrade /tpm/test.bin

My settings remain but pc doesn't get ip from modem I have to manually set ip to access

What version were you upgrading from? What is the new version? Setting are not always compatible between major releases, the farther apart the more likely that it will fail to work as expected. The best way to handle the situation is to create a backup and then selectively restore config files. If a file works, great. If it fails, you can recreate the settings from the reference of the old one.


I'm reinstalling the version that is currently installed and I'm having this problem
There is nothing wrong with being compatible

You are right that, in theory, things should not break If you are reflashing the same version. But if you had previously installed packages that modified the dependencies of the configuration (that now apprear to have broken) and/or if you have files that did not get saved properly (sysupgrade.conf defines the files to backup/keep, iirc), what you are experiencing could still be explained. Especially if you were using an extroot or other overlay method to increase your available storage.

That brings me to the next set of questions:
-what version are you using / reflashing?

  • why are you reflashing? What problem are you trying to solve?
  • Why not just do the reset to defaults (firstboot) instead (backup, reset, restore backup)? This has the same effect as reflashing if you are using the same version.
  • are you absolutely sure you are using the same exact image that had been used to flash this device in the past?

In essence, I would like to install future versions that have non-system changes
I am currently installing the same version as the "keep setting" for the test, but found this problem
How can I understand and solve the problem?

More information is needed. We can't help if you don't answer these questions.

  • You still haven't answered which version of OpenWrt you are currently using.
  • What device are you using?
  • Have you installed any non-default packages? Or done anything with opkg install/remove/upgrade?
  • Have you setup extroot or an overlay using external storage?
  • Are you 100% positive you used the same firmware image to re-flash as you had used originally?
  • Have you saved a backup?
  • Have you tried resetting to factory defaults (either through the LuCI or command line firstboot, or by not keeping settings during flash)?
  • Have you then tried to restore the backup? If so, did it work?

The general rule of thumb is that minor ('point') releases should upgrade without issue when you keep settings, but you will have to reinstall any non-default packages that were previously added. Upgrading major releases, as I said previously, is not always going to be compatible.

That said, the safest route will always be to create a backup, flash without keeping settings, then restore the backup (and reinstall packages, if necessary). It really isn't that hard or time consuming in the vast majority of cases.

1 Like

Yes, Sure . Answer these:
I'm using version 18.06.3
My device is uni elec mt7628
Yes I did. Like smstools 3 and ...
No I didn't do an extroot setup
Yes I am 100% sure I will use the same version and file
I got the backup version and restarted it and there was no problem
Yes I used firstboot and also reset it via luci and no problem
This is really strange to me. Because the backup file can easily be restored, but with the keep setting, this problem arises

Thanks for the added info. Based on what you provided, I can’t really see any reason that things would have gotten messed up.

Did you try the flash+keep settings more than once? Was the result the same each time? Or was it just a fluke?

It might be worth upgrading to 18.0.5 and trying again. And 19.07.0-rc2. If the problem persists, maybe someone can help identify if this is a bug in the system or if there is some other cause.

As always, taking a backup and then restoring that backup after a flash without keeping settings is the most reliable method.


thanks for help my friend
i found this
i set lan settnig in bash script just for first bin install
and this file creat problem
i have a question that how set network setting in openwrt source (add interface and ... )
i must edite which file for add interface ?

I'm guessing you meant "configs" and not "source":

  • You edit /etc/config/network to add an Interface
  • You further edit /etc/config/dhcp and /etc/config/firewall to setup DHCP and Firewall Zones, respectively