Welcome! Log In Create A New Profile

Advanced

Synology DJ216j NAS unbrick error

Posted by jean 
Synology DJ216j NAS unbrick error
January 14, 2020 12:01PM
Hallo, may I ask someone kind and willing which skilled enough to help me to unbrick my NAS which bricked due to the power outage during DSM update? I am able to connect through serial console (putty) and transfer zImage and rd.bin (tftpd32) into it but facing "no ATAGS support: can't continue" message after bootm... Synology assistant and hard factory reset are not working. Thanks in advance.



Edited 1 time(s). Last edit at 01/14/2020 12:48PM by jean.
Re: Synology DJ216j NAS unbrick error
January 14, 2020 12:16PM
jean,

From Synology website info, your box is DS216j.

DS216j	Marvell Armada 385 88F6820	Dual Core	2	Yes	Armada38x	DDR3 512 MB

It is same SoC as the Thecus N2350. So you can look in this installation thread:

https://forum.doozan.com/read.php?2,92234

Quote

NOTE1

1. To prepare for UART booting, use 2 SSH terminals. First one for running the download script, and the 2nd terminal for running a regular serial console which should be started immediately when "transfer complete" to interupt u-boot (the default countdown is only 3 seconds so there is not enough time to interupt u-boot if you wait too long).

2. The files necessary to run UART booting are in the new u-boot tarball thecus-n2350-Marvell-2015_T1.0p18-tld-4-bodhi.tar. Please see Step 2.c in the Installation Instruction steps.

3. Power down the N2350. Connect serial console on an ARM Linux box.


Basically you can load stock u-boot through serial console and execute it. The one used in the N2350 thread is in section 2c.

Quote

2.c. Download the new u-boot thecus-n2350-Marvell-2015_T1.0p18-tld-4 uboot tarball to rootfs /boot/uboot folder.

Quote

Download at Dropbox
thecus-n2350-Marvell-2015_T1.0p18-tld-4-bodhi.tar
md5sum
1a08b09b2e01824b47b525621fcc9944
sha256sum
8284087a4b3cde7db0b46e0942e985b7da6c52ccf65ee741fd4a2ceab5581ee9

So read that installation thread section NOTE 1, and download my N2350 u-boot build: thecus-n2350-Marvell-2015_T1.0p18-tld-4-bodhi.tar.

Post questions if you are not sure about how to proceed. If you can load and start this u-boot image, then it is unbricked.

UPDATE:

Note: you need to run the UART booting procdure from another Linux box (not Windows). And that Linux box it is not ARM based box, then I need to recompile, or post a slightly different script for you to run on Intel x86 box.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/14/2020 12:49PM by bodhi.
Re: Synology DJ216j NAS unbrick error
January 14, 2020 12:45PM
Thank You -bodhi for prompt reply, is there any way how to proceed using the legacy (original) kernel and ramdisk? There is .pat (.tar) file available from the vendor.
Re: Synology DJ216j NAS unbrick error
January 14, 2020 01:05PM
Hi jean,

It is possible to load stock FW through serial console. But the error indicated that your u-boot envs were probably corrupted because of the outage.

So I need to see stock u-boot envs to help you loading the FW. Look at Synology website, or google to find that.

To start, connect putty, power up and interrupt serial console at countdown, and

ver
printenv

and post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 14, 2020 01:22PM
Here it is.
Attachments:
open | download - ver_1.jpg (20.8 KB)
open | download - printenv.log (5.6 KB)
Re: Synology DJ216j NAS unbrick error
January 14, 2020 11:30PM
Jean,

Looks like the envs are ok! So only the kernel must have been corrupted.

So let me take a look at your tarball to see how we can load it. Is there instruction that comes with the tarball? Or Synology has it in the website?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 15, 2020 05:40AM
It is on the Synology ftp site https://archive.synology.com/download/, I only don't remember exactly what version was last functioning, guessing it was 6.1.5. BTW is there possibility that my "no ATAGS support" error is somehow related to the fact the loader is not provided with either any at all or correct MAC and S/N of my NAS? I also wonder what if I try to put older version of the FW than it was in, may this cause the problem?



Edited 1 time(s). Last edit at 01/15/2020 05:46AM by jean.
Re: Synology DJ216j NAS unbrick error
January 15, 2020 08:20AM
Jean,


> It is on the Synology ftp site
> https://archive.synology.com/download/, I only
> don't remember exactly what version was last
> functioning, guessing it was 6.1.5. BTW is there
> possibility that my "no ATAGS support" error is
> somehow related to the fact the loader is not
> provided with either any at all or correct MAC and
> S/N of my NAS?

No that is not related to MAC address or S/N.

That error is when the kernel expects an ATAG structure passed from uboot. Kernels that expects ATAG is of much older version. Modern kernels use Flatten Device Tree (FDT) and expects a DTB file.

> I also wonder what if I try to put
> older version of the FW than it was in, may this
> cause the problem?

That's quite likely.

During upgrade, probably some uboot envs (or uboot itself) have been changed to boot the FW with new kernel with DTB. But the kernel image is old so it expects ATAG.

Since the envs seem sane, you could try to FW reset with the latest rescue FW, see if it woks. And try with each older restore FW version before and including 6.1.5.

When I have some free time I can look at the tarball.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 15, 2020 09:44AM
Thank You for the explanation and willingness. Would You pls ensure me lookin into my printenv that loading zImage to the 0x2000000 and rd.bin to 0x2880000 is correct procedure?
Re: Synology DJ216j NAS unbrick error
January 15, 2020 12:39PM
Jean,

Quote

Would You pls ensure me lookin into my printenv that loading zImage to the 0x2000000 and rd.bin to 0x2880000 is correct procedure?

That do not look right. Your envs do not use zImage. The bootcmd uses uImage.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 15, 2020 12:55PM
I tried almost all FWs available to no luck. Same error always... :-/ I used bootm. So should I use bootz instead? And mem addresses I put it in are correct? Bootz returns "Bad Linux ARM zImage magic! error"...



Edited 3 time(s). Last edit at 01/15/2020 01:25PM by jean.
Re: Synology DJ216j NAS unbrick error
January 15, 2020 11:27PM
Jean,

Please post the link to Synology tarball and instruction page.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 16, 2020 03:30AM
FW 6.1.5. source is here:
https://archive.synology.com/download/DSM/release/6.1.5/15254/DSM_DS216j_15254.pat
https://archive.synology.com/download/DSM/release/6.1.5/15254/DSM_DS216j_15254.pat.md5
As for the instruction page, I couldn't find any instructions about installing FW using the serial console, Synology has dedicated app, which is able to work only if ethernet port is fully established on the NAS.
Re: Synology DJ216j NAS unbrick error
January 16, 2020 06:27AM
I wonder if ATAGS is not required because FDT (DTB) missing or corrupted? I tried to use fdt addr but when running fdt header after, putty got stuck.
Re: Synology DJ216j NAS unbrick error
January 16, 2020 08:07AM
jean,

> As for the instruction page, I couldn't find any
> instructions about installing FW using the serial
> console, Synology has dedicated app, which is able
> to work only if ethernet port is fully established
> on the NAS.

If you have a log of what you did to attemp the recovery, please post here. If not, try again and capture the log.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DJ216j NAS unbrick error
January 16, 2020 08:23AM
Jean,

Have you try this:

https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_reset_my_Synology_NAS


Quote

3. Mode 2: Reset Synology NAS and re-install the operating system DSM

Note: connect the Ethernet cable to the network, and serial console running, while you are doing this reset.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/16/2020 08:32AM by bodhi.
Re: Synology DJ216j NAS unbrick error
January 16, 2020 11:35AM
I finally succeeded in loading kernel, but boot ends up by incorrect login although I use correct credentials... :-/
Bootlog is attached.



Edited 1 time(s). Last edit at 01/16/2020 11:57AM by jean.
Attachments:
open | download - boot.log (21.2 KB)
Re: Synology DJ216j NAS unbrick error
January 17, 2020 02:07AM
Cool! It looks pretty good.

You can try to bring up the box local web page to see if you can reset the admin password.

BTW, you should post the entire serial log here (everything on the putty tetminal until the login prompt) so others can see exactly what you did when they look for solution for the same situation.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/17/2020 02:11AM by bodhi.
Re: Synology DJ216j NAS unbrick error
January 17, 2020 06:01AM
Once I will finish this torture, I wil try to describe what I did, now I proceeded further somehow getting to the stage when DS is up, accessible, installed but blue LED still flashing and NAS unable to reset (by little hole in the back) or restart (only HDD goes down and then serial console shows reboot failed - system halted) the system by the ordinary way. I used mem test included in the Synology assistant which reached twice 99,91% when got stuck. Is this because defective flash or because unable to restart? I checked the memtest log which shows 2020-01-17T11:40:51+01:00 DiskStation findhostd: util_fhost.c:1351 Memtest passed! How should I understand it and what should I try next? I found the the imls and flinfo commands to be useful for further flash related investigations but unfortunately not available in the synology u-boot package. Is there any way to add it? Thanks for any help or suggestion. I attach the reboot log from serial console. BR
Attachments:
open | download - Memtest&reboot log.txt (2.4 KB)
Re: Synology DJ216j NAS unbrick error
January 17, 2020 11:35PM
jean,

Your previous boot log showed eveything looks good. There is no need to run memtest.

Now, just recycle the power and eveything will be fine.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


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.
Message: