Web UI to reboot to another partition (for Linksys/ZyXEL dual-partition routers) and to power off/power down

Sorry about delay in replying. It's the offset for the partition label information (OS, linux version, etc) from the partition holding that OS. If you dump first 1Kb and view it with the hex editor, it should either be obvious or missing. :wink:

I'm curious to know if it works on an EA7300v1 since in README's supported devices it's not listed but in last (1.0.1-3) build it's json file is included. Thanks!

Yeah, if you see the json for the device listed at https://github.com/openwrt/luci/tree/master/applications/luci-app-advanced-reboot/root/usr/share/advanced-reboot/devices (or whatever release version you're using instead of master in the tree), it should be supported.

And thanks for bringing it up, I've updated the docs with the devices which were missing.

Thank you Stangri, I'll be receiving the router in a couple days and I'm reading a lot to not brick the device installing openwrt 22.03.2. Hope in the next stable releases this whole partition selection gets better supported. Regards.-

@stangri Thanks for your excellent work!

Could support be added for Linksys EA6350v4 ?

I picked one up at Goodwill and have started tinkering :slight_smile:

I've written just the WebUI wrapper for the routers which already support booting into both partitions. There are some routers which while being dual-partition with OEM firmware only support booting from one of the partitions when flashed with OpenWrt. Unless the maintainers of these devices add support for booting OpenWrt from either partition, they can't be supported by this WebUI package.

@stangri Thanks for the clarification. I'll look into whether the Linksys EA6350v4 build already supports booting OpenWrt from either partition. If not, I will work with build maintainers to see whether that can be added.

The relevant page ( https://openwrt.org/toh/linksys/ea6350_v4 ) seems to be a bit thin on details at present. Perhaps I can also help bring the page quality, completeness up a bit.

Cheers!

It's usually more helpful to find the commit which enabled support of this device in the openwrt repo, commits usually contains a lot of background/support information for the device (as well as the name of the committer/maintainer).

Would it be possible to add support for Linksys EA9200? Would be glad to be of assistance if you need anything. https://openwrt.org/toh/hwdata/linksys/linksys_ea9200

There's no commit linked from the ToH article and I couldn't locate the commit where support for this device has been added. If you have this device -- how do you switch active partitions on it?

The only way I've been able to switch partitions were:

A. rebooting from Luci switches back to stock firmware
B. reflashing from from stock firmware ui leads back to OpenWrt

If there are any ways to check this properly from OpenWrt I'd be happy to follow, but right now these are the only ways I know in which the active partitions switch.

Ah, that's a bummer. Thanks a lot though!

Hi.

The Xiaomi AX9000 has experimental support for OpenWRT.

It's a dual firmware router and to switch between them, just needs the commands, on OpenWRT:

fw_setenv flag_boot_rootfs=1 or 0
fw_setenv flag_last_success=1 or 0

0 means the mtd rootfs and 1 the mtd rootfs_1

Where can I find documentation for constructing its template for this package?

Thanks.

There's no documentation, you can refer to json files for the other devices as a reference: https://github.com/openwrt/luci/tree/master/applications/luci-app-advanced-reboot/root/usr/share/advanced-reboot/devices

In your case the bootEnv1 should be flag_boot_rootfs with two next variables set to 0 and 1, bootEnv2 and other parameters for bootEnv2*** must be null.

The partition1MTD and partition2MTD should refer to rootfs and rootfs_1 partitions and labelOffset is how many bytes need to be skipped from the beginning of partition to find the linux kernel information text.

1 Like

Pull request submitted: https://github.com/openwrt/luci/pull/6124

Thanks. :slight_smile:

Do you have an idea if/when @robimarko is going to submit PR to support this router in the OpenWrt repo?

I don't want to discourage you from submitting PR, but until the support is official in the OpenWrt repo, I'd be reluctant to merge your changes because if the router is not officially supported in OpenWrt repo, why merge changes to OpenWrt luci repo for it?

In the mean time, I'll be more than happy to merge your changes to my private source code repo: https://github.com/stangri/source.openwrt.melmac.net/ and build a package for my packages repo: https://github.com/stangri/repo.openwrt.melmac.net containing support for this router.

PS. Please also make sure your PR/commits comply with formalities:

: === Checking commit 'c75dfd129ccd9928a2d73db6eeba7957f2900ea3'
: Author name (tiagofreire-pt) need to be your real name 'firstname lastname'
: Commit subject line MUST start with '<package name>: ' (Update xiaomi-ax9000.json)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com>')
: === Checking commit '47fe23fe31b13300f0da1335df4d3f8be8079300'
: Author name (tiagofreire-pt) need to be your real name 'firstname lastname'
: Commit subject line MUST start with '<package name>: ' (Create xiaomi-ax9000.json)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com>')

Done: https://github.com/stangri/source.openwrt.melmac.net/pull/171

I would appreciate your kind effort to compile this package for IPQ807x target.

1 Like

Thank you, your changes have been merged, the Xiaomi AX9000 is supported in luci-app-advanced-reboot 1.0.1-4 and later.

2 Likes

Where can I get version 1.0.1-4? Trying to install on my AX9000 but it's only showing 1.0.1-3