Samstag, 12. Mai 2012

[UPDATE] Installing / setting up my Synology DS212+

Lucky me! Right before the weekend all needed parts (that is, the Synology DS212+ itself plus 2 x 3TB Seagate ST3000DM001 7200 RPM) arrived in time to spend some fun hours with it. Bonus: My girlfriend isn't here for the entire weekend, so even more time available! Life can be sooo nice, aww ...

Alright, so after unpacking this nice little box I installed the HDDs and hooked it up to my network. Since the initial RAID parity checks takes a while I did some research on what I need to get working and what I want to do with my DS212+. In case you didn't know: The DS212+ runs a 2.6.32 Linux on an ARMv5 Marvell SoC with 2,0 GHz.

This post will list all the things I did to get my setup into a working state (and also act as a reminder in case I need to set it up another time / migrate).


First, enabling SSH is a good thing to do (but don't go for the ancient and unsecure telnet crap!) -- go right into DSM and enable SSH in the system preferences. You then can login via ssh (on Windows use putty) using root@<ip-of-your-DS212+> as the address. The password is the very same password you use for the DSM administrator account.

Adding external package sources

To get a few more packages to browse I just added some more SPK repository sources to  the DSM package manager:

Security advise: Be sure to only add at least somewhat verified / community accepted repository sources to your DSM. If you install malicious software from untrusted repositories to your poor, little DiskStation this really can bring your stored data into trouble!

Installing IPKG support

Another nice thing to do is to add support for *.ipkg packages to get even more software to your NAS-device: Since the DS212+ has an ARMv5-based CPU one has to do the following to get the IPKG stuff working:

  1. Login as root via SSH to your DS212+ (see SSH section for more information).
  2. Go to the "@tmp" directory by doing a "cd /volume1/@tmp/".
  3. Do a "wget".
  4. Execute the just downloaded script by "sh syno-mvkw-bootstrap_1.2-7_arm.xsh"
  5. Note: The execution will fail because the scripts contains a too tightend processor type check which simply can be changed in the next step.
  6. Go into the directory "bootstrap" (that was created by the script above) by "cd bootstrap", open the required file via "vi", go to the line which has "Feroceon-KW" in it and change it to just being "Feroceon" (without quotes). Leave the rest unchanged though! If you don't know how to operate "vi" then have a look here. After editing that line save the file and exit vi.
  7. Unmount "/opt" if still mounted: "umount /opt".
  8. Due to some wget incompatibilities the pre-installed DSM version vs. the wget version IPKG will install the root's PATH variable needs to be adjusted first: Do a "vi /root/.profile" (note the dot in front of the filename!) and add "/opt/bin:/opt/sbin/" in front of the PATH variable's value so that it might looks like this: "PATH=/opt/bin:/opt/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin:/bin:/sbin:/usr/bin ...". Exit the editor after you saved the file.
  9. Apply the changes to the environment by doing a "source /root/.profile".
  10. Go back to the "@tmp/bootstrap" directory by doing a "cd /volume1/@tmp/".
  11. Execute the script again by "sh".
  12. Now the script should report no error anymore and the IPKG stuff should get installed.
Phew, lot of stuff, wasn't it? So to update your IPKG package list you just need to do "ipkg update". This will retrieve the current repository list which will contain more fun software to install. Do that every now and then to keep your list updated; also mind for security updates.

Installing bash

As the default installation uses BusyBox with ash as the shell I'm not too happy with that. So installing bash with a "ipkg install bash" helps. After installing setting it as the default shell in "/etc/passwd" (usually the first line is for user root) via "/opt/bin/bash" solves this problem.

Installing OpenSSH

To use scp from my desktop box to transfer files to my new DS212+ I needed OpenSSH -- there is a nice small blog post over at Literati Tech which explains what to do. See it here.

Installing rdiff-backup

There's small wiki article over at which explains how to install rdiff-backup. See it here.
Oh, and for getting your self-stitched backup script up and running you also might want to install coreutils by doing a "ipkg install coreutils" (includes mktemp and so on which busybox doesn't offer).

TODO: htop, vim

Fixing German Umlauts for Samba shares

This one took me a while to figure out. As I occasionally read German articles or documentation I got some files with German Umlauts (ä, ö etc.) in it. After putting them on my DS212+ the naming was screwed up on both, the Samba share on my Ubuntu (Mint) box and via SSH (sh).

To fix this you need to edit the file "/usr/syno/etc/smb.conf" by adding
unix charset = ISO8859-1

to the [globa] section. After that you need to restart Samba by doing a

/usr/syno/etc/rc.d/ restart

Also, edit your Samba shares on your local box (probably /etc/fstab) to include

in the mount options per share. For reference, my mount options look like this:

//192.XX.XX.XX/music       /media/ds212/music            cifs    _netdev,auto,iocharset=iso8859-1,codepage=CP850,user,uid=XXX,credentials=/etc/samba/auth_ds212.conf    0       0

After re-connecting to your Samba shares the Umlauts finally should work now.

Developing further out for updates!

1 Kommentare:

Hilitec hat gesagt…

Und noch eine Package Center:

Kommentar veröffentlichen