Sunday, June 1, 2014

D-Link DNS-320 revival

I have spent quite a time to revive my DNS-320 NAS. It's flash memory died last week - some bad block in u-boot... strange that it was not detected. So. I grabbed the tools and started to work on NAS revival.
I found an USB to SERIAL adapter based on PL-2303HX chipset and I soldered a serial connector on the NAS's motherboard (much to my wife's reluctance). I have compiled a u-boot based on Jamie Lentin's instructions. Using kwuart tool I have been able to boot the NAS with the new u-boot and I could write it to the nand.
The next thing was to create a Debian filesystem based on wheezy - again it was quite ok - bootstrapped it successfully and wrote it to on of the hard drives. Then I tried to modify the nand partitioning as to be able to use the ubifs on nand. Despite my efforts I haven't been able to make it work so I booted NAS with an external USB stick holding kernel + ramdisk.
Then I had an epiphany and I realised that I could write the kernel and ramdisk directly in nand and load them directly and boot them with bootm. WORKED!!! Quickly wrote the settings in u-boot's env.
I had a fully working Debian 7 Wheezy - so I was able to install all the goodies that previously were crippled on fun-plug. Now I have transmission, lighttpd, ajenti. Decently working avahi, samba, cups and netatalk. I also got NTFS3g support and ext4 + btrfs (the original firmware had only ext3)
The nas temperature is now about 44-46 degrees - slightly higher than with original firmware although the CPU usage is lower.
DNS-320 with Debian is for sure no concurrent to Zyxel-325V2, or Synology devices, but it does quite a decent job.
            

No comments:

Post a Comment