Welcome! Log In Create A New Profile


NAS542 Bricked - boot loop

Posted by manticore 
NAS542 Bricked - boot loop
February 21, 2022 06:25AM

I was tempted to upload a new image from debian from http://seafile.servator.de/nas/zyxel/images/
after uploading to the SD card debian-nas-bullseye-21.214-armhf.img.gz the system started correctly.
In the next step I did a kernel upgrade to linux-image-3.2.102-1-nas5xx-armhf.zip and unfortunately it did not work properly.
As recommended before rebooting, I ran the rollback routine sudo / firmware / sbin / info_setenv next_bootfrom 1
Errors have occurred and the NAS has restarted.

He has fallen into a noose since then and I cannot save him.
I tried:
- universal_usb_key_func-2015-10-12
- NAS540_521AATB3C0_Upgradekey
- I connected the serial port but the kosola only shows "bushes" and the NAS restarts.

I am asking you for help and suggestions.

open | download - screen.jpg (316.8 KB)
Re: NAS542 Bricked - boot loop
February 21, 2022 04:42PM

I don't have this device, or any FreeScale CPU box, so cannot help you. Hope other who has this device can help.

Forum Wiki
bodhi's corner
Re: NAS542 Bricked - boot loop
February 22, 2022 04:31AM
Tanks bohdi,

So informative:

However, I changed the USB / TTL from PL2303 to CP2102 and it's beautiful. (Console works)
The logs show that it cannot load:

Hit any key to stop autoboot: 0
booting kernel of type uimage from /dev/nand0.kernel2.bb
Verifying Checksum ... Bad Data CRC
booting kernel of type uimage from /dev/nand0.kernel1.bb
ERROR: out of memory

I have both kernels damaged.

Now I'm thinking What next?
Re: NAS542 Bricked - boot loop
February 22, 2022 04:25PM

The boot log indicate that this is barebox bootloader (not u-boot). I don't know barebox, only have done some reading in the past. barebox is a fork of u-boot, the inner working is similar, but the user interface is different.

booting kernel of type uimage from /dev/nand0.kernel2.bb 
booting kernel of type uimage from /dev/nand0.kernel1.bb

I can only suggest: find a good image for the kernel and boot with tftp.

As the exact syntax how to do that, you need to find out from some barebox forum somewhere.

Forum Wiki
bodhi's corner
Re: NAS542 Bricked - boot loop
February 23, 2022 01:52AM

I break loop from the console and type bootm -n.
I was able to start debian by booting the kernel from the console with the parameter -n "bootm -n /dev/nand0.kernel1.bb"

I turned it into an env:
# boot partition
next_bootfrom = "2"
curr_bootfrom = "1"
and everything worked fine.

Then I did a trick and made a kernel update from the previously working system on the SD card.
Thanks to this, I now have two working kernels in NAND. (nand0.kernel1 and nand0.kernel2).
Currently I have curr_bootfrom = "2".

Little note: "Most even professional devices have duplicate boot systems. In our case, there are two kernels and rootfs in different memory areas. This is a security measure, if the modification did not work, you can roll back, as long as you don't panic and do it correctly. "

Maybe someone will find it useful to know:

In NAS540-542, after connecting the console via RS232 / TTL and turning on the power, we will see the bootloader start.
We can stop it "Hit any key to stop autoboot: 3 sec"
And see or edit env config with edit /env/config (we exit with CTRL + D)

Thank you Bodhi for Your support

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.