Possible corrupted standby firmware upgrade

n4cr2k
n4cr2k Posts: 8
My USG FLEX 700 prompted for a firmware upgrade.  The device hung while applying and I couldn't connect via HTTP/SSH/Console.  I had no choice but to power off.  The device came back up OK and no warnings or errors in the console start up.  I noticed this in the logs:
alert, system, Image recovery point, Firmware #2 is broken

The firmware management seems to show the new firmware in the standby slot:

Running
USG FLEX 700
V5.20(ABWD.0)
2022-01-04 18:44:15

Standby
USG FLEX 700
V5.21(ABWD.0)
2022-02-26 05:59:56


But subsequent tries to update the firmware via the web GUI result in the same hang of the system.  Even if I try to load the old 5.20 to standby via the Web manager results in a hang.

Any advice on next steps?
I saw the kb on firmware recovery and running this from console debug:
atkz –f –l 192.168.1.1

I can't find much documentation on atkz parameters, would atkz -f -2 192.168.1.1 be used to update the #2 firmware?

All Replies

  • Zyxel_Kevin
    Zyxel_Kevin Posts: 246
    Zyxel Certified Network Administrator - Security Zyxel Certified Sales Associate 5 Answers First Comment
     Master Member
    Hi @n4cr2k,
    Greeting Forum.
    Please perform "atcd 1" , change Boot number before "atkz -f -l 192.168.1.1"
    Next. You could upload image via FTP.  Please find the topic "Firmware Recovery" topic in HyperLink
    (https://download.zyxel.com/USG_FLEX_700/firmware/USG FLEX 700_5.21(ABWD.0)C0_2.pdf)

    Also more information,You could refer the following 
    https://community.zyxel.com/en/discussion/2632/how-to-recovery-database-when-it-is-broken
    Kevin



  • n4cr2k
    n4cr2k Posts: 8
    Thanks, I'll give that a try this weekend and report back.
  • n4cr2k
    n4cr2k Posts: 8
    Unfortunately that did not work.  Here are some snippets from the console.

    When I try to update the firmware:
    Firmware received ...<br>mount: /dev/mmcblk0 already mounted or db busy<br>Start to check file system...<br>/zyinit/e2fsck: Bad magic number in super-block while trying to open /dev/mmcblk0<br>/dev/mmcblk0:<br>The superblock could not be read or does not describe a correct ext2<br>filesystem.  If the device is valid and it really contains an ext2<br>filesystem (and not swap or ufs or something else), then the superblock<br>is corrupt, and you might try running e2fsck with an alternate superblock:<br>    e2fsck -b 8193 <device><br><br>/zyinit/e2fsck: Bad magic number in super-block while trying to open /dev/mmcblk0<br>/dev/mmcblk0:<br>The superblock could not be read or does not describe a correct ext2<br>filesystem.  If the device is valid and it really contains an ext2<br>filesystem (and not swap or ufs or something else), then the superblock<br>is corrupt, and you might try running e2fsck with an alternate superblock:<br>    e2fsck -b 8193 <device><br><br>Done<br><br>Building ...<br>mount: /dev/mmcblk0 already mounted or db busy<br>mount: /dev/mmcblk0 already mounted or rw busy<br><br>[Update Filesystem]<br>        Updating Code<br>        ..<br>        done<br>        clean_update_fw_db umount rw partition errno: Invalid argument<br>        Updating Code<br>        ..<br>        done<br>        clean_update_fw_db umount rw partition errno: Invalid argument<br>        Updating Code<br>        ..<br>        done<br>        clean_update_fw_db umount rw partition errno: Invalid argument<br>        Updating Code
    Then it just keeps looping.

    When I update the Database:

    Default System Database received ...<br>get kernel and code information...<br>mount: /dev/mmcblk0 already mounted or db busy<br>Start to check file system...<br>/zyinit/e2fsck: Bad magic number in super-block while trying to open /dev/mmcblk0<br>/dev/mmcblk0:<br>The superblock could not be read or does not describe a correct ext2<br>filesystem.  If the device is valid and it really contains an ext2<br>filesystem (and not swap or ufs or something else), then the superblock<br>is corrupt, and you might try running e2fsck with an alternate superblock:<br>    e2fsck -b 8193 <device><br><br>/zyinit/e2fsck: Bad magic number in super-block while trying to open /dev/mmcblk0<br>/dev/mmcblk0:<br>The superblock could not be read or does not describe a correct ext2<br>filesystem.  If the device is valid and it really contains an ext2<br>filesystem (and not swap or ufs or something else), then the superblock<br>is corrupt, and you might try running e2fsck with an alternate superblock:<br>    e2fsck -b 8193 <device><br><br>Done<br><br>Building ...<br>mount: /dev/mmcblk0 already mounted or db busy<br>mount: /dev/mmcblk0 already mounted or rw busy<br><br>[Update Filesystem]<br>        Updating Database<br>        ./<br>        done<br>mv: tmp/__XXXX__backup/etc/zyxel/ftp/conf/system-default.conf: file not found<br>        clean_update_fw_db umount db partition errno: Invalid argument<br>rw/compress.img: No such file or directory<br>Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
    The each core:
    *** NMI Watchdog interrupt on Core 0x00 ***<br>        $0      0x0000000000000000      at      0x0000000014009ce0<br>        v0      0xffffffff80e48018      v1      0x0000000000000001<br>        a0      0xfffffffffffffffe      a1      0x0000000000000000<br>        a2      0xffffffff80db0000      a3      0x8000000027f20e50<br>        a4      0x8000000027f20e50      a5      0x800000040ed64980<br>        a6      0x0000000000000000      a7      0x0000000000000000<br>        t0      0x0000000014009ce0      t1      0x000000001000001f<br>        t2      0x000000006c999659      t3      0x800000040ecb0000<br>        s0      0x8000000027f20e50      s1      0x0000000000000001<br>        s2      0xffffffff80da5338      s3      0xffffffff80e20600<br>        s4      0xffffffff8086c560      s5      0x000000000000007a<br>        s6      0x0000000000000000      s7      0xffffffff80800000<br>        t8      0x0000000000000007      t9      0xffffffff8086df98<br>        k0      0xffffffff80e17db0      k1      0xffffffff80e17db0<br>        gp      0xffffffff80e14000      sp      0xffffffff80e17af0<br>        s8      0xffffffff80da64a8      ra      0xffffffff80875434<br>        err_epc 0xffffffff80875438      epc     0xffffffff8086c560<br>        status  0x0000000014489ce4      cause   0x0000000040808400<br>*** Chip soft reset soon ***

    I was ultimately able to get the one working partition booted and restored a backup of my config.  It looks as if the filesystem is corrupted.  Are there any commands to repair or re-format the filesystem?  I have a fairly new config backup I can restore from.
  • Zyxel_Kevin
    Zyxel_Kevin Posts: 246
    Zyxel Certified Network Administrator - Security Zyxel Certified Sales Associate 5 Answers First Comment
     Master Member
    Hi @n4cr2k,
    Thank you,Could we arrange remote session ? 
    Please find the Private Message. 
    Kevin

Security Highlight