Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#685 - x86: sysupgrade to LEDE lose the configuration #5768

Closed
openwrt-bot opened this issue Apr 7, 2017 · 2 comments
Closed

FS#685 - x86: sysupgrade to LEDE lose the configuration #5768

openwrt-bot opened this issue Apr 7, 2017 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

lynxis:

Try to update x86_64 from OpenWrt (r48532) to LEDE (r2993).
It will loose all configuration, but the system comes back online with default configuration.

@openwrt-bot
Copy link
Author

NeoRaider:

Similar report: freifunk-gluon/gluon#1010

Occording to remote debugging I did via IRC a few weeks ago (sorry for not reporthing this here earlier), the cause of this issue seems to be a change in the partition layout.

It seems the sda1 (boot) partition grows, but the kernel can't update its partition definitions (a call to partx added to platform_do_upgrade() will fail), as the new sda1 overlaps with the old sda2 (root), which is still mounted during sysupgrade. This will make the sda1 mount fail, so sysupgrade.tgz can't be written.

I don't think there is an easy way to make sda2 unmountable during sysupgrade? So maybe we must find a different place to store the sysupgrade files...

@openwrt-bot
Copy link
Author

NeoRaider:

I have some working code in my staging tree at https://git.lede-project.org/?p=lede/neoraider/staging.git;a=shortlog;h=refs/heads/sysupgrade now that changes sysupgrade to use the staged sysupgrade mechanism on all targets. I have verified that it works correctly on ar71xx, x86 and ramips (nand); it will need more testing, but it should work on the other targets, too.

On top of the sysupgrade changes, which don't touch target-specific code at all, the branch also contains the following:

  • The call to the NAND sysupgrade code is simplified on ramips (a similar change should be done in all NAND targets eventually, so we can get rid of a few hacks in sysupgrade)
  • partx calls are added to the x86 sysupgrade to make the partition table updates more robust. This should be done on all targets using harddisk-like storage with partition tables.

TODO:

  • Re-add some missing features to sysupgrade (e.g. support for image download via HTTP)
  • Add more sanity checks (ensure that the image is in /tmp, that the rootfs has been unmounted, ...)

I will also backport my work to OpenWrt CC and verify that it really fixes this issue, as we need working sysupgrade from CC to LEDE in Gluon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant