NAS 542 dead

Options
2

All Replies

  • Pandino84
    Pandino84 Posts: 14  Freshman Member
    First Anniversary
    Options
    yes.... new error....

    + FW_FILE=/mnt/partnerkey/nas5xx_fw/ras.bin
    + NANDPATH=/firmware/mnt/nand2
    + /firmware/sbin/info_printenv curr_bootfrom
    + awk -F= {print $2}
    + CURR_BOOTFROM=
    + [ -eq 1 ]
    sh: 1: unknown operand
    + [ -eq 2 ]
    sh: 2: unknown operand
    + echo ERROR!!! Invalid INFO value 'curr_bootfrom'!
    ERROR!!! Invalid INFO value 'curr_bootfrom'!
    + setLED SYS RED BLINK
    led_state_map_addr = 409
    + setLED HD RED BLINK
    Unknown LED
    Turn on LED
    Usage: setLED LED_NAME LED_COLOR LED_STATE
       LED_NAME: The name of LED. (HDD1, HDD2, HDD3, HDD4, SYS, COPY)
       LED_COLOR: LED color. (RED , GREEN)
       LED_STATE: ON, BLINK, FAST_BLINK, SLOW_BLINK
    ATTENTION: LED2 can only be red color

    Turn off LEDUseage: setLED LED_NAME OFF
       LED_NAME: The name of LED. (HDD1, HDD2, HDD3, HDD4, SYS, COPY)
       OFF : OFF
    + setLED COPY RED BLINK
    led_state_map_addr = 509
    + exit 1
  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    And that is the same device as the previous run? In that it looks like the internal flash is degrading fast. This box has a bootloader (barebox) in flash, and in another flash partition some database containing data needed by the bootloader, and some other stuff, like the device hardware ID, B203 in your case. The function /firmware/sbin/info_printenv reads that database and prints it to stdout.
    The first run of the script the variable curr_bootfrom was read, and it had a valid value 1. Further it read kernel_mtd_1, sysimg_mtd_1, kernel_mtd_2 and sysimg_mtd_2, which all had reasonable values. Then it extracted the firmware file to a ramdisk, read the board id from the same database (I think) and compared it to the target id of the firmware. That didn't match, and so it did nothing anymore. All the script did was reading from flash and usb, and writing to ram.

    The second run directly stopped because it cannot read curr_bootfrom. Which was available on the first run, and I *think* it was available on powerup. (The box has two kernels and initramfs. 'curr_bootfrom' tells the bootloader which to use. While updating the other one is overwritten, and when everything succeeded curr_bootfrom is overwritten. This way a bad flash should not be able to brick the box. (Providing the script detects the bad flash). Without curr_bootfrom I expect a bootloader panic, but maybe it has an emergency default)

    If you want to go further, you can download an 'universal usb_key_func' file, read the readme, enable the telnet daemon, login over telnet and execute 
    /firmware/sbin/info_printenv
    to see what is wrong.

  • Pandino84
    Pandino84 Posts: 14  Freshman Member
    First Anniversary
    Options
    i try thanks!

  • danialeko
    danialeko Posts: 1
    First Comment
    edited January 27
    Options

    Hi!

    After an unsuccessful upgrade to the latest firmware:https://support.zyxel.eu/hc/en-us/articles/360012939280-Upgrading-latest-NAS-remote-code-execution-vulnerability-firmware#article-comments last night, my NAS542 can't connect anymore to the PC.

    The firmware upgrade didn't finish. The NAS itself turns on, there are lights, and sounds are heard when reset.

    However, when I try to access it via the web or anywhere, it is not possible.

    e.g. the address was 192.168.1.108, when I type it goes to 192.168.1.108/r51277,/desktop,/index.html

    but the page never loads.

    https://findme.zyxel.com/discover_nas also can't detect the NAS, ipconfig in cmd as well.

    I tried Mijzelf's 'RescueStick' by adopting it to 542 (replacing ras.bin with some previous firmware.bin and got the error:

    • FW_FILE=/mnt/partnerkey/nas5xx_fw/ras.bin
    • NANDPATH=/firmware/mnt/nand2
    • /firmware/sbin/info_printenv curr_bootfrom
    • awk -F= {print $2}
    • CURR_BOOTFROM=2
    • [ 2 -eq 1 ]
    • [ 2 -eq 2 ]
    • NEXT_BOOTFROM=1
    • /firmware/sbin/info_printenv kernel_mtd_2
    • awk -F= {print $2}
    • CURR_KERNEL_MTD=6
    • /firmware/sbin/info_printenv sysimg_mtd_2
    • awk -F= {print $2}
    • CURR_IMG_MTD=7
    • /firmware/sbin/info_printenv kernel_mtd_1
    • awk -F= {print $2}
    • NEXT_KERNEL_MTD=4
    • /firmware/sbin/info_printenv sysimg_mtd_1
    • awk -F= {print $2}
    • NEXT_IMG_MTD=5
    • md5sum -c /mnt/partnerkey/nas5xx_fw/ras.bin.md5sum
      /mnt/partnerkey/nas5xx_fw/ras.bin: FAILED
      md5sum: WARNING: 1 of 1 computed checksums did NOT match
    • [ 1 -ne 0 ]
    • echo Key is corrupt
      Key is corrupt
    • exit 1

    What are my options? There were two HDDs on Raid 1, I tried to access the hard drive on the PC but can't, probably need some specialized software. Someone told me to buy the same NAS542 and plug the HDDs - is that going to work? If a firmware upgrade fails can crash the device, I definitely wouldn't buy another one… The warranty expired last year, pls don't tell me it will go to the trash :/

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    e.g. the address was 192.168.1.108, when I type it goes to

    192.168.1.108/r51277,/desktop,/index.html

    That can be a cached redirection. Every firmware has it's own /rXXXXX/. Try to clear your history.

  • paolucini
    paolucini Posts: 11  Freshman Member
    First Anniversary First Comment
    Options

    I'm a real noob, and my 542 has bricked after a failed firmware upgrade (ABAG13)…has been a my fault 'cause I haven't waited the finish of the process and clicked the 542 homepage link appeared at 99% of the upgrade process; now the NAS turns on but doesn't boot, stopping everything with all the lights steadily on. Now I'm trying to use the USB recovery stick; I've replaced the ras.bin file with the right one, but I don't know the meaning of this: "… and adapt some textfile to have the right md5 sum of the new ras.bin file…" Could you help to do the right thing? Thank You

    PL

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    It's about the file nas5xx_fw/ras.bin.md5sum, which contains something like

    f91fc0da90bcd4ab24f2950ff2abb8d0 /mnt/partnerkey/nas5xx_fw/ras.bin

    Here f91fc0da90bcd4ab24f2950ff2abb8d0 is the md5sum of ras.bin. So you'll have to exchange that part by the md5sum of your ras.bin. Google for a tool which can calculate that for you.

  • paolucini
    paolucini Posts: 11  Freshman Member
    First Anniversary First Comment
    Options

    I'll try… TY

  • paolucini
    paolucini Posts: 11  Freshman Member
    First Anniversary First Comment
    Options

    Neverending thanks Mijzelf….

    Now everything is in the right place…

    And I've learned a little…

  • TomasMalina
    TomasMalina Posts: 33  Freshman Member
    First Anniversary 10 Comments Friend Collector
    Options

    Just wanted to thank you Mijzelf for this thread as my NAS542 got almost bricked today by a failed firmware update (no LAN connection, no beep after startup). Using the 'RescueStick' you provided and swapping the 542 firmware from ftp2.zyxel.com resurrected it. Dank u wel!

Consumer Product Help Center