Zyxel NAS542 can't boot

Options
Hello all,

I have from a friend one Zyxel NAS542 which can't boot OS after a OMV installation on it.


After I connect a serial this is the boot load:


uloader 2011.06.0 (May 20 2014 - 16:36:41)

Board: Mindspeed C2000
c2k_spi_probe

Copying Barebox from SPI Flash(bootopt=0)
BB Copying Done
## Starting Barebox at 0x01000000 ...


barebox 2011.06.0-svn44305-dirty6 (Aug 28 2014 - 22:25:22)

Board: Mindspeed C2000
c2k_spi_probe
c2k_otp_probe.
cbus_baseaddr: 9c000000, ddr_baseaddr: 03800000, ddr_phys_baseaddr: 03800000
class init complete
tmu init complete
bmu1 init: done
bmu2 init: done
util init complete
GPI1 init complete
GPI2 init complete
HGPI init complete
HIF rx desc: base_va: 03e80000, base_pa: 03e80000
HIF tx desc: base_va: 03e80400, base_pa: 03e80400
HIF init complete
bmu1 enabled
bmu2 enabled
pfe_hw_init: done
pfe_firmware_init
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: class firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: tmu firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 14
pfe_firmware_init: util firmware loaded
eth_port: 0
NAS540_phy_reg_setting[eth_port].phyaddr: 0x4
miidev_restart_aneg for PHY4
eth_port: 1
NAS540_phy_reg_setting[eth_port].phyaddr: 0x6
miidev_restart_aneg for PHY6
cfi_probe: cfi_flash base: 0xc0000000 size: 0x04000000
## Unknown FLASH on Bank at 0xc0000000 - Size = 0x00000000 = 0 MB
bootopt = 0x0
Using ENV from SPI Flash.
nand_probe: comcerto_nand base: 0xc8300000 size: 0x256 MB
NAND device: Manufacturer ID: 0x98, Chip ID: 0xda (Toshiba NAND 256MiB 3,3V 8-bit), page size: 2048, OOB size: 64
Using default values
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad eraseblock 1536 at 0x0c000000
Bad eraseblock 1537 at 0x0c020000
Bad block table written to 0x0ffe0000, version 0x01
Bad block table written to 0x0ffc0000, version 0x01
Malloc space: 0x00600000 -> 0x01000000 (size 10 MB)
Stack space : 0x005f8000 -> 0x00600000 (size 32 kB)
running /env/bin/init...
Unknown command 'export' - try 'help'
Disabling eee function of phy 4 ...
Disabling eee function of phy 6 ...

Hit any key to stop autoboot:  1
booting kernel of type uimage from /dev/nand0.kernel1.bb
Bad Magic Number
 Failed.
booting kernel of type uimage from /dev/nand0.kernel2.bb
Bad Magic Number
warning: No MAC address set. Using random address 26:DE:4B:C3:E1:58
T T T T T T T host 192.168.1.70 is alive

erasing partition /dev/nand0.kernel1.bb


flashing uImage_MFG to /dev/nand0.kernel1.bb

TFTP from server 192.168.1.70 ('uImage_MFG' -> '/dev/nand0.kernel1.bb')

tftp failed: No such file or directory

!!!Probable use of old NAND layout.!!!
Use erase_old_nand_fmt command to clean NAND.



Any ideas what to do in this situation. I have try to load the uImage.520ABAG1C0.bin and that is the result...



Here you are the printenv:

Barebox-C2K >/ printenv
locals:
PATH=/env/bin
kernel_loc=nand
rootfs_loc=nand
uloaderimage=microloader-c2kevm.bin
bareboximage=barebox-c2kevm.bin
mfg_kernel_img=uImage_MFG
mfg_rootfs_img=rootfs_ubi.img_MFG
rootfs_type=ubifs
rootfsimage=root.ubifs-128k
kernelimage_type=uimage
kernelimage=uImage
spi_parts=256k(uloader)ro,512k(barebox)ro,256k(env)
spi_device=spi0.0
nand_device=comcertonand
nand_parts=10M(config),10M(kernel1),110M(rootfs1),10M(kernel2),110M(rootfs2),-(reserved)
rootfs_mtdblock_nand=2
autoboot_timeout=3
usb3_internal_clk=yes
bootargs=console=ttyS0,115200n8, init=/etc/preinit pcie_gen1_only=yes  mac_addr=,,
next_bootfrom=1
curr_bootfrom=1
kernel_mtd_1=4
sysimg_mtd_1=5
kernel_mtd_2=6
sysimg_mtd_2=7
MODEL_ID=B403
fwversion_1=V5.21(ABAG.5)
revision_1=51181
modelid_1=B403
core_checksum_1=8656509367ee12a59840ba4883163966
zld_checksum_1=7fb4eade4aaac0bb78d61939f4c8ae7a
romfile_checksum_1=FB1A
img_checksum_1=cac0e147f330acfced6fe7db4c3d7425
fwversion_2=V5.21(ABAG.5)
revision_2=51181
modelid_2=B403
core_checksum_2=8656509367ee12a59840ba4883163966
zld_checksum_2=7fb4eade4aaac0bb78d61939f4c8ae7a
romfile_checksum_2=FB1A
img_checksum_2=cac0e147f330acfced6fe7db4c3d7425
ethaddr=98:0D:67:E4:9B:AC
eth2addr=98:0D:67:E4:9B:AD
mcu_lock=1
serial_number=S190Z51000075
change_boot_part=0
globals:


Any ideas what to do in this situation. I have try to load the uImage.520ABAG1C0.bin and that is the result...


Thank you and regards.








All Replies

  • Mijzelf
    Mijzelf Posts: 2,638  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    Here we go again. There are a handful of threads in this forum about this problem. When I remember well some people succeeded in repairing their firmware. Use the search function. Keywords barebox omv bootloop tftp
  • InfinityBG
    InfinityBG Posts: 3
    First Comment
    edited December 2022
    Options
    Thank you Mijzelf

    Have read a lot info but stuck whit the upgradekey and the last firmware which I download from Zyxel this version V5.21(AATB.9)C0 from here  https://www.zyxel.com/global/en/support/download?model=NAS540

    Here is the output from log:

    + 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: OK
    + [ 0 -ne 0 ]
    + /sbin/setLED SYS ORANGE BLINK
    led_state_map_addr = 40b
    + sleep 1
    + mkdir -p /mnt/partnerkey/buffer
    + /sbin/bin2ram little /mnt/partnerkey/nas5xx_fw/ras.bin /mnt/partnerkey/buffer/tlv.bin
    + [ 4 -ne 4 ]
    + sync
    + sleep 1
    + cd /mnt/partnerkey/buffer
    + /sbin/fw_unpack -C . -i ./tlv.bin
    + [ 0 -ne 0 ]
    + sync
    + sync
    + ls /mnt/partnerkey/buffer
    DATA_0000
    DATA_0001
    DATA_0002
    DATA_0101
    DATA_0200
    DATA_0201
    DATA_0202
    DATA_0203
    DATA_0204
    DATA_1000
    DATA_1004
    DATA_a000
    DATA_a002
    tlv.bin
    + sleep 10
    + /bin/rm -f /mnt/partnerkey/buffer/tlv.bin
    + [ -s /mnt/partnerkey/buffer/DATA_0101 ]
    + /firmware/sbin/mrd_model -p
    + board_model=B403
    + cat /mnt/partnerkey/buffer/DATA_0101
    + file_model=B103
    + echo -n board_model=(B403), file_model=(B103) ...
    board_model=(B403), file_model=(B103) ... + [ xB403 == xB103 ]
    + echo NOT equal! /firmware/sbin/mrd_model -s B103
    NOT equal! /firmware/sbin/mrd_model -s B103
    + error_exit
    + setLED SYS RED BLINK
    led_state_map_addr = 409
    + setLED HDD1 RED BLINK
    led_state_map_addr = 9
    + setLED HDD2 RED BLINK
    led_state_map_addr = 109
    + setLED HDD3 RED BLINK
    led_state_map_addr = 209
    + setLED HDD4 RED BLINK
    led_state_map_addr = 309
    + setLED COPY RED BLINK
    led_state_map_addr = 509
    + /bin/sync


    The NAS is exact 542 model as it is written on the label. So I have tried only .bin files for NAS542. As I know 542 and 540 are the same so in the Zyxel site the support web page just download the last firmware. No luck whit it...and not sure why. II know this image works on this NAS because it was whit it before a month. The MD5 check sum I have made from here https://appdevtools.com/checksum-calculator then replace it from in the file. Use Notepad++ not sure if this helps for proper copy and paste.

    Just found this topic and as you mention it is needed to change the u-boot environment:

    Then "For the u-boot environment you'll have to set the right board id. You read the environment using /firmware/sbin/info_printenv, and use /firmware/sbin/info_setenv (info_setenv <name> <value>) to change it." Is it possible to install u-boot whit the update key USB? If I use this http://zyxel.diskstation.eu/Users/Mijzelf/NAS/542/uImage.520ABAG1C0.bin would it work?
     
    Regards and thanks for help!













  • Mijzelf
    Mijzelf Posts: 2,638  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    Nah, you don't have to change your environment, just feed it the right firmware file. Although the 540 and 542 are identical, their firmware isn't. As far as I know it's perfectly possible that the board ID is the only difference, but that is where the rescue stick is complaining about. You can find the 542 firmware at ftp://ftp2.zyxel.com/NAS542/firmware/. You'll need an FTP client, as all modern browsers have dropped the FTP protocol. (And don't ask me why there is no https://www.zyxel.com/global/en/support/download?model=NAS542).


Consumer Product Help Center