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

Thanks, PR sent.

Thanks to @jeff, Linksys EA8300 is supported from version 41 forward. Currently available in my repo, I'll submit the PR within a few days.

I have a linksys1900ac which has dual partition. I mean, say if I booted to the second partition and I need to get back to the first? How to check the second partition for firmware version? Stock or something?

All information I can technically gather is displayed in the Web page.

Hi,

I set up a new EA3500, and it seems I have been booting from the old firmware (it flashed the update, but kept booting the old partition).

Before I force it to the new image ... is there a way to access it, copy the settings over (at least network / IP config, so I can access it after the boot ... LOL)?

Thanks!

1 Like

Version luci-app-advanced-reboot (git-19.298.27206-176cbe1-42) available from my repo displays better Firmware information on NAND devices.

I'd appreciate testing on different devices (post which device you have tested on) before I submit the PR.

1 Like

Hi

I have been trying to install your package to my Linksys EA6350v3 but it doesn't seem to want to install your version and instead installs one from the official repo's which is broken.

Failed to execute call dispatcher target for entry '/admin/system/advanced_reboot/alternative_reboot'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:74: Failed to load template 'admin_system/applyreboot'.
Error while parsing template '/usr/lib/lua/luci/view/admin_system/applyreboot.htm':
No such file or directory
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:74: in function '__init__'
	/usr/lib/lua/luci/util.lua:65: in function 'Template'
	/usr/lib/lua/luci/template.lua:27: in function 'render'
	/usr/lib/lua/luci/controller/advanced_reboot.lua:243: in function </usr/lib/lua/luci/controller/advanced_reboot.lua:180>
	(tail call): ?

I download the file https://github.com/stangri/openwrt-repo/raw/master/luci-app-advanced-reboot_git-19.318.51734-c1f41f2-43_all.ipk and then uploaded the file through LuCI > System > Software > Upload Package button.

Below is the outcome of uploading the .ipk file

Installing luci-app-advanced-reboot (git-19.318.51734-c1f41f2-43) to root...
Installing luci-compat (git-19.321.42832-5273c85-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/luci/luci-compat_git-19.321.42832-5273c85-1_all.ipk
Configuring luci-compat.
Configuring luci-app-advanced-reboot.

Any ideas?

Many thanks

Will

UPDATE
I have used wget to download the package into /tmp directory and then used the forced-downgrade flag

[code]
opkg install wget
cd /tmp
wget https://github.com/stangri/openwrt-repo/raw/master/luci-app-advanced-reboot_git-19.318.51734-c1f41f2-43_all.ipk
opkg install --force-downgrade luci-app-advanced-reboot_git-19.318.51734-c1f41f2-43_all.ipk

However, I still get the same result.

Thank you for the report, it's a known 19.07 issue, being discussed here.

Fixed in: PR 3331 and PR 3332.

1 Like

Thank you for applying the fix :smile:

Do I need to update the Makefile PKG_RELEASE value to 45?

I added

src/gz 'stangri_repo' https://raw.githubusercontent.com/stangri/openwrt-repo/master

to the target/imagebuilder/files/repositories file. Is there a command to download the latest files?

Do I need to building on master because I'm currently building from source with this command git checkout -b v19.07.0-rc1

Many thanks

README.

I'm building packages for my repo with the 19.07.0-rc1 SDK.

PS. Like 99% of the time, the code of this package in the OpenWrt repo is in sync with my repo. You can just build the official version. For example right now, the fix for 19.07.0 and master is already in the official repo. The currently open PRs are for the README update and the beautification of the system log. :wink:

1 Like

Thank you. I will compile and let you know the result. I'll be compiling both my WRT1900ACS and EA6350.

Hi Stangri,

I'm rather new to Linux, OpenWRT/LuCi and the dual boot option would be very helpful for me. I'm using an EA9500 router.
From CFE:
cat /tmp/sysinfo/board_name
linksys,panamera
cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00100000 00020000 "nvram"
mtd2: 00080000 00020000 "nvram"
mtd3: 01d00000 00020000 "firmware"
mtd4: 003fffe4 00020000 "linux"
mtd5: 01900000 00020000 "ubi"
mtd6: 06100000 00020000 "failsafe"

The rest of the information you might need can probably be found here:

It would be amazing if you could add support for the Linksys EA9500!

Thanks!

That's not quite how it works. You need to get it working manually (sysupgrade support and manual toggling from the shell) on your device first. Once that's sorted, you should have all the information necessary to help getting GUI support in luci-app-advanced reboot sorted - but the basic device support needs to be there first, done and tested by someone with the device on their desk.

1 Like

As far as I know, the dual-partition support for that device is not enabled in OpenWrt. My package is just a web ui for existing OpenWrt support.

Big update in version 48: I've moved all the supported devices from the code into pluggable files. I've tested on WRT3200ACM, but I would appreciate more testing, especially on the special-case devices, like WRT32X and ZyXEL.

Update is posted in my repo and you can also get it from https://dev.melmac.net/openwrt-repo/luci-app-advanced-reboot_git-19.365.69375-13f9718-48_all.ipk.

2 Likes

Thanks for the info. Shows how little I know :slight_smile: I wasn't aware of that.

Thank you, replied to PM.

I fully tested version:49 on the WRT32X and is working like in the WRT32000, no issues.

Fri Jan  3 10:35:09 2020 user.notice advanced-reboot: attempting to mount alternative partition (mtd8)
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.158586] ubi1: attaching mtd8
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.900234] ubi1: scanning is finished
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.908937] ubi1: attached mtd8 (name "rootfs2", size 120 MiB)
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.914819] ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.921722] ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.928554] ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.935580] ubi1: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.941610] ubi1: user volume: 2, internal volumes: 1, max. volumes count: 128
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.948876] ubi1: max/mean erase counter: 43/28, WL threshold: 4096, image sequence number: 1997026322
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.958247] ubi1: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 40
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.967554] ubi1: background thread "ubi_bgt1d" started, PID 8747
Fri Jan  3 10:35:09 2020 kern.info kernel: [  205.969910] block ubiblock1_0: created from ubi1:0(rootfs)
Fri Jan  3 10:35:09 2020 kern.notice kernel: [  205.993155] UBIFS (ubi1:1): background thread "ubifs_bgt1_1" started, PID 8763
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.152666] UBIFS (ubi1:1): UBIFS: mounted UBI device 1, volume 1, name "rootfs_data"
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.160540] UBIFS (ubi1:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.170502] UBIFS (ubi1:1): FS size: 99041280 bytes (94 MiB, 780 LEBs), journal size 4952064 bytes (4 MiB, 39 LEBs)
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.180989] UBIFS (ubi1:1): reserved for root: 4677964 bytes (4568 KiB)
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.187637] UBIFS (ubi1:1): media format: w4/r0 (latest is w5/r0), UUID D04C2E80-C814-4DE7-9C52-439D490031A4, small LPT model
Fri Jan  3 10:35:10 2020 user.notice advanced-reboot: attempting to unmount alternative partition (mtd8)
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.268932] UBIFS (ubi1:1): un-mount UBI device 1
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.273677] UBIFS (ubi1:1): background thread "ubifs_bgt1_1" stops
Fri Jan  3 10:35:10 2020 kern.info kernel: [  206.387017] block ubiblock1_0: released
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.393889] ubi1: detaching mtd8
Fri Jan  3 10:35:10 2020 kern.notice kernel: [  206.397803] ubi1: mtd8 is detached
2 Likes