Welcome! Log In Create A New Profile

Advanced

Bricked Synology DS213 (Kirkwood) so close

Posted by itangoii 
Re: Bricked Synology DS213 (Kirkwood) so close
October 11, 2020 07:40PM
Ok.

When that spinning bar freezes, control-c right away and recall the kwboot command, execute it again. Do this several times, e.g 10 times, until the box loads the image.

If it still behaves the same way. Try the reverse: power on the box and execute kwboot right away (a fraction of a second).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 11, 2020 07:49PM
bodhi Wrote:
-------------------------------------------------------
> Ok.
>
> When that spinning bar freezes, control-c right
> away and recall the kwboot command, execute it
> again. Do this several times, e.g 10 times, until
> the box loads the image.
>
> If it still behaves the same way. Try the reverse:
> power on the box and execute kwboot right away
> (a fraction of a second).

Thank you for hanging in there. As soon as I read that I remembered that trick from other readings.

I'm also setting up a dedicated Ubuntu computer so I know that there is no conflict with the host machine and the VM I've been using. I should be able to get back to you tomorrow.

Thanks again.
Re: Bricked Synology DS213 (Kirkwood) so close
October 11, 2020 11:05PM
Well, aint this a kick in the head? I setup another computer with Ubuntu so that I would not have to deal with the comport being wanted by both the Win 10 host and Ubunto client. As mentioned above, neither picocom or kwboot was responding. This lead to making sure the usb com port was being seen with setserial. It wasn't. I plugged in another usb/com cable and there it was. So it seems a brand new adapter died.

After hooking up the other cable I got kwboot to fly.

Here you go bodhi ;-) Never let it be said I know when to give up ;-)

 92 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 98 % [..........................................................]
[Type Ctrl-\ + c to quit]

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: Synology Disk Station LE

U-Boot 1.1.4 (Apr 19 2012 - 18:47:44) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 0068B3D4

Soc: 88F6282 A1CPU running @ 2000Mhz L2 running @ 500Mhz
SysClock = 500Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 512MB
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Using default environment

[8192kB@f8000000] Flash:  8 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: PCI Express Root Complex Interface
PEX interface detected Link X1

Synology Model: DS213
Fan Status: Good

Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

Marvell>> help
?       - alias for 'help'
WOLTest	- Wake On Lan u-boot testing
base    - print or set address offset
bootm   - boot application image from memory
bootp	- boot image via network using BootP/TFTP protocol
bubt	- Burn an image on the Boot Flash.
cmp     - memory compare
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
iloop   - infinite loop on address range
imd     - i2c memory display
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead	- Read Phy register
phyWrite	- Write Phy register
ping	- send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
resetenv	- Return all environment variable to default.
setenv  - set environment variables
sflash	- read, write or erase the external SPI Flash.
sg	- scanning the PHYs status
Temp	- read chip Tj temp
tftpboot- boot image via network using TFTP protocol
version - print monitor version

Marvell>> printenv
bootcmd=bootm F8090000 F8390000
baudrate=115200
loads_echo=0
ipaddr=192.168.1.154
serverip=192.168.1.155
rootpath=/mnt/ARM_FS/
netmask=255.255.254.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=spi_flash:0x80000@0(uboot)ro,0x700000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
bootdelay=3
disaMvPnp=no
ethaddr=00:50:43:3c:3b:5d
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
pcieTune=no
pcieTune1=no
bootargs=console=ttyS0,115200 ip=off initrd=0x00800040,8M root=/dev/md0 rw syno_hw_version=DS213v10 ihd_num=2 netif_num=1 flash_size=8
ethact=egiga0

Environment size: 1173/4092 bytes
Marvell>>

Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 03:24AM
itangoii,

> After hooking up the other cable I got kwboot to
> fly.
>
> Here you go bodhi ;-) Never let it be said I know
> when to give up ;-)

Cool :)

U-Boot 1.1.4 (Apr 19 2012 - 18:47:44) Marvell version: 3.5.9
...
Synology Model: DS213

This u-boot seems a little bit different from what we usually see with the other Kirkwood boxes.

> sflash - read, write or erase the external SPI
> Flash.

This command seems to be usable. If it is the same as the sf command in typical u-boot, then we are almost there.

Now I need to look at the addresses of the mtds to see how we can flash them.

Please get the out put of

help sflash

I'll be back tomorrow to continue.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 10:07AM
bodhi Wrote:

> This command seems to be usable. If it is the same
> as the sf command in typical u-boot, then we are
> almost there.
>
> Now I need to look at the addresses of the mtds to
> see how we can flash them.
>
> Please get the out put of
>
>
> help sflash
>
>
> I'll be back tomorrow to continue.

I'm having to work out some permission problems on the new computer. If I try to run the ./kwboot it starts the kwboot program and of course complains of incorrect parameters.

output requested

Marvell>> help sflash
sflash info
    - Retreive the SPI flash infomation.
sflash protect <on | off>
    - Enable or diasble write protection over the whole SPI flash.
sflash erase all
    - Erase (set back to 0xFF) the whole chip.
sflash erase SF[-SL]
    - Erase (set back to 0xFF) sectors SF-SL.
sflash read offset dest size
    - Read data from the flash into the destination address.
sflash write source offset size
    - Program a buffer from the source address into the flash offset (size in bytes).

Marvell>>

Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 01:54PM
itangoii,

On the bricked box, at kwboot serial console prompt,

sflash info
sflash protect off

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 02:17PM
bodhi Wrote:
-------------------------------------------------------
> itangoii,
>
> On the bricked box, at kwboot serial console
> prompt,
>
>
> sflash info
> sflash protect off
>


Looks to be working.

Marvell>> sflash protect off
Marvell>> sflash info

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

Marvell>> sflash protect on
Marvell>> sflash info

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    : All

Marvell>>
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 02:25PM
Another test.

Power down the box. Plug in either the USB rootfs or any USB formatted as Ext3.

Kwboot again, and observe to console log to see if any auto recovery procedure starts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 02:36PM
bodhi Wrote:
-------------------------------------------------------
> Another test.
>
> Power down the box. Plug in either the USB rootfs
> or any USB formatted as Ext3.
>
> Kwboot again, and observe to console log to see if
> any auto recovery procedure starts.

True to form Synology want's you to buy another one ;-)

 95 % [......................................................................]
 97 % [......................................................................]
 98 % [..........................................................]
[Type Ctrl-\ + c to quit]

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: Synology Disk Station LE

U-Boot 1.1.4 (Apr 19 2012 - 18:47:44) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 0068B3D4

Soc: 88F6282 A1CPU running @ 2000Mhz L2 running @ 500Mhz
SysClock = 500Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 512MB
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Using default environment

[8192kB@f8000000] Flash:  8 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: PCI Express Root Complex Interface
PEX interface detected Link X1

Synology Model: DS213
Fan Status: Good

Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
## Booting image at f8090000 ...
Bad Magic Number
Marvell>>

Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 04:55PM
Ok, so no USB recovery implemented :))

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 06:20PM
bodhi Wrote:
-------------------------------------------------------
> Ok, so no USB recovery implemented :))

Someone could make a fortune manufacturing two and four bay nas boxes that would be blank out of the box and you could install your own os. This is already a reality, but not at the same physical size. Raspberry could make a killing.
Re: Bricked Synology DS213 (Kirkwood) so close
October 12, 2020 10:50PM
OK so neither usb or ide commands are available. It means we need to either do tftpboot to load the mtd images, and flash each one. Or we can boot into the USB rootfs to flash it inside Debian.

tftpboot will requires a little more Linux knowledge (harder for beginners). So I'd say to make the restore procedure more user friendly, we should boot with the USB Debian rootfs on USB.

The procedure should be:

1. Create the Kirkwood rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on USB

2. Copy the mtd backup files to the /boot folder of the rootfs.

3. kwboot the bricked box using the NSA325 u-boot image.

4. Interrupt kwboot serial console, and

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv dtb_file '/boot/dts/kirkwood-ds212.dtb'
boot

5. Log in the Debian rootfs.

6. Check the mtd partitions

cat /proc/mtd


Expacted output:
dev:    size   erasesize  name
mtd0: 00090000 00010000 "RedBoot"
mtd1: 00300000 00010000 "zImage"
mtd2: 00440000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00010000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"



7. And flash the mtd files

cd //boot 
flash_unlock /dev/mtd0
flashcp -v ds213.mtd0 /dev/mtd0
flash_unlock /dev/mtd0
flashcp -v ds213.mtd1 /dev/mtd1
flash_unlock /dev/mtd2
flashcp -v ds213.mtd2 /dev/mtd2
flash_unlock /dev/mtd3
flashcp -v ds213.mtd3 /dev/mtd3
flash_unlock /dev/mtd4
flashcp -v ds213.mtd4 /dev/mtd4
flash_unlock /dev/mtd5
flashcp -v ds213.mtd5 /dev/mtd5

If you see flash_unlock error, then ignore it (we might not need to unlock each mtd partition).

And please post the entire log from step 3 (kwboot command included), until the end of step 7 above.

========

Let's see how it goes with the procedure above. If it is too cumbersome, we can try a different procedure with tftpboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 13, 2020 10:47AM
Bodhi:

I am setup to do tftpboot, and have all the *mtd? on a usb already in the bricked machine if you feel that may go easier.



Edited 1 time(s). Last edit at 10/13/2020 10:48AM by itangoii.
Re: Bricked Synology DS213 (Kirkwood) so close
October 13, 2020 11:58PM
itangoii,

I've updated the instruction to use the USB rootfs approach.

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

You have already tested Step 1 and 2. You can either repeat these for sanilty, or skip them to start from Step 3.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 14, 2020 04:57PM
Well, i got it booted and checked the file sizes and it does not look as expected.

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password: 
Last login: Wed Dec 31 16:10:00 PST 1969 on ttyS0
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00001000 "RedBoot"
mtd1: 00200000 00001000 "zImage"
mtd2: 00140000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00020000 00001000 "RedBoot config"
mtd5: 00010000 00001000 "FIS directory

Re: Bricked Synology DS213 (Kirkwood) so close
October 14, 2020 06:34PM
OK. Let's back track and look at the mtds dump in stock.

Now I recall that Synology mtd partitions in DTS are not what really on the SPI flash.

So the dump probably should be in accordance with what in the u-boot envs. It means there are only 2 mtd partition.

Will be back.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 14, 2020 08:35PM
itangoii,

Boot the good box with serial console. Interrupt serial console at cound down and

setenv bootargs 'console=ttyS0,115200 ip=off initrd=0x00800040,8M root=/dev/md0 rw syno_hw_version=DS213v10 ihd_num=2 netif_num=1 flash_size=8 mtdparts=spi_flash:0x80000@0(uboot)ro,0x700000@0x100000(root)

and boot
bootm F8090000 F8390000

Log into stock OS, check the mtd partitions. There should be only 2 mtds.

cat /proc/mtd
Post the output above.

mtd0 size should be 512K, mtd1 size should be 7M.

Dump mtds

dd if=/dev/mtd0 of=ds213.2mtd.mtd0 bs=512k conv=sync
dd if=/dev/mtd1 of=ds213.2mtd.mtd1 bs=7168k conv=sync

And then use ds213.2mtd.mtd0 to kwboot the bricked box. If it is successful then that is the correct size.

Please also post the kwboot log with ds213.2mtd.mtd0.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 4 time(s). Last edit at 10/15/2020 08:19PM by bodhi.
Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 01:47PM
Issuing the boot command after the setenv results in 'unknown command'
Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 04:09PM
Insead of boot, run the bootcmd directly:

run bootcmd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/15/2020 04:10PM by bodhi.
Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 04:42PM
bodhi Wrote:
-------------------------------------------------------
> Insead of boot, run the bootcmd directly:
>
>
> run bootcmd
>

There is no setenvs command so I did setenv.

run bootcmd is also command unknown.
Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 04:44PM
output of help from the Marvell prompt.

Marvell>> help
?       - alias for 'help'
WOLTest	- Wake On Lan u-boot testing
base    - print or set address offset
bootm   - boot application image from memory
bootp	- boot image via network using BootP/TFTP protocol
bubt	- Burn an image on the Boot Flash.
cmp     - memory compare
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
iloop   - infinite loop on address range
imd     - i2c memory display
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead	- Read Phy register
phyWrite	- Write Phy register
ping	- send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
resetenv	- Return all environment variable to default.
setenv  - set environment variables
sflash	- read, write or erase the external SPI Flash.
sg	- scanning the PHYs status
Temp	- read chip Tj temp
tftpboot- boot image via network using TFTP protocol
version - print monitor version

Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 08:20PM
Try booting this way:

bootm F8090000 F8390000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 09:15PM
Bohdi:
I do apologize for the confusion, it seems from reading the last few messages I was thinking one thing and doing something else.

Here is the full boot to the response of the cat command.

root@ubuntu20:~# picocom --b 115200 --f n --p n --d 8 /dev/ttyUSB0
picocom v3.1

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
�
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: Synology Disk Station LE 

U-Boot 1.1.4 (Apr 19 2012 - 18:47:44) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 0068B3D4

Soc: 88F6282 A1CPU running @ 2000Mhz L2 running @ 500Mhz
SysClock = 500Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 512MB 
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Using default environment

[8192kB@f8000000] Flash:  8 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: PCI Express Root Complex Interface
PEX interface detected Link X1

Synology Model: DS213
Fan Status: Good

Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 
Marvell>> setenv bootargs 'console=ttyS0,115200 ip=off initrd=0x00800040,8M root=/dev/md0 rw syno_hw_version=DS213v10 ihd_num=2 netif_num=1 flash_size=8 mtdparts=spi_flash:0x80000@0(uboot)ro,0x700000@0x100000(root)

Marvell>> bootm f8090000 f8390000
## Booting image at f8090000 ...
   Image Name:   Linux-2.6.32.12
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1553512 Bytes =  1.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at f8390000 ...
   Image Name:   synology_88f6282_213 25426
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3297004 Bytes =  3.1 MB
   Load Address: 00800000
   Entry Point:  00800000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 2.6.32.12 (root@build4) (gcc version 4.6.4 (Marvell GCC release 20150204-c4af733b 64K MAXPAGESIZE ALIGN CVE-2015-0235) ) #25426 Tue May 12 04:42:15 CST 2020
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Synology 6282 board
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Sys Clk = 200000000, Tclk = 166666667
[    0.000000] Synology Board ID: 27
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x00800040,8M root=/dev/md0 rw syno_hw_version=DS213v10 ihd_num=2 netif_num=1 flash_size=8 mtdparts=spi_flash:0x80000@0(uboot)ro,0x700000@0x100000(root)
[    0.000000] Synology Hardware Version: DS213v10-j
[    0.000000] Internal HD num: 2
[    0.000000] Internal netif num: 1
[    0.000000] Flash Memory Size: 8 MB
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 502784KB available (3656K code, 519K data, 124K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:128
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Calibrating delay loop... 1985.74 BogoMIPS (lpj=9928704)
[    0.250000] Mount-cache hash table entries: 512
[    0.250000] CPU: Testing write buffer coherency: ok
[    0.250000] devtmpfs: initialized
[    0.250000] xor: measuring software checksum speed
[    0.300000]    arm4regs  :  1810.800 MB/sec
[    0.350000]    8regs     :  1086.400 MB/sec
[    0.400000]    32regs    :  1402.400 MB/sec
[    0.400000] xor: using function: arm4regs (1810.800 MB/sec)
[    0.400000] NET: Registered protocol family 16
[    0.400000] Feroceon L2: Enabling L2
[    0.400000] Feroceon L2: Cache support initialised, in WT override mode.
[    0.420000] 
[    0.420000] CPU Interface
[    0.420000] -------------
[    0.420000] SDRAM_CS0 ....base 00000000, size 512MB 
[    0.420000] SDRAM_CS1 ....disable
[    0.420000] SDRAM_CS2 ....disable
[    0.420000] SDRAM_CS3 ....disable
[    0.420000] PEX0_MEM ....base e0000000, size 128MB 
[    0.420000] PEX0_IO ....base f2000000, size   1MB 
[    0.420000] PEX1_MEM ....base e8000000, size 128MB 
[    0.420000] PEX1_IO ....base f2100000, size   1MB 
[    0.420000] INTER_REGS ....base f1000000, size   1MB 
[    0.420000] NFLASH_CS ....base fa000000, size   2MB 
[    0.420000] SPI_CS ....base f4000000, size  16MB 
[    0.420000] BOOT_ROM_CS ....no such
[    0.420000] DEV_BOOTCS ....no such
[    0.420000] CRYPT_ENG ....base f0000000, size   2MB 
[    0.420000]  Detected Tclk 200000000 and SysClk 500000000 
[    0.420000] Apply DS 212 GPIO
[    0.420000] Synology 6282 1, 2 bay GPIO Init
[    0.920000] PEX0 interface detected no Link.
[    1.420000] PEX1 interface detected Link X1
[    1.420000] PCI: bus0: Fast back to back transfers enabled
[    1.420000] pci 0000:01:01.0: PME# supported from D0 D3hot
[    1.420000] pci 0000:01:01.0: PME# disabled
[    1.420000] PCI: bus1: Fast back to back transfers disabled
[    1.430000] bio: create slab <bio-0> at 0
[    1.430000] vgaarb: loaded
[    1.430000] SCSI subsystem initialized
[    1.600000] raid6: int32x1    146 MB/s
[    1.770000] raid6: int32x2    211 MB/s
[    1.940000] raid6: int32x4    215 MB/s
[    2.110000] raid6: int32x8    238 MB/s
[    2.110000] raid6: using algorithm int32x8 (238 MB/s)
[    2.110000] Switching to clocksource kw_clocksource
[    2.110000] NET: Registered protocol family 2
[    2.110000] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    2.110000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    2.110000] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[    2.110000] TCP: Hash tables configured (established 16384 bind 16384)
[    2.110000] TCP reno registered
[    2.110000] NET: Registered protocol family 1
[    2.110000] RPC: Registered udp transport module.
[    2.110000] RPC: Registered tcp transport module.
[    2.110000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.110000] Trying to unpack rootfs image as initramfs...
[    4.490000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    4.520000] Freeing initrd memory: 8192K
[    4.520000] XOR registered 4 channels
[    4.520000] XOR 2nd invalidate WA enabled
[    4.520000] VFS: Disk quotas dquot_6.5.2
[    4.520000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    4.520000] msgmni has been set to 998
[    4.520000] alg: No test for md5 (md5-generic)
[    4.520000] alg: No test for des (des-generic)
[    4.520000] alg: No test for des3_ede (des3_ede-generic)
[    4.520000] alg: No test for stdrng (krng)
[    4.520000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    4.520000] io scheduler noop registered
[    4.520000] io scheduler anticipatory registered (default)
[    4.530000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.530000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    4.540000] console [ttyS0] enabled
[    4.540000] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
[    4.550000] brd: module loaded
[    4.560000] sata_mv sata_mv.0: version 1.28
[    4.560000] sata_mv sata_mv.0: slots 32 ports 2
[    4.560000] scsi0 : sata_mv
[    4.570000] scsi1 : sata_mv
[    4.570000] ata1: SATA max UDMA/133 irq 21
[    4.580000] ata2: SATA max UDMA/133 irq 21
[   13.120000] ata1: link is slow to respond, please be patient (ready=0)
[   17.620000] ata1: SRST failed (errno=-16)
[   17.620000] ata1: SRST fail, set srst fail flag
[   20.050000] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   20.050000] ata1: link reset sucessfully clear error flags
[   20.100000] ata1.00: ATA-8: Hitachi HUS724030ALE641, MJ8OA5F0, max UDMA/133
[   20.100000] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   20.170000] ata1.00: configured for UDMA/133
[   20.190000] scsi 0:0:0:0: Direct-Access     Hitachi  HUS724030ALE641          MJ8O PQ: 0 ANSI: 5
[   20.190000] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[   20.200000] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   20.210000] sd 0:0:0:0: [sda] Write Protect is off
[   20.210000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   20.220000]  sda: sda1 sda2 sda5
[   20.270000] sd 0:0:0:0: [sda] Attached SCSI disk
[   23.270000] Delay 5 seconds to wait for disk 2 ready.
[   28.610000] ata2: SATA link down (SStatus 0 SControl F300)
[   28.610000] physmap platform flash device: 00400000 at f8000000
[   28.620000] SPI Serial flash detected @ 0xf8000000, 8192KB (128sec x 64KB)
[   28.630000] Searching for RedBoot partition table in SYNOMTD-0 at offset 0x7f0000
[   28.640000] 6 RedBoot partitions found on MTD device SYNOMTD-0
[   28.650000] SYNOMTD flash bank 0: Using RedBoot partition definition
[   28.650000] Creating 6 MTD partitions on "SYNOMTD-0":
[   28.660000] 0x000000000000-0x000000090000 : "RedBoot"
[   28.670000] 0x000000090000-0x000000390000 : "zImage"
[   28.670000] 0x000000390000-0x0000007d0000 : "rd.gz"
[   28.680000] 0x0000007d0000-0x0000007e0000 : "vendor"
[   28.680000] vender Mac1 checksum error ucSum:0x00 Buf:0xff Sum:0.
[   28.690000] vender Mac2 checksum error ucSum:0x00 Buf:0xff Sum:0.
[   28.690000] vender Mac3 checksum error ucSum:0x00 Buf:0xff Sum:0.
[   28.700000] serial number='C8L5N07423'
[   28.700000] 0x0000007e0000-0x0000007f0000 : "RedBoot Config"
[   28.710000] 0x0000007f0000-0x000000800000 : "FIS directory"
[   28.720000] SPI Serial flash detected @ 0xf4000000, 8192KB (128sec x 64KB)
[   28.730000] cmdlinepart partition parsing not available
[   28.730000] Loading Marvell Ethernet Driver:
[   28.740000]   o Cached descriptors in DRAM
[   28.740000]   o DRAM SW cache-coherency
[   28.740000]   o 2 Giga ports supported
[   28.750000]   o Single RX Queue support - ETH_DEF_RXQ=0
[   28.750000]   o Single TX Queue support - ETH_DEF_TXQ=0
[   28.760000]   o TCP segmentation offload (TSO) supported
[   28.760000]   o Receive checksum offload supported
[   28.770000]   o Transmit checksum offload supported
[   28.770000]   o SKB Recycle supported - (Enabled)
[   28.780000]   o Rx descripors: q0=128
[   28.780000]   o Tx descripors: q0=532
[   28.780000]   o Loading network interface(s):
[   28.790000]     o  register under mv88fx_eth platform
[   28.800000]     o eth0, ifindex = 2, GbE port = 0
[   28.800000]     o eth0, phy chipid = 1410e90, Support WOL = 32
[   28.810000] 
[   28.810000] md: linear personality registered for level -1
[   28.810000] md: raid0 personality registered for level 0
[   28.820000] md: raid1 personality registered for level 1
[   28.820000] md: raid10 personality registered for level 10
[   28.830000] md: raid6 personality registered for level 6
[   28.830000] md: raid5 personality registered for level 5
[   28.840000] md: raid4 personality registered for level 4
[   28.850000] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
[   28.850000] cpuidle: using governor ladder
[   28.860000] TCP cubic registered
[   28.860000] NET: Registered protocol family 17
[   28.870000] NET: Registered protocol family 15
[   28.870000] registered taskstats version 1
[   28.880000] md: Waiting for all devices to be available before autodetect
[   28.880000] md: If you don't use raid, use raid=noautodetect
[   28.890000] md: Autodetecting RAID arrays.
[   28.930000] md: invalid raid superblock magic on sda5
[   28.940000] md: sda5 does not have a valid v0.90 superblock, not importing!
[   28.950000] md: Scanned 3 and added 2 devices.
[   28.950000] md: autorun ...
[   28.950000] md: considering sda1 ...
[   28.960000] md:  adding sda1 ...
[   28.960000] md: sda2 has different UUID to sda1
[   28.960000] md: created md0
[   28.970000] md: bind<sda1>
[   28.970000] md: running: <sda1>
[   28.970000] raid1: raid set md0 active with 1 out of 2 mirrors
[   28.980000] md0: detected capacity change from 0 to 2549940224
[   28.980000] md: considering sda2 ...
[   28.990000] md:  adding sda2 ...
[   28.990000] md: created md1
[   28.990000] md: bind<sda2>
[   29.000000] md: running: <sda2>
[   29.000000] raid1: raid set md1 active with 1 out of 2 mirrors
[   29.010000] md1: detected capacity change from 0 to 2147418112
[   29.010000] md: ... autorun DONE.
[   29.020000] RAMDISK: lzma image found at block 0
[   31.620000] VFS: Mounted root (ext2 filesystem) on device 1:0.
START /linuxrc.syno
Insert basic USB modules...
:: Loading module usbcore[   31.870000] usbcore: registered new interface driver usbfs
[   31.890000] usbcore: registered new interface driver hub
[   31.890000] usbcore: registered new interface driver ethub
[   31.920000] usbcore: registered new device driver usb
 ... [  OK  ]
:: Loading module ehci-hcd[   31.980000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   31.980000] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   31.990000] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   32.030000] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   32.050000] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   32.050000] usb usb1: configuration #1 chosen from 1 choice
[   32.080000] hub 1-0:1.0: USB hub found
[   32.080000] hub 1-0:1.0: 1 port detected
 ... [  OK  ]
:: Loading module ohci-hcd[   32.160000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
 ... [  OK  ]
:: Loading module xhci-hcd[   32.220000] xhci_hcd 0000:01:01.0: xHCI Host Controller
[   32.230000] xhci_hcd 0000:01:01.0: new USB bus registered, assigned bus number 2
[   32.240000] xhci_hcd 0000:01:01.0: irq 10, io mem 0xe8000000
[   32.250000] usb usb2: No SuperSpeed endpoint companion for config 1  interface 0 altsetting 0 ep 129: using minimum values
[   32.280000] usb usb2: configuration #1 chosen from 1 choice
[   32.280000] hub 2-0:1.0: USB hub found
[   32.290000] hub 2-0:1.0: 4 ports detected
 ... [  OK  ]
[   32.400000] usb 1-1: new high speed USB device using orion-ehci and address 2
Insert net driver(Mindspeed only)...
[   32.430000] ds213_synobios: module license 'Synology Inc.' taints kernel.
[   32.440000] Disabling lock debugging due to kernel taint
[   32.500000] correction with 0x0f
[   32.550000] 2020-10-16 1:55:24 UTC
[   32.550000] synobios: load, major number 201
[   32.560000] Brand: Synology
[   32.560000] Model: DS-213
[   32.560000] This is default settings: set group disks wakeup number to 1, spinup time deno 1
[   32.570000] synobios cpu_arch proc entry initialized
[   32.580000] synobios crypto_hw proc entry initialized
[   32.580000] synobios syno_platform proc entry initialized
[   32.590000] synobios open /dev/ttyS1 success
Starting /usr/syno/bin/synocfgen...
/usr/syno/bin/synocfgen returns 0
[   32.610000] synobios: unload
Partition Version=8
 /sbin/e2fsck ex[   32.680000] Got empty serial number. Generate serial number from product.
ists, checking /dev/md0... 
[   32.690000] usb 1-1: configuration #1 chosen from 1 choice
[   32.690000] hub 1-1:1.0: USB hub found
[   32.720000] hub 1-1:1.0: 4 ports detected
[   32.730000]  md0: unknown partition table
[   33.000000] usb 1-1.4: new high speed USB device using orion-ehci and address 3
[   33.130000] usb 1-1.4: configuration #1 chosen from 1 choice
/sbin/e2fsck -pvf returns 0
Mounting /dev/md0 /tmpRoot
[   34.160000] EXT4-fs (md0): barriers disabled
[   34.170000] EXT4-fs (md0): mounted filesystem with ordered data mode
------------upgrade
Begin upgrade procedure
No upgrade file exists
End upgrade procedure
============upgrade
ls: /tmpRoot/usr/share/init/root-file-system.override: No such file or directory
ls: /tmpRoot/usr/share/init/hostname.override: No such file or directory
ls: /tmpRoot/usr/share/init/syslog-ng.override: No such file or directory
ls: /tmpRoot/usr/share/init/dsmupdate.override: No such file or directory
ls: /tmpRoot/usr/share/init/smallupdate.override: No such file or directory
ls: /tmpRoot/usr/share/init/rc.override: No such file or directory
Wait 2 seconds for synology manufactory device
Fri Oct 16 01:55:28 UTC 2020
/dev/md0 /tmpRoot ext4 rw,relatime,user_xattr,barrier=0,journal_checksum,data=ordered 0 0
sys /sys sysfs rw,relatime 0 0
/dev/root.old / ext2 rw,relatime,errors=continue,user_xattr 0 0
none /dev devtmpfs rw,relatime,size=251528k,nr_inodes=62882,mode=755 0 0
proc /proc proc rw,relatime 0 0
linuxrc.syno executed successfully.
[   36.650000] EXT3-fs: md0: couldn't mount because of unsupported optional features (240).
[   36.650000] EXT2-fs: md0: couldn't mount because of unsupported optional features (240).
[   36.680000] EXT4-fs (md0): barriers disabled
[   36.700000] EXT4-fs (md0): mounted filesystem with ordered data mode
[   36.700000] VFS: Mounted root (ext4 filesystem) on device 9:0.
[   36.710000] Trying to move old root to /initrd ... okay
[   36.710000] Freeing init memory: 124K
[   44.670000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   45.430000]  md1: unknown partition table
[   45.610000] Adding 2097080k swap on /dev/md1.  Priority:-1 extents:1 across:2097080k 
==================== start udevd ====================
[   48.350000] NET: Registered protocol family 10
[   48.350000] lo: Disabled Privacy Extensions
[   48.400000] IPv6 over IPv4 tunneling driver
[   48.410000] sit0: Disabled Privacy Extensions
[   49.970000] init: syno-auth-check main process (1384) killed by TERM signal
[   50.610000] <30>systemd-udevd[1520]: starting version 204
===== trigger device plug event =====
[   51.930000] cpufreq: Init kirkwood cpufreq driver
[   53.720000] alg: No test for aes (aes-generic)
[   53.940000] alg: No test for stdrng (ansi_cprng)
[   54.280000] alg: No test for crc32c (crc32c-generic)
[   55.150000] cesadev_init(bf192000)
[   55.370000] mvCesaInit: sessions=10240, queue=64, pSram=f0000000
[   56.060000] alg: No test for sha1 (sha1-generic)
[   56.210000] alg: No test for sha224 (sha224-generic)
[   56.230000] alg: No test for sha256 (sha256-generic)
[   56.490000] encryptfs using the OCF package.
[   58.680000] alg: No test for arc4 (arc4-generic)
[   59.150000] fuse init (API version 7.13)
[   59.560000] exFAT: Version 1.2.9
[   60.230000] sky2 driver version 1.25
[   60.750000] correction with 0x0f
[   60.810000] 2020-10-16 1:55:53 UTC
[   60.810000] synobios: load, major number 201
[   60.820000] Brand: Synology
[   60.820000] Model: DS-213
[   60.820000] This is default settings: set group disks wakeup number to 1, spinup time deno 1
[   60.830000] synobios cpu_arch proc entry initialized
[   60.830000] synobios crypto_hw proc entry initialized
[   60.840000] synobios syno_platform proc entry initialized
[   60.840000] synobios open /dev/ttyS1 success
[   63.830000] eth0: mac address changed
[   66.460000] eth0: started
[   67.810000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   75.900000] md: md2 stopped.
[   75.930000] md: bind<sda5>
[   75.940000] raid1: raid set md2 active with 1 out of 1 mirrors
[   75.940000] md2: detected capacity change from 0 to 2995645906944
[   75.960000]  md2: unknown partition table
[   79.450000] EXT4-fs (dm-0): barriers disabled
[   80.230000] EXT4-fs (dm-0): mounted filesystem with writeback data mode
[   89.710000] Initializing USB Mass Storage driver...
[   89.810000] scsi2 : SCSI emulation for USB Mass Storage devices
[   89.810000] usbcore: registered new interface driver usb-storage
[   89.820000] USB Mass Storage support registered.
[   89.970000] usbcore: registered new interface driver usblp
[   90.290000] usbcore: registered new interface driver hiddev
[   90.290000] usbcore: registered new interface driver usbhid
[   90.300000] usbhid: v2.6:USB HID core driver
[   94.390000] ata1.00: configured for UDMA/133
[   94.390000] ata1: EH complete

Diskstation1 login: [   94.850000] scsi 2:0:0:0: Direct-Access     Generic  STORAGE DEVICE           9910 PQ: 0 ANSI: 0
[   94.860000] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   94.880000] sd 2:0:0:0: [sdq] Attached SCSI removable disk
[   94.880000] scsi 2:0:0:1: Direct-Access     Generic  STORAGE DEVICE           9910 PQ: 0 ANSI: 0
[   94.890000] sd 2:0:0:1: Attached scsi generic sg2 type 0
[   94.900000] sd 2:0:0:1: [sdr] Attached SCSI removable disk
[  115.790000] loop: module loaded
[  117.430000] Slow work thread pool: Starting up
[  118.210000] Slow work thread pool: Ready
[  125.810000] init: prefetch-pkgicon main process (5144) terminated with status 1
[  127.260000] warning: `nginx' uses 32-bit capabilities (legacy support in use)
[  127.790000] iSCSI: init_io_buffer_head(833) LUN-backup: 512 buffers allocated, total 2097152 bytes successfully
[  137.810000] init: syno_disk_latency_monitor faild on spawn stage, stopped
[  138.570000] init: nmbd main process (5617) killed by TERM signal
[  158.960000] init: nmbd main process (6293) killed by TERM signal

Diskstation1 login: admin
Password: 
 -- admin: /var/services/homes/admin: change directory failed: No such file or directory
Logging in with home = "/".
admin@Diskstation1:/$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00090000 00010000 "RedBoot"
mtd1: 00300000 00010000 "zImage"
mtd2: 00440000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00010000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"
mtd6: 00800000 00010000 "spi_flash"
admin@Diskstation1:/$ 


Re: Bricked Synology DS213 (Kirkwood) so close
October 15, 2020 10:00PM
OK, looks like this stock kernel has a lot of hardcoded things.

It ignored what we have in bootargs.

Quote

[ 0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x00800040,8M root=/dev/md0 rw syno_hw_version=DS213v10 ihd_num=2 netif_num=1 flash_size=8 mtdparts=spi_flash:0x80000@0(uboot)ro,0x700000@0x100000(root)

So we are back to the 7 partitions.
admin@Diskstation1:/$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00090000 00010000 "RedBoot"
mtd1: 00300000 00010000 "zImage"
mtd2: 00440000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00010000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"
mtd6: 00800000 00010000 "spi_flash"

And so let's use the backup files previously created:

root@Diskstation1:~# ls -lh ds213.mtd?
-rw-r--r-- 1 root root 576K Oct 11 09:47 ds213.mtd0
-rw-r--r-- 1 root root 3.0M Oct 11 09:47 ds213.mtd1
-rw-r--r-- 1 root root 4.3M Oct 11 09:48 ds213.mtd2
-rw-r--r-- 1 root root  64K Oct 11 09:48 ds213.mtd3
-rw-r--r-- 1 root root  64K Oct 11 09:48 ds213.mtd4
-rw-r--r-- 1 root root  64K Oct 11 09:48 ds213.mtd5
-rw-r--r-- 1 root root 8.0M Oct 11 09:49 ds213.mtd6

======

kwboot the bricked box with NSA325 u-boot image,

 ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p

Once the NSA325 u-boot has loaded and started running, interrup serial console and plug in the USB rootfs.

And start booting,

setenv dtb_file /boot/dts/kirkwood-ds212.dtb
setenv mtdparts 'mtdparts=spi0.0:576K(redboot),3072K(zimage),4352K(rd.gz),64K(vendor),64K(redboot_config),64K(fis_directory)'
boot

Log into Debian, and then

cat /proc/mtd

And please post the entire kwboot serial console log (from the kwboot command to the last output from cat /proc/mtd on your terminal).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 03:03PM
Done.

 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  0 MiB
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
NSA325> setenv dtb_file /boot/dts/kirkwood-ds212.dtb
NSA325> setenv mtdparts 'mtdparts=spi0.0:576K(redboot),3072K(zimage),4352K(rd.gz),64K(vendor),64K(redboot_config),64K(fis_directory)'
NSA325> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
Device NOT ready
   Request Sense returned 02 3A 00

Use USB retry period from the environment: 15 second(s)
Device NOT ready
   Request Sense returned 02 3A 00
1 Storage Device(s) found

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60602368  	ac0e13c9-01	83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 754 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4963680 bytes read in 1039 ms (4.6 MiB/s)
loading uInitrd ...
EHCI timed out on TD - token=0xd8d80
9713936 bytes read in 6593 ms (1.4 MiB/s)
loading DTB /boot/dts/kirkwood-ds212.dtb ...
22000 bytes read in 3259 ms (5.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1f1ca000, end 1fb0d8d0 ... OK
   Loading Device Tree to 1f1c1000, end 1f1c95ef ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Synology DS212, DS212p v10, v20, DS213air v10, DS213 v10
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:576K(redboot),3072K(zimage),4352K(rd.gz),64K(vendor),64K(redboot_config),64K(fis_directory)
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000][    T0] Memory: 494644K/524288K available (9216K kernel code, 868K rwdata, 3400K rodata, 1024K init, 301K bss, 29644K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x38c/0x928 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000039][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000612][    T0] Console: colour dummy device 80x30
[    0.000655][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000676][    T0] pid_max: default: 32768 minimum: 301
[    0.000957][    T0] LSM: Security Framework initializing
[    0.001101][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001123][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001786][    T0] *** VALIDATE proc ***
[    0.002006][    T0] *** VALIDATE cgroup1 ***
[    0.002028][    T0] *** VALIDATE cgroup2 ***
[    0.002111][    T0] CPU: Testing write buffer coherency: ok
[    0.003594][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.003853][    T1] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.004101][    T1] rcu: Hierarchical SRCU implementation.
[    0.006481][    T1] devtmpfs: initialized
[    0.013675][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013702][    T1] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.013918][    T1] xor: measuring software checksum speed
[    0.110099][    T1]    arm4regs  :  1806.800 MB/sec
[    0.210059][    T1]    8regs     :  1084.800 MB/sec
[    0.310061][    T1]    32regs    :  1577.200 MB/sec
[    0.310077][    T1] xor: using function: arm4regs (1806.800 MB/sec)
[    0.310093][    T1] prandom: seed boundary self test passed
[    0.312614][    T1] prandom: 100 self tests passed
[    0.312622][    T1] pinctrl core: initialized pinctrl subsystem
[    0.313805][    T1] NET: Registered protocol family 16
[    0.314212][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.314832][    T1] audit: initializing netlink subsys (disabled)
[    0.315883][   T14] audit: type=2000 audit(0.310:1): state=initialized audit_enabled=0 res=1
[    0.315987][    T1] cpuidle: using governor ladder
[    0.316053][    T1] cpuidle: using governor menu
[    0.316485][    T1] Feroceon L2: Enabling L2
[    0.316527][    T1] Feroceon L2: Cache support initialised.
[    0.320790][    T1] No ATAGs?
[    2.560044][    C0] random: fast init done
[    3.878604][   T71] alg: No test for lzo-rle (lzo-rle-generic)
[    3.878872][   T73] alg: No test for lzo-rle (lzo-rle-scomp)
[    4.050671][    T1] raid6: int32x8  gen()   208 MB/s
[    4.220366][    T1] raid6: int32x8  xor()   142 MB/s
[    4.390083][    T1] raid6: int32x4  gen()   209 MB/s
[    4.560135][    T1] raid6: int32x4  xor()   137 MB/s
[    4.730278][    T1] raid6: int32x2  gen()   210 MB/s
[    4.900203][    T1] raid6: int32x2  xor()   151 MB/s
[    5.070273][    T1] raid6: int32x1  gen()   156 MB/s
[    5.240053][    T1] raid6: int32x1  xor()   108 MB/s
[    5.240060][    T1] raid6: using algorithm int32x2 gen() 210 MB/s
[    5.240065][    T1] raid6: .... xor() 151 MB/s, rmw enabled
[    5.240071][    T1] raid6: using intx1 recovery algorithm
[    5.240305][    T1] vgaarb: loaded
[    5.240695][    T1] SCSI subsystem initialized
[    5.241090][    T1] usbcore: registered new interface driver usbfs
[    5.241133][    T1] usbcore: registered new interface driver hub
[    5.241195][    T1] usbcore: registered new device driver usb
[    5.241319][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.241327][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.241345][    T1] PTP clock support registered
[    5.242324][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.870518][    T1] VFS: Disk quotas dquot_6.6.0
[    5.870597][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.877481][    T1] NET: Registered protocol family 2
[    5.878122][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    5.878153][    T1] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    5.878209][    T1] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    5.878263][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    5.878335][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    5.878357][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    5.878526][    T1] NET: Registered protocol family 1
[    5.879034][    T1] RPC: Registered named UNIX socket transport module.
[    5.879044][    T1] RPC: Registered udp transport module.
[    5.879050][    T1] RPC: Registered tcp transport module.
[    5.879055][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.879068][    T1] PCI: CLS 0 bytes, default 32
[    5.879255][    T1] Trying to unpack rootfs image as initramfs...
[    6.431391][    T1] Freeing initrd memory: 9488K
[    6.431529][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.432597][    T1] Initialise system trusted keyrings
[    6.432649][    T1] Key type blacklist registered
[    6.432832][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    6.432915][    T1] zbud: loaded
[    6.433726][    T1] NFS: Registering the id_resolver key type
[    6.433750][    T1] Key type id_resolver registered
[    6.433756][    T1] Key type id_legacy registered
[    6.433770][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.433782][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.433999][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    6.434166][    T1] fuse: init (API version 7.31)
[    6.434464][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.434598][    T1] orangefs_init: module version upstream loaded
[    6.434607][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[    6.447263][    T1] async_tx: api initialized (async)
[    6.447284][    T1] Key type asymmetric registered
[    6.447291][    T1] Asymmetric key parser 'x509' registered
[    6.447353][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    6.448401][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.449849][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    6.449868][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.449878][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.449887][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    6.450020][    T1] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    6.450052][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    6.450305][    T1] pci 0000:00:02.0: [11ab:6282] type 01 class 0x060400
[    6.450330][    T1] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    6.451831][    T1] PCI: bus0: Fast back to back transfers disabled
[    6.451849][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.451867][    T1] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.453511][    T1] PCI: bus1: Fast back to back transfers enabled
[    6.453530][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    6.455061][    T1] PCI: bus2: Fast back to back transfers enabled
[    6.455077][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    6.455213][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0000000-0xe00007ff pref]
[    6.455225][    T1] pci 0000:00:02.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    6.455236][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.455252][    T1] pci 0000:00:02.0: PCI bridge to [bus 02]
[    6.455749][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.512853][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.514168][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.572868][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.574468][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.575458][    T1] printk: console [ttyS0] disabled
[    6.575521][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 12500000) is a 16550A
[    7.472877][    T1] printk: console [ttyS0] enabled
[    7.478266][    T1] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 28, base_baud = 12500000) is a 16550A
[    7.493452][    T1] loop: module loaded
[    7.497844][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    7.505466][    T1] scsi host0: sata_mv
[    7.509749][    T1] scsi host1: sata_mv
[    7.513867][    T1] ata1: SATA max UDMA/133 irq 34
[    7.518676][    T1] ata2: SATA max UDMA/133 irq 34
[    7.524828][    T1] m25p80 spi0.0: found n25q064, expected m25p80
[    7.531081][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    7.536474][    T1] 6 cmdlinepart partitions found on MTD device spi0.0
[    7.543134][    T1] Creating 6 MTD partitions on "spi0.0":
[    7.548642][    T1] 0x000000000000-0x000000090000 : "redboot"
[    7.555394][    T1] 0x000000090000-0x000000390000 : "zimage"
[    7.561941][    T1] 0x000000390000-0x0000007d0000 : "rd.gz"
[    7.568445][    T1] 0x0000007d0000-0x0000007e0000 : "vendor"
[    7.575017][    T1] 0x0000007e0000-0x0000007f0000 : "redboot_config"
[    7.582244][    T1] 0x0000007f0000-0x000000800000 : "fis_directory"
[    7.590253][    T1] libphy: Fixed MDIO Bus: probed
[    7.595673][    T1] libphy: orion_mdio_bus: probed
[    7.600661][    T1] mdio_bus f1072004.mdio-bus-mii: MDIO device at address 8 is missing.
[    7.608969][    T1] mdio_bus f1072004.mdio-bus-mii: MDIO device at address 9 is missing.
[    7.617237][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.625096][    T1] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[    7.632036][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.639375][    T1] ehci-pci: EHCI PCI platform driver
[    7.644630][    T1] ehci-orion: EHCI orion driver
[    7.649489][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.655757][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.664284][    T1] orion-ehci f1050000.ehci: irq 32, io mem 0xf1050000
[    7.692352][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.699307][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    7.708324][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.716285][    T1] usb usb1: Product: EHCI Host Controller
[    7.721878][    T1] usb usb1: Manufacturer: Linux 5.2.9-kirkwood-tld-1 ehci_hcd
[    7.729234][    T1] usb usb1: SerialNumber: f1050000.ehci
[    7.735112][    T1] hub 1-0:1.0: USB hub found
[    7.739609][    T1] hub 1-0:1.0: 1 port detected
[    7.744810][    T1] usbcore: registered new interface driver usb-storage
[    7.751835][    T1] mousedev: PS/2 mouse device common for all mice
[    7.758390][    T1] i2c /dev entries driver
[    7.763807][    T1] rtc-s35390a 0-0030: error resetting chip
[    7.769898][    T1] rtc-s35390a: probe of 0-0030 failed with error -5
[    7.776937][    T1] device-mapper: uevent: version 1.0.3
[    7.782586][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    7.792070][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    7.799396][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    7.806782][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    7.814219][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    7.821058][    T1] device-mapper: raid: Loading target version 1.14.0
[    7.828111][    T1] kirkwood-pinctrl f1010000.pin-controller: pin PIN21 already requested by f1080000.sata; cannot claim for gpio-leds-hdd-21-2
[    7.841089][    T1] kirkwood-pinctrl f1010000.pin-controller: pin-21 (gpio-leds-hdd-21-2) status -22
[    7.850294][    T1] kirkwood-pinctrl f1010000.pin-controller: could not request pin 21 (PIN21) from group mpp21  on device f1010000.pin-controller
[    7.863515][  T112] ata1: SATA link down (SStatus 0 SControl F300)
[    7.869853][    T1] leds-gpio gpio-leds-hdd-21-2: Error applying setting, reverse things back
[    7.878453][    T1] leds-gpio: probe of gpio-leds-hdd-21-2 failed with error -22
[    7.886091][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    7.892513][    T1] drop_monitor: Initializing network drop monitor service
[    7.899712][    T1] NET: Registered protocol family 17
[    7.905096][    T1] Key type dns_resolver registered
[    7.910667][    T1] registered taskstats version 1
[    7.915509][    T1] Loading compiled-in X.509 certificates
[    7.921084][    T1] zswap: loaded using pool lzo/zbud
[    7.993403][    T1] Key type big_key registered
[    8.028982][    T1] Key type encrypted registered
[    8.035611][    T1] hctosys: unable to open rtc device (rtc0)
[    8.122348][   T15] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.215853][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[    8.235293][    T1] Freeing unused kernel memory: 1024K
[    8.240931][    T1] Checked W+X mappings: passed, no W+X pages found
[    8.247334][    T1] Run /init as init process
Loading, please wait...
[    8.324322][   T15] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.32
[    8.335496][   T15] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.352442][   T15] usb 1-1: Product: USB2.0 Hub
[    8.363074][   T15] hub 1-1:1.0: USB hub found
[    8.372433][   T15] hub 1-1:1.0: 4 ports detected
Starting version 241
[    8.702419][   T15] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[    8.864815][   T15] usb 1-1.3: New USB device found, idVendor=154b, idProduct=00ed, bcdDevice= 1.10
[    8.882132][   T15] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    8.902460][   T15] usb 1-1.3: Product: USB 3.0 FD
[    8.907277][   T15] usb 1-1.3: Manufacturer: PNY
[    8.911914][   T15] usb 1-1.3: SerialNumber: 070001690020C088
[    8.929107][   T15] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    8.948548][   T15] scsi host2: usb-storage 1-1.3:1.0
[    9.052410][   T15] usb 1-1.4: new high-speed USB device number 4 using orion-ehci
[    9.214566][   T15] usb 1-1.4: New USB device found, idVendor=05e3, idProduct=0726, bcdDevice=99.10
[    9.229785][   T15] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=2
[    9.237932][   T15] usb 1-1.4: Product: USB Storage
[    9.242868][   T15] usb 1-1.4: SerialNumber: 000000009910
[    9.249811][   T15] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    9.257218][   T15] scsi host3: usb-storage 1-1.4:1.0
[    9.273740][  T160] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[   10.003501][    T7] scsi 2:0:0:0: Direct-Access     PNY      USB 3.0 FD       PMAP PQ: 0 ANSI: 6
[   10.017002][   T23] sd 2:0:0:0: [sda] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB)
[   10.030838][   T23] sd 2:0:0:0: [sda] Write Protect is off
[   10.036942][   T23] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.126045][   T23]  sda: sda1
[   10.139826][   T23] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   10.343495][   T23] scsi 3:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9910 PQ: 0 ANSI: 0
[   10.352970][   T23] scsi 3:0:0:1: Direct-Access     Generic  STORAGE DEVICE   9910 PQ: 0 ANSI: 0
[   10.367719][    T7] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[   10.380092][   T23] sd 3:0:0:1: [sdc] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.33.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1 
rootfs: recovering journal
rootfs: clean, 15096/1896832 files, 367902/7575296 blocks
done.
[   25.770591][  T195] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   25.837276][  T195] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Starting hotplug events dispatcher: systemd-udevd.
[ ok ] Synthesizing the initial hotplug events (subsystems)...done.
[ ok ] Synthesizing the initial hotplug events (devices)...done.
[....] Waiting for /dev to be fully populated...[   28.257247][  T377] gpio-fan gpio-fan-100-15-35-1: GPIO fan initialized
[   28.463871][    C0] random: crng init done
[   28.497552][  T388] watchdog: f1020300.watchdog-timer: driver supplied timeout (4294967295) out of range
[   28.600507][  T388] watchdog: f1020300.watchdog-timer: falling back to default timeout (21)
[   28.701623][  T388] orion_wdt: Initial timeout 21 sec
[   28.717140][  T387] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   28.768885][  T387] sd 3:0:0:0: Attached scsi generic sg1 type 0
[   28.823372][  T387] sd 3:0:0:1: Attached scsi generic sg2 type 0
[   28.830946][  T374] marvell-cesa f1030000.crypto: CESA device successfully registered
[   28.931367][  T377] systemd-udevd[377]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   34.088138][  T590] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Starting Setting kernel variables: sysctl.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
ifup: failed to bring up eth0
failed.
[....] Starting RPC port mapper daemon: rpcbind[   37.611306][ T1172] NET: Registered protocol family 10
[   37.620719][ T1172] Segment Routing with IPv6
. ok 
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1312 (syslogd)
. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1339 (klogd)
. ok 
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NFS common utilities: statd idmapd.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password: 
Last login: Wed Dec 31 16:01:30 PST 1969 on ttyS0
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00090000 00001000 "redboot"
mtd1: 00300000 00001000 "zimage"
mtd2: 00440000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "redboot_config"
mtd5: 00010000 00001000 "fis_directory"
root@debian:~# 

Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 03:40PM
Excellent!

[    7.524828][    T1] m25p80 spi0.0: found n25q064, expected m25p80
[    7.531081][    T1] m25p80 spi0.0: n25q064 (8192 Kbytes)
[    7.536474][    T1] 6 cmdlinepart partitions found on MTD device spi0.0
[    7.543134][    T1] Creating 6 MTD partitions on "spi0.0":
[    7.548642][    T1] 0x000000000000-0x000000090000 : "redboot"
[    7.555394][    T1] 0x000000090000-0x000000390000 : "zimage"
[    7.561941][    T1] 0x000000390000-0x0000007d0000 : "rd.gz"
[    7.568445][    T1] 0x0000007d0000-0x0000007e0000 : "vendor"
[    7.575017][    T1] 0x0000007e0000-0x0000007f0000 : "redboot_config"
[    7.582244][    T1] 0x0000007f0000-0x000000800000 : "fis_directory"

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00090000 00001000 "redboot"
mtd1: 00300000 00001000 "zimage"
mtd2: 00440000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "redboot_config"
mtd5: 00010000 00001000 "fis_directory"

Compare with the original stock mtds

dev:    size   erasesize  name
mtd0: 00090000 00010000 "RedBoot"
mtd1: 00300000 00010000 "zImage"
mtd2: 00440000 00010000 "rd.gz"
mtd3: 00010000 00010000 "vendor"
mtd4: 00010000 00010000 "RedBoot Config"
mtd5: 00010000 00010000 "FIS directory"

Go ahead and flash the mtds. Assuming the backup mtds are in /boot

cd /boot 
flash_unlock /dev/mtd0
flashcp -v ds213.mtd0 /dev/mtd0
flash_unlock /dev/mtd1
flashcp -v ds213.mtd1 /dev/mtd1
flash_unlock /dev/mtd2
flashcp -v ds213.mtd2 /dev/mtd2
flash_unlock /dev/mtd3
flashcp -v ds213.mtd3 /dev/mtd3
flash_unlock /dev/mtd4
flashcp -v ds213.mtd4 /dev/mtd4
flash_unlock /dev/mtd5
flashcp -v ds213.mtd5 /dev/mtd5

Please post the flashing session log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/16/2020 04:16PM by bodhi.
Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 03:52PM
I'll go ahead but would like to ask a question.

You said they are the same, are the displays in your message above showing hex in one view and decimal in the other (or something like that)?

And do I need to do any setenv before the flash or just escape out of uboot and start on the usb?
Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 04:00PM
After checking mtds,

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00090000 00001000 "redboot"
mtd1: 00300000 00001000 "zimage"
mtd2: 00440000 00001000 "rd.gz"
mtd3: 00010000 00001000 "vendor"
mtd4: 00010000 00001000 "redboot_config"
mtd5: 00010000 00001000 "fis_directory"

Flash at Debian shell (root@debian:~#).

Quote

You said they are the same, are the displays in your message above showing hex in one view and decimal in the other (or something like that)?

They should be all hex. Any decimal format was just my translation to visualize it better in KBytes.

And do I need to do any setenv before the flash or just escape out of uboot and start on the usb?

Not need. The flashing is done in Linux, as I mentioned above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 04:07PM
You have a typo in the flashunlock above and repeated mtd0. Just in case you were going to add that to the instructions.

I also get this on any mtd after mtd0 mtd0 worked, but others result in

root@debian:/boot# flash_unlock /dev/mtd1
flash_unlock: error!: could not unlock device: /dev/mtd1

              error 22 (Invalid argument)



Edited 2 time(s). Last edit at 10/16/2020 04:32PM by itangoii.
Re: Bricked Synology DS213 (Kirkwood) so close
October 16, 2020 04:17PM
Don't worry about flash_unlock if seeing error. Go ahead and flashcp each mtd.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: