Tips to get you around your Synology box

Questions about IPKG can go here!
Forum rules
Please note the disclaimer before modifying your Synology Product.

Tips to get you around your Synology box

Postby falcon359 » Wed Jan 16, 2008 2:00 pm

Tips to get you around your Synology box

I'll be making a pdf file of this once i get it finished but here is what i have so far.

1. Basic commands

A. To go to a directory, command:
Code: Select all
cd /directory name

B. To make a directory, command:
Code: Select all
mkdir /directory name

C. To delete a file, command:
Code: Select all
rm file name

D. To delete directory and its content, command:
Code: Select all
rm -r directory name

E. To copy a file or files, command:
Code: Select all
cp /directory name/file
name /destination directory
F. For more than one file, command:
Code: Select all
cp /directory name/*.* /destination directory

G. To install program, command:
Code: Select all
ipkg install file name

H. To remove a program, command:
Code: Select all
 ipkg remove file name

I. To reboot the Synology box, command:
Code: Select all
/sbin/reboot

J. To stop a program, command:
Code: Select all
killall program name


2. Make sure you backup any files that you change, which is part of the system files.
If you make changes to any of these files they will go back to system defaults when you do a firmware update.

A. .profile location:
Code: Select all
cd /root

B. Ipkg.conf location:
Code: Select all
cd /opt/etc

C. Crontab location:
Code: Select all
cd /etc

D. Httpd.conf location:
Code: Select all
cd /usr/syno/apache/conf


These are some of the files I know for a fact will go back to system default, when you update the firmware.

3. Gaining telnet access

A. Download enable telnet patch to your desktop, from:
http://www.synology.com/enu/support/download.php#Patches
B. Open up your web browser and login to you Synology box web admin account.
C. Click on system on the left then click on the firmware update tab on the far right.
D. Click on the browse button and locate the enable telnet patch you downloaded, then click ok button. Wait for the patch to install and reboot. Do not turn off your system for any reason during this operation.

4. Installing bootstrap for the armmarvell models
A. Download the bootstrap file to your Synology box public folder, from:
http://www.maartendamen.com/node/12
B. Open a dos prompt, using windows command prompt or any program that will set a command dos prompt like putty.
C. Login as root, meaning admin name is root then type in your Synology box admin password.
D. Go to the directory of the bootstrap file, type:
Code: Select all
cd /volume1/public

E. Install bootstrap file, type:
Code: Select all
sh ds_armmarvell-bootstrap_1.0.xsh

F. After bootstrap install, type:
Code: Select all
ipkg update
this will update the ipkg package feed on your box.
G. After you install the bootstrap you will want to update the ipkg.conf file with the new ipkg package feed, which will allow you to install more programs.
H. The best way to do this is to use vi editor which is part of linux, type
Code: Select all
vi ipkg.conf
and add this line to the ipkg.conf file.
Code: Select all
 src packages http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/

If you don’t know how to use vi edit all the commands are down below.
I. Now do an
Code: Select all
ipkg update
again

Linux VI Editor

VI Commands:
i insert mode, (ESC to exit insert mode) allows text to be entered on the screen
a Append to right mode
/word Move to the occurrence of "word"
n Locate the next occurrence
w Advance to the next word
e Advance to the next end of a word
b Move to the previous word
3b Move backward 3 words
dd delete line
3dd delete 3 lines
D Delete remainder of a line
dw Delete word
x Delete character
o Open space for new line below the cursor line
O Open a line above the cursor
CTRL-w Move back a word in append mode
u Undo last
U Undo all changes to current line
. In command mode, repeat the last text changing the command on the current line
:w newfilename save the file to newfilename from the command mode
:wq save and quit
:q! quit without saving
r replace then typa a character ot be replaced with r then return to break up a line
J join 2 lines
s substitute (sentence) typed text over a character, ESC when done
cw change word
c change part of a line from the cursor to the end of the line
cc substitute new text for aline, ESC when done
h move the cursor back one space
H move the cursor to the highest line on the screen
L move the cursor to the lowest line on the screen
M position the cursor at the midpoint on the screen
G last line in the file
0 (zero) Move the cursor to the beginning of the line it is on
view filename Open a file for viewing only
set number Turn on line numbers
set nonumber Turn off line numbers
Options:

number
autoindent (ai ctrl-d to move to the left
showmatch match brackets and parenthesis
tabstop=4
wrapmargine(wm) when line is wrapped (80-value)
:2 copy 4 Place a copy of line 2 after line 4.
:1,4 copy 7 (lines 1-4)
:n Access the next file for editing
falcon359
Trainee
Trainee
 
Posts: 19
Joined: Thu Mar 01, 2007 2:18 pm

Postby silverviper » Wed Jan 16, 2008 4:10 pm

nice tutorial :D

...make this thread sticky

Silverviper
silverviper
I'm New!
I'm New!
 
Posts: 8
Joined: Thu Jan 10, 2008 6:10 pm

Postby pableu » Wed Jan 16, 2008 4:19 pm

Nice! If you want to make it more dummy-proof, you could completely ignore vi and change point 4H to this:
Code: Select all
mkdir -p /opt/etc/ipkg
echo src packages http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ \
> /opt/etc/ipkg/synox07.conf
pableu
Sharp
Sharp
 
Posts: 162
Joined: Wed May 09, 2007 9:33 pm

Postby Trolli » Wed Jan 16, 2008 4:39 pm

Move files:

Code: Select all
mv fromfile tofile


Turn off:

Code: Select all
poweroff


...and you should add the commands "find" and "tar" to your tutorial!

Please add this tutorial to the synology wiki!

Trolli
Disk Station 1511+ - DSM 4.0 Beta - 2166
3x3TB Western Digital WD30EZRX, Raid 5

Disk Station 508 - DSM 3.2 - 1922
5x1TB Western Digital WD10EADS, Raid5


Moderator @ German Synology Forum
Trolli
Enlightened
Enlightened
 
Posts: 406
Joined: Thu Jul 12, 2007 7:53 am
Location: Germany

Postby rabraham » Wed Jan 16, 2008 4:56 pm

I also found some interesting information at this link

http://oinkzwurgl.org/diskstation
User avatar
rabraham
Student
Student
 
Posts: 76
Joined: Wed Nov 14, 2007 5:44 am
Location: Massachusetts, USA

Postby SirX » Wed Jan 16, 2008 6:36 pm

Looks good, but maybe you should also include the bootstraps for other than marvell-cpu devices. At the start of the tutorial it's not clear that this doesn't work on all diskstations.
SirX
Beginner
Beginner
 
Posts: 23
Joined: Fri Jan 04, 2008 11:36 pm

re

Postby falcon359 » Wed Jan 16, 2008 11:16 pm

Thanks for your avise i have already added most of the information here to the doc file I will be posting a web link in a few days and an update on the forums
falcon359
Trainee
Trainee
 
Posts: 19
Joined: Thu Mar 01, 2007 2:18 pm

Postby Mike » Thu Jan 17, 2008 9:22 am

Why not post it on the Synology Wiki?
Mike
Student
Student
 
Posts: 65
Joined: Thu Aug 02, 2007 10:11 am

Postby Trolli » Thu Jan 17, 2008 9:49 am

I think you should split the commands for the editor vi in two sections for better reading. One section for the basic commands that are necessary to work with the editor (insert, leave text mode, save and quit, quit without saving). The other section should have advanced commands.

The other possibility is to restrict this guide to the basic commands and then insert a link like http://users.tkk.fi/~thyle/vi_opas.html for the complete list of commands.

...and I think you should seperate the built in linux commands from the modded commands like ipkg.

Trolli
Disk Station 1511+ - DSM 4.0 Beta - 2166
3x3TB Western Digital WD30EZRX, Raid 5

Disk Station 508 - DSM 3.2 - 1922
5x1TB Western Digital WD10EADS, Raid5


Moderator @ German Synology Forum
Trolli
Enlightened
Enlightened
 
Posts: 406
Joined: Thu Jul 12, 2007 7:53 am
Location: Germany

Postby NetBoot » Thu Jan 17, 2008 1:46 pm

Here's another tip to trick to add for restart if all else fails to reboot your syno box.

By way of telnet to your syno box, run the following command.

echo -n "CCCC" > /dev/ttyS1

Net....

Sorry HarryPotter, :)
Product Model: DS-106
Firmware Version: 2.0.3 - 0640

I have my reasons for my insanity....
User avatar
NetBoot
Honorary Moderator
Honorary Moderator
 
Posts: 726
Joined: Tue Oct 24, 2006 8:20 pm
Location: Northeastern U.S.

Postby HarryPotter » Fri Jan 18, 2008 1:26 am

Sorry HarryPotter, :lol:


:?: Did I miss something?
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1636 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12347
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Postby pableu » Fri Jan 18, 2008 11:28 am

By the way, if you want to have more than three virtual terminals (box says "no more ptys"), you can to the following:
Code: Select all
mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
mkdir /dev/pts

And them mount them using
Code: Select all
echo "none /dev/pts devpts gid=5,mode=620 0 0" >> /etc/fstab
mount /dev/pts

To preserve the changes over a reboot, you can add the last two lines to /etc/rc.local

Its really handy, three virtual terminals just isn't enough if you use screen.
pableu
Sharp
Sharp
 
Posts: 162
Joined: Wed May 09, 2007 9:33 pm

Postby falcon359 » Sat Jan 19, 2008 4:39 pm

Hi again everyone here is an update, I hope it helps.

1. Basic commands
A. To go to a directory, command: cd /directory name
B. To make a directory, command: mkdir /directory name
C. Directory list, command: dir
D. To find a file, command: find / -name "file name"
E. To delete a file, command: rm file name
F. To delete directory and its content, command: rm –r directory name
G. To move or rename a file, command: mv /directory name/file name /destination directory
H. To copy a file or files, command: cp /directory name/file name /destination directory
I. For more than one file, command: cp /directory name/*.* /destination directory
J. To reboot the Synology box, command: reboot
K. To shutdown the Synology box, command: poweroff
L. Clear terminal screen, command: clear
M. To stop a process, command: kill process id
N. To stop a program, command: killall program name
O. Check system memory, command: cat /proc/meminfo or free
P. Check system CPU, command: cat /proc/cpuinfo
Q. Check for interrupts in use, command: cat /proc/interrupts
R. Check file system being used, command: cat /proc/filesystems
S. Check linux version, command, cat /proc/version
T. Shows the most current processes running, command: top
U. Shows all processes running, command: ps –ef
V. To install program, command: ipkg install file name
W. To remove a program, command: ipkg remove file name

2. Make sure your backed up
If you make changes to any of these files they will go back to system defaults when you do a firmware update.
A. .profile location: cd /root
B. ipkg.conf location: cd /opt/etc
C. crontab location: cd /etc
D. rc.local location: cd /etc
E. httpd.conf location: cd /usr/syno/apache/conf
These are some of the files I know for a fact will go back to system default, when you update the firmware.

3. Gaining telnet access
A. Download enable telnet patch to your desktop, from:
http://www.synology.com/enu/support/download.php#Patches
B.Open up your web browser and login to you Synology box web admin
account.
C. Click on system on the left then click on the
firmware update tab on the far right.
D. Click on the browse button and locate the enable
telnet patch you downloaded, then click
ok button. Wait for the patch to install and
reboot. Do not turn off your system for any reason
during this operation.


4. Installing bootstrap for the armmarvell models
A. Download the bootstrap file to your Synology box public folder, from:
http://www.maartendamen.com/node/12
B. Open a dos prompt, using windows command prompt or any program
that will set a command dos prompt like putty.
C. Login as root, meaning admin name is
root then type in your Synology box admin
password.
D. Go to the directory of the bootstrap file, type:
cd /volume1/public

E. Install bootstrap file, type:
sh ds_armmarvell-bootstrap_1.0.xsh
F. After bootstrap install, type: ipkg update this
will update the ipkg package feed on your box.
G. After you install the bootstrap you will want to update the
ipkg.conf file with the new ipkg package feed,
which will allow you to install more programs.
H. The best way to do this is to use vi editor which is part of Linux,
type vi ipkg.conf and add this line to the
ipkg.conf file. src packages http://ipkg.nslu2-linux.org/feeds/optwa ... /unstable/
If you don’t know how to use vi edit all the commands are below or to make even easier you can add these lines instead of using vi edit:
mkdir -p /opt/etc/ipkg
echo src packages http://ipkg.nslu2-linux.org/feeds/optwa ... /unstable/ \ > /opt/etc/ipkg/synox07.conf

If you really want to learn Linux then you should start learning how to use VI editor.
I. Now do an ipkg update again

5. Installing bootstrap for the PowerPC models
A. Download the bootstrap file to your Synology box public folder, from:
http://www.nslu2-linux.org/wiki/DS101/DS101BootStrap
B. Open a dos prompt, using windows command prompt or any program that will set a command dos prompt like putty.
C. Login as root, meaning admin name is root then type in your Synology box admin password.
D. Go to the directory of the bootstrap file, type: cd /volume1/public
E. Install bootstrap file, type: sh ds101-bootstrap_1.0-4_powerpc.xsh
F. After bootstrap install, type: ipkg update this will update the ipkg package feed on your box.

[6. Installing Midnight Commander
A. Midnight Commander requires five dependences to be install first, before installing the main program, if they are not already installed you’ll have to install them. For my DS106 box all I need to install was mc and the dependences installed with it, but on my CS407 box I needed to install all five dependences.
B. Ipkg install pcre
C. Ipkg install glib
D. Ipkg install e2fsprogs
E. Ipkg install slang
F. Ipkg install libpng
G. Ipkg install mc
H. Ok after the above are installed you need to edit the .profile file located in /root directory type: cd /root
I. Now type: vi .profile this will get you the vi editor
J. Add the following lines in the .profile
export TERMINFO=/opt/share/terminfo
export TERM=xterm
alias mc="mc -c"

This will allow you to use the F keys in Midnight Commander and turn on color mode.
K. Now all you need is to reboot type: reboot
L. After reboot telnet back into the Synology box and type: mc
M. If everything is setup right Midnight Commander will open in color mode with the F keys working. If you use putty to telnet into the Synology box your mouse should work when you open Midnight Commander also.

7. Installing Wizd Media Server
A. Wizd Media Server requires two dependences to be install first, before installing the main program, if they are not already installed you’ll have to install them.
B. Ipkg install libdvdread
C. Ipkg install libjpeg
D. Ipkg install wizd
E. Ok after the above are installed you need to edit the wizd.conf file located in /opt/etc directory type: cd /opt/etc
F. For this type of file I like to just copy it to the public folder on the Synology box and use a text editor like ultaedit to edit this file, because it has line numbers and the file is big. To copy to the public folder type: cp /opt/etc/wizd.conf /volume1/public once there you can edit it in any editor you like.
G. Now you need to edit lines 41-48 this is where your video, pictures, and music are located on your Synology box. It should look something like this.
moviealias Movies /volume1/video/Movies
alias TVShows /volume1/video/TV Shows
musicalias Music /volume1/music
photoalias Photos /volume1/photo

H. On lines 58-61 is your server port setting the default is 8000, set this to whatever would like.
I. Lines 164-196 are your skin settings the default skin is simplicity, if you like, you can change the skin or make your own and put it here. The shins are located in /opt/share/wizd/skin
J. Line 319 is server auto detect default is true
K. Line 322-323 is media server name, add your own
L. Line 326-332 is the server ip address settings default is 192.168.0.100
M. That’s all you need to setup to get going right away the other settings you can play with as you go.
N. After you get done editing the file just copy it back by typing:
cp /volume1/public/wizd.conf /opt/etc
O. To start wizd type: /opt/etc/init.d/S84wizd

8. Installing smartcrl web browser monitoring for PowerPC models
Smartcontrol and rrdtool together will allow you to monitor your system memory, swap file, system disk, drive volumes, and other system information all throw your web browser.
A. Download the following file to your desktop.
http://kahriboo.free.fr/monitor/monitor.rar
B. Make a folder called monit in the public folder of the Synology box and unrar the file to it.
C. telnet in your Synology box and type the following:
D. ipkg install rrdtool
E. ipkg install smartcrl
F. Make a folder called monitor in your Synology box web folder: type:
mkdir /volume1/web/monitor
G. Copy the style.css file to the monitor folder, type:
cp /volume1/public/monit/style.css /volume1/web/monitor
H. Give appropriate permissions to monitor folder, type: chmod 755 /volume1/web/monitorI. Copy the monitor script file to /opt/bin type: cp /volume1/public/monit/monitor /opt/bin
J. Now make the monitor file an executable, type: chmod 755 /opt/bin/monitor
K. You need to now edit the crontab file located in /etc type: vi /etc/Crontab
L. Add this line to the file: */5 * * * * root sh /opt/bin/monitor update
note : 5 = CONF_UPADTE_TIME / 60
M. Now you need to restart crond, type:
/usr/syno/etc.defaults/rc.d/S04crond.sh stop
/usr/syno/etc.defaults/rc.d/S04crond.sh start

N. You can now delete the monit folder in the public folder, type: rm –r /volume1/public/monit
O. You can now access your system information by typing in: http://YOUR_SYNO/monitor/index.php in your web browser. Be patient it might take a few minutes for the index.php file to be created.
P. A file called monitor.rrd should have been created in /etc this is where the script will save the different values.
falcon359
Trainee
Trainee
 
Posts: 19
Joined: Thu Mar 01, 2007 2:18 pm

Re: Tips to get you around your Synology box

Postby RobinGB » Thu Feb 28, 2008 1:18 am

Thanks Falcon,

I am totaly new to this so I was very please to find your post, but I got stuck for a few minutes very quickly,

I didn't know if my DS-207+ was an armmarvell model or not, from searching this forum I believe the following models are armmarvell units - DS-107+/DS-207+/CS-407/RS-407. Could you please state this in your guide rather than just armmarvell. It will save newbies like me 5 minutes or so.

Thanks.
RobinGB

Dont forget the modifications wiki area at http://forum.synology.com/wiki/index.php/Modifications

DS412+ (4xWD30EFRX in 2x RAID1) on LAN, CS407 (4xWD10EADS in 2x RAID1) on LAN, QNAP TS-119 (1x HD103UJ) on LAN, DS212j (2xWD30EFRX) on WAN, DS210j (2xWD10EADS in RAID1) on WAN, DS207+ (2xWD5000AAKS in RAID1) on WAN, ipkg, Y-CAM Black, APC Back-UPS ES 700, Sonos, Media Monkey, Zina, Samsung S3.
RobinGB
Knowledgeable
Knowledgeable
 
Posts: 381
Joined: Mon Sep 17, 2007 1:24 pm
Location: England

Re: Tips to get you around your Synology box

Postby anso » Sun Mar 09, 2008 8:29 am

Thank you, falcon359, great instruction!

What about packages like py25-moin?
Ok, I downloaded and install it, but where is now moin-moin web-page in my box?
I even cannot call python interpreter from synology command line.
anso
I'm New!
I'm New!
 
Posts: 2
Joined: Sun Mar 09, 2008 7:16 am

Next

Return to IPKG

Who is online

Users browsing this forum: No registered users and 1 guest