DNS-320L

DLink DNS-320L NAS

  • 所有者: martignlo/DNS-320L
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Some info about how to install Debian/GNU Linux on a DLink DNS-320L NAS (on the SATA drive).

Serial port

First of all you need a working serial console. The serial port is located next to the USB port (see the picture). You need to do some soldering and use a serial cable such as the Nokia CA-42 or DKU-5 data cable. The serial pinout is [4 3 2 _ 1], where 1 is RX (the red cable in the picture), 3 is GND (the orange cable), and 4 is TX (the yellow cable). Pin 1 is labeled "JP1".

Building the root file system

The easiest approach to create the root file system is to use debootstrap and then QEMU. The approach is well documented at http://www.digriz.org.uk/debian/debootstrap.

Once the root file system is ready, you could try it by copying it onto an USB stick. Make sure you preserve all file system attributes (e.g., use cp -a).

To test the new root file system you need to tell the kernel that the file system is on the USB stick:

Marvell>> setenv ethaddr [any MAC address]
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/sdc1 usb-storage.delay_use=0 rootdelay=1 rw
Marvell>> boot

As MAC address you could use the real MAC address of the ethernet card. A random MAC address works as well. You might need to replace /dev/sdc1 with /dev/sdb1 if you only have on SATA disk attached.

If everything works properly you should see the login prompt and be able to login.

Installing the new root file system on the SATA disk

You need to create a small partition on the disk (e.g., 4GB), format it, and then copy the content of the USB stick in the partition. Again, make sure all the file attributes are preserved.

To test the new root file system you need to reboot tell the kernel that the file system is now on the SATA disk:

Marvell>> setenv ethaddr [any MAC address]
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/sda1 usb-storage.delay_use=0 rootdelay=1 rw
Marvell>> boot

If everything works properly you should see the login prompt and be able to login.

Booting from the SATA disk by default

Save in the nvram the new kernel command line:

Marvell>> setenv ethaddr [your MAC address]
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/sda1 usb-storage.delay_use=0 rootdelay=1 rw
Marvell>> savenev

Temperature sensor & fan

You can use the fan-daemon.py script to automatically control the speed of the fan depending on the temperature of the board.

Tweaking the installation

Once the base system is running you can partition the rest of the space, configure the RAID, etc. Just make sure you have all the necessary devices.

If you want to spin-down the hard-drive, you might need to monitor disk accesses to figure out which processes are accessing the disk (echo 1 > /proc/sys/vm/block_dump). There are several tutorials on the web that explain how to use tmpfs to allow the disks to spindown.

Thanks

主要指標

概覽
名稱與所有者martignlo/DNS-320L
主編程語言Python
編程語言Python (語言數: 1)
平台
許可證
所有者活动
創建於2013-09-04 20:20:43
推送於2013-12-27 23:00:49
最后一次提交2013-12-28 00:00:00
發布數0
用户参与
星數23
關注者數5
派生數7
提交數9
已啟用問題?
問題數1
打開的問題數1
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?