Welcome! Log In Create A New Profile

Advanced

Bricked Synology DS213 (Kirkwood) so close

Posted by itangoii 
Re: Bricked Synology DS213 (Kirkwood) so close
November 15, 2020 07:26PM
Synology DS213 - How to restore stock FW in flash.

Prerequisite

1. Have a set of backup mtds (0-5) available (see this thread).
2. Connect serial console.
3. Set up tftp server at the Linux host where you run serial console. The tftp root must be at top folder in this server: /tftproot. Copy the mtd files to this folder.

Quote

/tftproot/ds213.mtd0
/tftproot/ds213.mtd1
/tftproot/ds213.mtd2
/tftproot/ds213.mtd3
/tftproot/ds213.mtd4
/tftproot/ds213.mtd5


Steps


1. Boot with UART (skip this step if mtd0 is not corrupted, i.e stock u-boot still running OK during power up).

kwboot -t -B 115200 /dev/ttyUSB0 -b ds213.mtd0 -p


2. Power up the brick boxed, interrupt serial console at countdown.

3. Turn the SPI flash protection off

sflash protect off
sflash info
Expected Output
Flash Base Address  : 0xf8000000
Flash Model         : ST N25Q064
Manufacturer ID     : 0x20
Device Id           : 0xba17
Sector Size         : 64K
Number of sectors   : 128
Page Size           : 256
Write Protection    : Off

4. Load the images with tftp and flash each to SPI flash.

Note: if your u-boot is still running OK, then you don't have to flash mtd0 and mtd4.

tftpboot 0x800000 ds213.mtd0
sflash write 0x800000 0x000000000000 0x00090000

tftpboot 0x800000 ds213.mtd1
sflash write 0x800000 0x000000090000 0x00300000

tftpboot 0x800000 ds213.mtd2
sflash write 0x800000 0x000000390000 0x00440000

tftpboot 0x800000 ds213.mtd3
sflash write 0x800000 0x0000007d0000 0x00010000

tftpboot 0x800000 ds213.mtd4
sflash write 0x800000 0x0000007e0000 0x00010000

tftpboot 0x800000 ds213.mtd5
sflash write 0x800000 0x0000007f0000 0x00010000

DONE.

==========

So now you can either reset it at u-boot prompt, or recycle the power the DS213 to see if stock system is booting OK.

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



Edited 2 time(s). Last edit at 11/22/2020 07:56PM by bodhi.
Re: Bricked Synology DS213 (Kirkwood) so close
November 22, 2020 06:58PM
Sorry to take so long, it has been a tough couple of weeks but had some personal time this weekend. It also took some time to figure out and cobfigure the tftp server as information varies. I eventually got it pointed to the tftproot directory

It seems to read fine, but writing ia not working with little or no info as to why.

Marvell>> tftpboot 0x800000 ds213.mtd2
Using egiga0 device
TFTP from server 192.168.0.11; our IP address is 192.168.0.9
Filename 'ds213.mtd2'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################
done
Bytes transferred = 4456448 (440000 hex)
Marvell>> sflash write 0x000000390000 0x00440000
Usage:
sflash	- read, write or erase the external SPI Flash.

Marvell>> tftpboot 0x800000 ds213.mtd1          
Unknown command 'tftpboot' - try 'help'
Marvell>> tftpboot 0x800000 ds213.mtd1
Unknown command 'tftpboot' - try 'help'
Marvell>> tftpboot 0x800000 ds213.mtd1
Unknown command 'tftpboot' - try 'help'
Marvell>> tftpboot 0x800000 ds213.mtd1
Using egiga0 device
TFTP from server 192.168.0.11; our IP address is 192.168.0.9
Filename 'ds213.mtd1'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##############################
done
Bytes transferred = 3145728 (300000 hex)
Marvell>> sflash write 0x000000090000 0x00300000
Usage:
sflash	- read, write or erase the external SPI Flash.
Re: Bricked Synology DS213 (Kirkwood) so close
November 22, 2020 07:52PM
I had a syntax error on the commands. Will revise it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bricked Synology DS213 (Kirkwood) so close
November 22, 2020 07:56PM
Revised. Please try again.

https://forum.doozan.com/read.php?3,108294,111084#msg-111084

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Bricked Synology DS213 (Kirkwood) so close
November 23, 2020 10:00AM
Congratulations! You have succeeded! ;-)

tftpboot/sflash went smoothly and after a reset the box was discovered by the Synology software and allowed a fresh upgrade of the OS. After that, the web interface presented the normal login and indicated the box was healthy.

When/if you have the time (no hurry) could you summarize what you found in all this? Will the user need to do the dump using one method and the flash using another? I'm looking to compact all this into a single guide.

Can't thank you enough bodhi. Many of these DS212/213 boxes no doubt went into the trash and many sitting on shelves.
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: