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

I've created a small package which adds an Advanced Reboot page under System which displays currently booted partition and provides buttons to reboot to current or alternative partitions as well as to power off your router.

This is just a WebUI wrapper for the already existing dual-booting functionality in OpenWrt. If your router is currently lacking ability to boot from either partition with the OpenWrt tools, this package cannot be made compatible with your router.

List of supported routers, installation instructions and additional information is available in the README.

This package is now in the official OpenWrt repo from version 17.01.x and up (thank you @hnyman)!

12 Likes

Looking quickly to the source code in the .ipk, I failed to immediately find out how your code evaluates that it is running in a wrt1x00acx series (or otherwise compatible) device, so that the "nandboot" command and "boot_part" things are valid and it makes sense to display the button to the user.

A separate Luci app (and a new item in the System menu after Reboot) for the functionality would be more logical than trying to cram it into the existing flash/reset page.

That approach would more easily enable adding that package only to the compatible routers.

There should also be a confirmation query about the boot switch before the setting is toggled. It is much too large change to be done with a single button press / menu item selection.

I have those in my R7800 / ipq806x device... They are just generic u-boot env reading/writing tools. They prove nothing. (my device does not have dual partitions.)

You will likely need to look into the proper board info files that are populated during the boot:

root@LEDE:~# cat /tmp/sysinfo/board_name
r7800
root@LEDE:~# cat /tmp/sysinfo/model
Netgear Nighthawk X4S R7800
root@LEDE:~# head -n 5 /etc/board.json
{
        "model": {
                "id": "r7800",
                "name": "Netgear Nighthawk X4S R7800"
        },

(I don't have my WRT3200ACM on right now, so I can't verify how the files look there.)

I see the boot partition switch functionality as a so serious action, that user should not be able to select it by just an accident. There needs to be at least a confirmation.

And as the boot commands and partition names will vary from device to device, you need to make sure that you are on a compatible device before making changes there.

From long-term maintenance perspective, it is more sensible to have this a separate add-on app that can be selected and installed to compatible devices, than a default Luci functionality in all devices.

That will totally depend on how the OEM has originally designed the u-boot env usage. E.g. for R7800 fw_printenv always returns an error.

But for some single-partition devices there is meaningful content in u-boot env, so the usage varies a lot.

I find the app quite useful, but you need to be careful with it. It is far too dangerous for novice users to be presented casually for everybody.

Support for each router needs to be added separately to decrease the risk of bricking the device. For example, some device uses boot_part values "0" and "1". So when you detect "1" there, it would be wrong to change that to "2".


Out of my head, some ideas for developing to a really nice package:

A page that tells the user which firmware is installed in which partition and offers the possibility to switch to the other partition.

  • detect the device. e.g. using /tmp/sysinfo/board_name
  • based on that detection, look for available firmwares on part1 and part2 using the correct mtd partitions:
    • e.g. in wrt3200acm:
      dd if=/dev/mtd5 bs=1 skip=32 count=25
      (25 chars should be enough for LEDE, Openwrt and Linksys ID strings. It seems to always be a properly 0-terminated string)

      • mtd5 offset 32: "ARM LEDE Linux 4.9.20" = LEDE firmware
      • mtd7 offset 32: "Linksys WRT3200 Router" = Linksys OEM firmware
      • (Openwrt would be "ARM Openwrt Linux 4.4.44" if I remember right)
    • based on wiki, for wrt1900acs that would be mtd4 and mtd6

    • for EA8500, mtd13 and mtd15, etc.

  • Display that detection result to the user and also tell him which partition we are currently running (based on boot_part).
  • Offer the possibility to switch boot to the other partition.
    • Also mention that the other partition will boot with the config settings currently on that partition, not the ones used by the current partition. That will be unclear for novice users, as it is not self-evident.
  • If yes, then use the known parameters to set the needed u-boot env variables.

Package needs to contain a list of supported router and their parameters. Something like

device, part1, part2, offset, env_var_1, value_1_1, value_2_2, env_var_2, value_2_1, value_2_2
-----
wrt23200acm, mtd5, mtd7, 32, boot_part, 1, 2, bootcmd, "run nandboot", "run altnandboot"
wrt1900acs, mtd4, mtd6, 32, boot_part, 1, 2, bootcmd, "run nandboot", "run altnandboot"
EA8500, mtd13, mtd15, ...
4 Likes

this is very cool, too bad it wasn't the weekend! Will try it asap, but my work week has "erupted".....

Can we just add a url to the software package feeds?

I'm slowly working on implementing @hnyman's wish-list (for now, still as luci-mod-altreboot which modifies the default reboot page, but that will change in the future).

I've addressed the following:

  1. Only display alt reboot for supported routers.
  2. Display partitions of the router and highlight currently active partition.
  3. Indicate the "other" partition number in the button.

For now, only wrt3200acm, wrt1900acs and ea8500 are supported. I would appreciate help gathering other router model names which have dual partitions. If you have a dual partition router which isn't listed above, please post the output of cat /tmp/sysinfo/board_name. If you can also post the relevant mtd/offset information for your router and wherever it requires setting bootcmd variable, it'd save me some time as well.

New build (luci-mod-alt-reboot_git-17.080.69173-773734e27-2_all.ipk) is in the repo, follow first post instructions to install/update it.

1 Like

If I understood your question -- yes, since this package has no dependencies, you can install the ipk-file directly from URL with opkg. If you add my repo to your router, upgrades are easier in the future tho. Also, since github is HTTPS-only, you'd have to install additional packages to your router anyways, so it's better to use instructions on adding my repo.

Does not work for 3200 with LEDE master. I first thought that it was due to a typo "23200" in the device name in your reboot.htm. (seems that I have originally done that typo in my example above :frowning: ):

devices = {
{"wrt23200acm", "mtd5", "mtd7", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"},

But even editing that to 3200 did not help. Then I looked more closely to the board detection and noticed that the mvebu routers seem to place a more technical name to the board_name file: "armada-385-linksys-rango" instead of "wrt3200acm"

root@router2:/tmp# cat /tmp/sysinfo/board_name
armada-385-linksys-rango

That is apparently by design. The codes for mvebu routers are defined here: https://github.com/lede-project/source/blob/master/target/linux/mvebu/base-files/lib/mvebu.sh

After editing the expected router name to "armada-385-linksys-rango" in reboot.htm, the app shows the info nicely and reboots properly to the other partition.

1 Like

Thank you, I've silently updated the ipk with your fix for wrt3200acm.

1 Like

You should likely fix also wrt1900acs as that has likely quite similarly the longer code from the board detection script that I linked.

Without having an access to one -- where can I check the board_name file is for different devices? I'm not very familiar with how device-specific customizations are set during the build process, so would appreciate if you tell me which directory/file to look at on github. :wink:

The board_name is usually set at run time, during boot process. Typically a board detect function in target's base-files, likely in /lib

I gave you above a link to the respective script file for mvebu. It shows how the value gets into /tmp/sysinfo...

For ea8500 in ipq806x target the similar functionality is in https://github.com/lede-project/source/blob/master/target/linux/ipq806x/base-files/lib/ipq806x.sh

I own an old Cisco E4200V2 with dual partitions, I will report back when I have time with the information you need stangri. That is one interesting feature you're implementing.

Especially true if you go back to a stock firmware on another partition, which would require flashing LEDE again to go back (unless using the power trick or serial). If configuration backup was not done before, would the settings be lost then ? If so a warning about making a backup of the settings would be a good thing.

@hnyman -- sorry, didn't check out the link before. I'm in the process of creating a README and updating the ipk with support for more routers.

@DjiPi -- I've checked https://wiki.openwrt.org/toh/linksys/ea4500 and got the board_info from sources, but I'm not sure I have enough information (or looked hard enough at wiki). To add proper support I need the partition names (similar to https://wiki.openwrt.org/toh/linksys/wrt_ac_series#flash_storage_layout), offset to read the firmware information and the command(s) and parameters to switch boot from one partition to another.

EDIT: My guess for an entry:

{"linksys-viper", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}

This is the output for E4200v2:

root@LEDE:~# cat /tmp/sysinfo/board_name
linksys-viper
root@LEDE:~# cat /tmp/sysinfo/model
Linksys E4200v2 / EA4500

mtd3 and mtd5:

root@LEDE:~# dd if=/dev/mtd3ro bs=1 skip=32 count=25
ARM LEDE Linux-4.4.61 <== That's LEDE
25+0 records in
25+0 records out
root@LEDE:~# dd if=/dev/mtd5ro bs=1 skip=32 count=25
Linux-2.6.35.8 <== That's Cisco's firmware
25+0 records in
25+0 records out

fw_printenv (Click here to show)

root@LEDE:~# fw_printenv
bootdelay=0
baudrate=115200
loads_echo=0
ipaddr=192.168.1.10
serverip=192.168.1.254
rootpath=/mnt/ARM_FS
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200
badcount=0
bootbadcount=0
uenvbadcount=0
senvbadcount=0
buffbadcount=0
fs_bootargs=unused
mtdparts=mtdparts=nand_mtd:512k(uboot)ro,128k@512k(u_env),128k@640k(s_env),26m@2m(kernel),26m@2m(rootfs)fs,26m@28m(alt_kernel),26m@28m(alt_rootfs)fs,74m@54m(syscfg)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
fs_bootargs_root=root=/dev/mtdblock4 ro rootfstype=jffs2
alt_fs_bootargs_root=root=/dev/mtdblock6 ro rootfstype=jffs2
usb_fs_bootargs_root=root=/dev/sda1 rw rootfstype=ext2
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
nandboot=nand read.e 0x2000000 0x200000 0x300000; setenv bootargs $(console) $(mtdparts) $(fs_bootargs_root) serial_number=$(sn) uuid=$(uuid) hw_version=$(hw) device_mac=$(mac) factory_date=$(date) wps_pin=$(wps); bootm 0x2000000;
altnandboot=nand read.e 0x2000000 0x1c00000 0x300000; setenv bootargs $(console) $(mtdparts) $(alt_fs_bootargs_root) serial_number=$(sn) uuid=$(uuid) hw_version=$(hw) device_mac=$(mac) factory_date=$(date) wps_pin=$(wps); bootm 0x2000000;
usbboot=usb start;ext2load usb 0:1 2000000 /uImage; setenv bootargs $(console) $(mtdparts) $(usb_fs_bootargs_root) rootdelay=10; bootm 0x2000000;
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:xx:xx:xx:xx:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:xx:xx:xx:xx:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
mtdparts_version=4
envsaved=yes
ethact=egiga0
mfgboot=nand read.e 0x2000000 0x3600000 0x300000; setenv bootargs $(console) $(mfg_mtdparts) $(mfg_fs_bootargs_root) serial_number=$(sn) uuid=$(uuid) hw_version=$(hw) device_mac=$(mac) factory_date=$(date) wps_pin=$(wps); bootm 0x2000000;
mfg_fs_bootargs_root=root=/dev/mtdblock8 ro rootfstype=jffs2
mfg_mtdparts=mtdparts=nand_mtd:512k(uboot)ro,128k@512k(u_env),128k@640k(s_env),26m@2m(kernel),26m@2m(rootfs)fs,26m@28m(alt_kernel),26m@28m(alt_rootfs)fs,26m@54m(mfg_kernel),26m@54m(mfg_rootfs)fs,48m@80m(syscfg)
nfsboot=tftp 0x2000000 uImage; setenv bootargs $(console) $(mfg_mtdparts) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
auto_recovery=yes
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
layout=ver.0.0.7
model=E4200
hw=RGWM-C4_0GA
edal_key=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
mac=C8:D7:xx:xx:xx:D9
ethaddr=C8:D7:xx:xx:xx:D9
eth1addr=C8:D7:xx:xx:xx:DA
date=2012/08/29
sn=01C156xxxxxxxx
uuid=BCFE353BA0362D18D373FB2CAB5A2C34
wps=xxxxxxxxx
boot_part_ready=3
boot_part=1
bootcmd=run nandboot

Bootlog (click here to show)

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.4.61 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3103-1b51a49) ) #0 Sat Apr 15 16:13:45 2017
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine model: Linksys E4200v2 / EA4500
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] free_area_init_node: node 0, pgdat c04db73c, node_mem_map c7efa000
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:512k(uboot)ro,128k@512k(u_env),128k@640k(s_env),26m@2m(kernel),26m@2m(rootfs)fs,26m@28m(alt_kernel),26m@28m(alt_rootfs)fs,74m@54m(syscfg) root=/dev/mtdblock4 ro rootfstype=jffs2 serial_number=01C1560xxxxxxx uuid=BCFE353BA0362D18D373FB2CAB5A2C34 hw_version=RGWM-C4_0GA device_mac=C8:xx:xx:xx:xx:D9 factory_date=2012/08/29 wps_pin=xxxxxxxx
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 124548K/131072K available (4078K kernel code, 142K rwdata, 652K rodata, 180K init, 201K bss, 6524K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc04a6db4 (4732 kB)
[ 0.000000] .init : 0xc04a7000 - 0xc04d4000 ( 180 kB)
[ 0.000000] .data : 0xc04d4000 - 0xc04f7ac8 ( 143 kB)
[ 0.000000] .bss : 0xc04f7ac8 - 0xc052a19c ( 202 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.000082] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
[ 0.090081] pid_max: default: 32768 minimum: 301
[ 0.090187] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090207] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090745] CPU: Testing write buffer coherency: ok
[ 0.091068] Setting up static identity map for 0x81e0 - 0x821c
[ 0.091310] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[ 0.096228] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.096257] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.096330] pinctrl core: initialized pinctrl subsystem
[ 0.097338] NET: Registered protocol family 16
[ 0.097773] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.098458] cpuidle: using governor ladder
[ 0.098880] Feroceon L2: Enabling L2
[ 0.098922] Feroceon L2: Cache support initialised.
[ 0.099179] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[ 0.099276] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[ 0.116794] SCSI subsystem initialized
[ 0.117199] libata version 3.00 loaded.
[ 0.117505] usbcore: registered new interface driver usbfs
[ 0.117586] usbcore: registered new interface driver hub
[ 0.117647] usbcore: registered new device driver usb
[ 0.118550] clocksource: Switched to clocksource orion_clocksource
[ 0.119419] NET: Registered protocol family 2
[ 0.120007] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.120032] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.120092] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.120147] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.120172] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.120317] NET: Registered protocol family 1
[ 0.120354] PCI: CLS 0 bytes, default 32
[ 0.122148] Crashlog allocated RAM at address 0x3f00000
[ 0.135681] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.135695] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.138312] io scheduler noop registered
[ 0.138325] io scheduler deadline registered (default)
[ 0.139509] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[ 0.140078] irq: Cannot allocate irq_descs @ IRQ31, assuming pre-allocated
[ 0.140425] irq: Cannot allocate irq_descs @ IRQ63, assuming pre-allocated
[ 0.141029] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[ 0.141047] pci_bus 0000:00: root bus resource [io 0x1000-0xfffff]
[ 0.141058] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 0.141070] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.141103] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[ 0.141351] pci 0000:00:02.0: [11ab:6282] type 01 class 0x060400
[ 0.141572] PCI: bus0: Fast back to back transfers disabled
[ 0.141587] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.141601] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.141743] pci 0000:01:00.0: [11ab:2a41] type 00 class 0x020000
[ 0.141799] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x9000ffff 64bit]
[ 0.141824] pci 0000:01:00.0: reg 0x18: [mem 0x90010000-0x9001ffff 64bit]
[ 0.142092] PCI: bus1: Fast back to back transfers disabled
[ 0.142108] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.142251] pci 0000:02:00.0: [11ab:2a42] type 00 class 0x020000
[ 0.142304] pci 0000:02:00.0: reg 0x10: [mem 0x98000000-0x9800ffff 64bit]
[ 0.142329] pci 0000:02:00.0: reg 0x18: [mem 0x98010000-0x9801ffff 64bit]
[ 0.142590] PCI: bus2: Fast back to back transfers disabled
[ 0.142605] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[ 0.142716] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[ 0.142733] pci 0000:00:02.0: BAR 8: assigned [mem 0xe0100000-0xe01fffff]
[ 0.142750] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe000ffff 64bit]
[ 0.142773] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0010000-0xe001ffff 64bit]
[ 0.142792] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 0.142806] pci 0000:00:01.0: bridge window [mem 0xe0000000-0xe00fffff]
[ 0.142824] pci 0000:02:00.0: BAR 0: assigned [mem 0xe0100000-0xe010ffff 64bit]
[ 0.142845] pci 0000:02:00.0: BAR 2: assigned [mem 0xe0110000-0xe011ffff 64bit]
[ 0.142864] pci 0000:00:02.0: PCI bridge to [bus 02]
[ 0.142876] pci 0000:00:02.0: bridge window [mem 0xe0100000-0xe01fffff]
[ 0.173305] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.176116] console [ttyS0] disabled
[ 0.176193] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[ 0.785829] console [ttyS0] enabled
[ 0.790744] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[ 0.797126] nand: Hynix H27U1G8F2BTR-BC
[ 0.801011] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.808633] Scanning device for bad blocks
[ 0.878873] mtd: bad character after partition (f)
[ 0.883706] 8 ofpart partitions found on MTD device orion_nand
[ 0.889583] Creating 8 MTD partitions on "orion_nand":
[ 0.894751] 0x000000000000-0x000000080000 : "u-boot"
[ 0.901436] 0x000000080000-0x0000000a0000 : "u_env"
[ 0.907428] 0x0000000a0000-0x0000000c0000 : "s_env"
[ 0.913433] 0x000000200000-0x000001c00000 : "kernel1"
[ 0.919647] 0x0000004a0000-0x000001c00000 : "ubi"
[ 0.925487] 0x000001c00000-0x000003600000 : "kernel2"
[ 0.931725] 0x000001ea0000-0x000003600000 : "rootfs2"
[ 0.937913] 0x000003600000-0x000008000000 : "syscfg"
[ 0.944588] libphy: orion_mdio_bus: probed
[ 0.948870] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[ 0.956958] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address c8:xx:xx:xx:xx:d9
[ 0.966301] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address c8:xx:xx:xx:xx:da
[ 0.975106] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.981675] ehci-pci: EHCI PCI platform driver
[ 0.986207] ehci-platform: EHCI generic platform driver
[ 0.991600] ehci-orion: EHCI orion driver
[ 0.995779] orion-ehci f1050000.ehci: EHCI Host Controller
[ 1.001336] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[ 1.009163] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[ 1.028574] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[ 1.035286] hub 1-0:1.0: USB hub found
[ 1.039266] hub 1-0:1.0: 1 port detected
[ 1.043619] usbcore: registered new interface driver usb-storage
[ 1.049867] i2c /dev entries driver
[ 1.054270] orion_wdt: Initial timeout 21 sec
[ 1.062314] marvell-cesa f1030000.crypto: CESA device successfully registered
[ 1.070509] NET: Registered protocol family 10
[ 1.076796] NET: Registered protocol family 17
[ 1.081340] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 1.094017] 8021q: 802.1Q VLAN Support v1.8
[ 1.100183] UBI: auto-attach mtd4
[ 1.103344] ubi0: attaching mtd4
[ 1.130963] ubi0: scanning is finished
[ 1.141286] ubi0: attached mtd4 (name "ubi", size 23 MiB)
[ 1.146712] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[ 1.153649] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[ 1.160390] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[ 1.167203] ubi0: good PEBs: 187, bad PEBs: 0, corrupted PEBs: 0
[ 1.173251] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[ 1.180516] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 376384446
[ 1.189609] ubi0: available PEBs: 0, total reserved PEBs: 187, PEBs reserved for bad PEB handling: 20
[ 1.199186] ubi0: background thread "ubi_bgt0d" started, PID 924
[ 1.205892] block ubiblock0_0: created from ubi0:0(rootfs)
[ 1.211435] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[ 1.219099] mvsw61xx 10.mvsw61xx: Found MV88E6171 at f1072004.mdio-bu:10
[ 1.225830] mvsw61xx 10.mvsw61xx: Using indirect addressing
[ 1.263720] hctosys: unable to open rtc device (rtc0)
[ 1.273513] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 1.281247] Freeing unused kernel memory: 180K (c04a7000 - c04d4000)
[ 1.801256] init: Console is alive
[ 1.804847] init: - watchdog -
[ 2.091555] init: - preinit -
[ 2.446222] random: jshn: uninitialized urandom read (4 bytes read, 9 bits of entropy available)
[ 2.516911] random: jshn: uninitialized urandom read (4 bytes read, 9 bits of entropy available)
[ 2.625354] random: jshn: uninitialized urandom read (4 bytes read, 9 bits of entropy available)
[ 2.659278] random: jshn: uninitialized urandom read (4 bytes read, 10 bits of entropy available)
[ 2.714567] random: jshn: uninitialized urandom read (4 bytes read, 10 bits of entropy available)
[ 2.983046] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 3.084140] random: procd: uninitialized urandom read (4 bytes read, 21 bits of entropy available)
[ 5.226769] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 993
[ 5.248217] UBIFS (ubi0:1): recovery needed
[ 5.345050] UBIFS (ubi0:1): recovery completed
[ 5.349619] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[ 5.357489] UBIFS (ubi0:1): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 5.367466] UBIFS (ubi0:1): FS size: 17418240 bytes (16 MiB, 135 LEBs), journal size 1032193 bytes (0 MiB, 7 LEBs)
[ 5.377871] UBIFS (ubi0:1): reserved for root: 822706 bytes (803 KiB)
[ 5.384354] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID CAC4CE20-8F6D-4E77-895F-DCE9BE9D0256, small LPT model
[ 5.398360] mount_root: switching to ubifs overlay
[ 5.407208] urandom-seed: Seeding with /etc/urandom.seed
[ 5.471213] procd: - early -
[ 5.474176] procd: - watchdog -
[ 6.296166] procd: - ubus -
[ 6.370334] random: ubusd: uninitialized urandom read (4 bytes read, 27 bits of entropy available)
[ 6.380139] random: ubusd: uninitialized urandom read (4 bytes read, 27 bits of entropy available)
[ 6.389467] random: ubusd: uninitialized urandom read (4 bytes read, 27 bits of entropy available)
[ 6.398511] random: ubusd: uninitialized urandom read (4 bytes read, 27 bits of entropy available)
[ 6.408596] procd: - init -
[ 6.634617] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 6.645835] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[ 6.653918] Backport generated by backports.git backports-20160324-13-g24da7d3c
[ 6.663168] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 6.672660] nf_conntrack version 0.5.0 (1948 buckets, 7792 max)
[ 6.696415] xt_time: kernel timezone is -0000
[ 6.725755] Marvell TOPDOG(R) 802.11 Wireless Network Driver version 0.13
[ 6.732646] pci 0000:00:01.0: enabling device (0140 -> 0142)
[ 7.425090] ieee80211 phy0: Command RF_ANTENNA error 0x2
[ 7.430463] ieee80211 phy0: failed to set # of RX antennas
[ 7.436011] ieee80211 phy0: Command RF_ANTENNA error 0x2
[ 7.441368] ieee80211 phy0: failed to set # of TX antennas
[ 7.446888] ieee80211 phy0: 88w8366 v48, xxxxxxxxxxxx, STA firmware 4.1.0.3
[ 7.456884] pci 0000:00:02.0: enabling device (0140 -> 0142)
[ 8.281953] ieee80211 phy1: Command RF_ANTENNA error 0x2
[ 8.287307] ieee80211 phy1: failed to set # of RX antennas
[ 8.292868] ieee80211 phy1: Command RF_ANTENNA error 0x2
[ 8.298207] ieee80211 phy1: failed to set # of TX antennas
[ 8.303739] ieee80211 phy1: 88w8366 v48, xxxxxxxxxxxx, STA firmware 4.1.0.3
[ 8.318030] PPP generic driver version 2.4.2
[ 8.332449] NET: Registered protocol family 24
[ 12.183407] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 12.205381] device eth0 entered promiscuous mode
[ 12.214135] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 12.256375] mv643xx_eth_port mv643xx_eth_port.1 eth1: link up, 1000 Mb/s, full duplex, flow control disabled
[ 13.178646] br-lan: port 1(eth0) entered forwarding state
[ 13.184138] br-lan: port 1(eth0) entered forwarding state
[ 13.197020] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 15.178559] br-lan: port 1(eth0) entered forwarding state
[ 42.862676] random: nonblocking pool is initialized

1 Like

Thank you @DjiPi (please let me know your GitHub username so I could list you in credits), support for Linksys E4200v2/EA4500 has been added in version git-17.080.69173-773734e27-4. If you have my repo added, you can upgrade with: opkg update; opkg upgrade luci-mod-alt-reboot.

Thank you very much for your work @stangri , I'll test on my E4200v2 soon. Me newly created Github is jpstyves.

On a side note, I always wanted to have a button to perform a clean Poweroff because I always felt bad just unplugging the poor thing drastically... I think that it could be a nice addition, and people that don't have dual-boot partitions would also have a reason to install your Web UI enhancement.

Great idea! Try luci-mod-alt-reboot git-17.080.69173-773734e27-5.