OpenWrt på D-Link DGS-1210 28 ports Switch

Recently, I bought 2 managed D-Link 1210 Gigabit Switches on eBay.de for 20 Euros each delivered.

  • 24 port P/N EGS121024M..A1G,
    H/W Ver A1,
    F/W Ver 2.02.002
  • 28 port DGS-1210-28,
    H/W Ver F2,
    S/W Ver 6.20.007

My intention was to install OpenWrt on the switches. I found these articles on Google

The newest OpenWrt firmware for  the 28 port switch can be found at:

I downloaded the FACTORY_IMAGE1, which I installed via the WEB-server on the DGS-1210-28.  It seems that there is provision for two Firmwares, so I installed OpenWrt as Image-2, selected the newly installed firmware and rebooted.  Unfortunately, the device ended up in a boot-loop, The device was bricked.

Next, I took the unit apart, soldered in a 4 pin header, connected a USB-serial adapter, and had  a look at the output on the Serial Console


U-Boot 2011.12.(2.1.5.67086)-Candidate1 (Jun 22 2020 - 14:58:40)

Board: RTL838x CPU:500MHz LXB:200MHz MEM:300MHz
DRAM:  128 MB
SPI-F: 1x32 MB
Loading 1024B env. variables from offset 0x80000
Board Model = DGS-1210-28-F1 Cameo_bdinfo_get_BoardID [293]
Switch Model: RTL8382M_8218B_INTPHY_8218B_8214FC_DEMO (Port Count: 28)
Switch Chip: RTL8382
**************************************************
#### RTL8218B config - MAC ID = 0 ####
Now External 8218B
**************************************************
#### RTL8218B config - MAC ID = 8 ####
Now Internal PHY
**************************************************
#### RTL8218B config - MAC ID = 16 ####
Now External 8218B
**************************************************
**** RTL8214FC config - MAC ID = 24 ****
Now External 8214FC
Net:   Net Initialization Skipped
rtl8380#0
Hit Esc key to stop autoboot:  0

Loading Runtime Image .. ....
## Booting kernel from Legacy Image at b4e80000 ...
   Image Name:   OpenWrt
   Created:      2025-04-13  16:38:32 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    3644458 Bytes = 3.5 MB
   Load Address: 80100000
   Entry Point:  80100000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Kernel 2 failed !! Trying kernel 1 ...
## Booting kernel from Legacy Image at b4100000 ...
   Image Name:
   Created:      2020-06-22  15:09:40 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1035510 Bytes = 1011.2 KB
   Load Address: 80000000
   Entry Point:  80262000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.19 (simon@208Server) (gcc version 3.4.4 mipssde-6.03.00-20051020) #20 PREEMPT Mon Jun 22 15:09:26 CST 2020
CPU revision is: 00019070
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 07a00000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 30988
Kernel command line: console=ttyS0,115200 mem=122M noinitrd root=/dev/mtdblock7 rw rootfstype=squashfs csb=0x0142C0E0 cso=0x00001045 csf=0x10CDD64A sfin=<NULL>,32MB,10887200;2071674
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 121088k/124928k available (2015k kernel code, 3724k reserved, 421k data, 108k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
squashfs: version 3.3 (2007/10/31) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 31) is a 16550A
Probe: SPI CS1 Flash Type MX25L25635F
Creating 9 MTD partitions on "Total SPI FLASH":
0x00000000-0x00080000 : "BOOT"
0x00080000-0x000c0000 : "BDINFO"
0x000c0000-0x00100000 : "BDINFO2"
0x00100000-0x00280000 : "KERNEL1"
0x00280000-0x00e80000 : "ROOTFS1"
0x00e80000-0x01000000 : "KERNEL2"
0x01000000-0x01040000 : "SYSINFO"
0x01040000-0x01c40000 : "ROOTFS2"
0x01c40000-0x02000000 : "JFFS2"
IPv4 over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
NET: Registered protocol family 17
No filesystem could mount root, tried:  squashfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,7)
 System restart.

What is going on ?

  • The bootloader uBoot has found the OpenWrt image we have installed as Kernel-2, but there seems to be a bad Checksum; therefore, uBoot tries to boot Kernel-1, which fails because it cannot find the root filesystem.

I probably should have read OpenWrt.org: D-Link DGS-1210-16_g1 before I flashed the new firmware,

I installed it as Image-2 – My bad.

I did read OpenWrt.org DGS-1210-28-F2 which is the exact model and  firmware version of my device, but it does not provide any relevant info.  It would have been better if this WEB-page hadn’t existed, then I might have searched on and found the first mentioned page.

The device is bricked. The Rabbit hole just got deeper

When pressing Esc while booting i get uboot> prompt on the serial console, it does not respond to terminal input but keeps printing DPT Timeout, and I can see a BOOTP/DHCP request on the a computer connected to the switch with an Ethernet-cable.  When pressing Ctrl-C I get a uboot> prompt. and it responds to terminal input, and I see the familiar uBoot environment, now I just have to figure out how to get new firmware installed from here.

All that is left to do to get back on track is to follow the section

in the OpenWrt.org: D-Link DGS-1210-16_g1 guide

That is it, I am now the happy owner a 28 port Managed Gigabit Ethernet switch running the newest version of OpenWrt,  an afternoon was all it took.  If I had read the right guide from the beginning it would have taken less than an hour.

Only half a victory

The other D-Link DGS-1210-24 switch is an earlier design, which uses a Kirkwood ARM processor, and although D-link has made the source-code available, and OpenWrt do have an article about this version, I cannot find the OpenWrt firmware for it, so it will have to run the original firmware for now.

 

 

This entry was posted in internet, OpenWrt. Bookmark the permalink.