read

Synology Serial Console

I thought I'd post this here for anyone looking for help on troubleshooting a failed Synology Diskstation NAS.

I've been a happy user of a Synology DS-212+. The software is robust and much better than my old DroboFS, and the fact that it is entirely open source is a big plus.

I recently upgraded the firmware to DSM 2661. Everything worked fine. For 12 hours. The next morning, the device was dead, with the blue blink of death).

Was it the new firmware? Or maybe a disk crash? Who knows.

I followed the basic tests recommended by Synology: remove both disks, turn it on and wait 30s for a long beep. Beeeeeep. Great, the motherboard is still functional. It also responded to ping and showed up on DS Assistant, so processor and ethernet are also working fine.

The Synology DS NAS is basically an embedded Linux box, using md + lvm for RAID. Nothing is proprietary, so I mounted the disks on my Linux desktop and spent a few more hours cloning and re-building the RAID using a spare disk. Life is good.

Till... it crashed again.

There was something wrong with the system partition, so I wanted to see inside the NAS, before the kernel finishes booting.

Thankfully, Synology folks already put a physical serial port in there. It's not documented, but it's not hard to find. You just have to open the case.

Disclaimer: make sure you have backup! I am not responsible if you lose your data, void your warranty, burn down your house or kill your dog.

  • Start by opening the case. Here's a video with instructions [update: the original video is not available anymore, but here's a similar one]. Be aware this may break the small internal hooks, and you'll need to use tape or hot glue to put it back together (what's wrong with manufacturers these days? What's the problem with good old screws?)
  • Inside the case, look for a 6-pin header, normally labeled JP2 (or COM1 on older models).
  • The pins likely are:
Pin Number Function
Confirmed on Synology DS212+  
13.3V
2GND
4TX
6RX
  • Now connect the pins 2, 4 and 6 (respectively GNS, TX, RX) to your USB-TTL 3v3 cable (if using the FTDI cable from Adafruit, it'll be 1-black, 5-yellow, 4-orange. Make sure you don't short-circuit any of the pins. These male-female jumper wires could be useful.
  • Open your preferred terminal program (under Win ExtraPutty is the best in town), set to 115200, disable xon/xoff, and you're all set.

Now you can turn on your DS, and see all the beauty of what's going on under the hood:


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

U-Boot 1.1.4 (Dec  2 2011 - 15:56:02) 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 256MB
DRAM CS[1] base 0x10000000   size 256MB
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

[4096kB@f8000000] Flash:  4 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


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

Synology Model: DS212+r1
Fan Status: Good

Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
## Booting image at f8080000 ...
   Image Name:   Linux-2.6.32.12
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1476672 Bytes =  1.4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at f8280000 ...
   Image Name:   synology_88f6282_212+ 2661
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    677043 Bytes = 661.2 kB
   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@build3) (gcc version 4.2.1) #2661 Mon Nov 12 23:10:15 CST 2012
[    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,4M root=/dev/md0 rw     syno_hw_                                          version=DS212pv20 ihd_num=2 netif_num=1 esata_7042=1
[    0.000000] Synology Hareware Version: DS212pv20-j
[    0.000000] Internal HD num: 2
[    0.000000] Internal netif num: 1
[    0.000000] Esata chip use 7042: 1
[    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: 256MB 256MB = 512MB total
[    0.000000] Memory: 506880KB available (3508K code, 530K 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
...
Starting Avahi mDNS/DNS-SD Daemon
[   51.280000] findhostd uses obsolete (PF_INET,SOCK_PACKET)
[  118.290000] ata1: device plugged sstatus 0x123
[  118.300000] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen
[  118.310000] ata1: edma_err_cause=00000010 pp_flags=00000000, dev connect
[  118.310000] ata1: SError: { PHYRdyChg DevExch }
[  118.320000] ata1: hard resetting link
[  124.270000] ata1: link is slow to respond, please be patient (ready=0)
[  128.350000] ata1: SRST failed (errno=-16)
[  128.350000] ata1: SRST fail, set srst fail flag
[  128.350000] ata1: hard resetting link
[  130.780000] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[  130.780000] ata1: link reset sucessfully clear error flags
[  130.810000] ata1.00: ATA-8: SAMSUNG HD203WI, 1AN10003, max UDMA/133
[  130.810000] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[  130.840000] ata1.00: configured for UDMA/133
[  130.840000] ata1: EH complete
[  130.840000] scsi 0:0:0:0: Direct-Access SAMSUNG HD203WI 1AN1 PQ: 0 ANSI: 5
[  130.860000] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[  130.870000] sd 0:0:0:0: Attached scsi generic sg3 type 0
[  130.900000] sd 0:0:0:0: [sda] Write Protect is off
[  130.920000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  130.940000]  sda: sda1 sda2 sda3 < sda5 >
[  130.980000] sd 0:0:0:0: [sda] Attached SCSI disk
[  137.810000] ata2.00: skip command 0xef feature 0x2
[  137.850000] ata1.00: configured for UDMA/133
[  137.850000] ata1: EH complete

Full boot here

Bonus tip: if you're really eager to void your warranty, you can hack U-Boot and load another operating system instead of Linux. The NetBSD folks posted a handy tutorial here.

All in all, the Synology Diskstation is a great NAS server, based on open standards, and very hacker friendly. Hope you never need to connect a serial console to yours, but it's good to know it's there, should you ever need it.


Blog Logo

Gui Ambros

Maker, engineer, ad:tech veteran. Incurable optimist. I was there when the web was born. Opinions here are my own. @GuiAmbros


Published

Image

wrgms.com

/dev/random rants about technology, electronics, startups.

Back to Overview