SnakeOS Manual Do Usuário 13-01-2012

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

SNAKE OS for Str8132-Based NAS

USER MANUAL
Snake OS version V1.3.2 (20111019)
2nd edition
Authors:
Douglas Gazineu, 2010
Jarko Papalitsas, 2010
José Maciel, 2010
Miguel Moreto, 2010

Updated by
MB 2011
############### Table of Contents ###############

#. Table of Contents...................................................................003

i. Introduction...........................................................................007

ii. Compatible Hardware............................................................007

iii. Terms & Condition.................................................................007

iv. Disclaimer..............................................................................007

1. Installing & Upgrading/Downgrading Firmware................009

1.1 Requirement.............................................................................009

1.2 First Time Installing from factory firmware..........................009

1.3 Upgrading/Downgrading Snake OS firmware.......................010

2. Starting, Web Interface & Setting.........................................011

2.1 Connecting and Login...............................................................011

2.2 Web Interface & Setting...........................................................012

2.2.1 My NAS.............................................................................012

2.2.2 Device.................................................................................012
2.2.2.1. Hostname.............................................................................014
2.2.2.2 Admin....................................................................................014
2.2.2.3 LAN Settings........................................................................014
2.2.2.3.1 IP Address...............................................................014
2.2.2.3.2 MAC address..........................................................014
2.2.2.4 Web Interface.......................................................................014
2.2.2.5 Time.......................................................................................014
2.2.3 Disks...................................................................................015
2.2.3.1 Diskname..............................................................................015
2.2.3.2 Format..................................................................................015
2.2.3.3 Partition................................................................................015

2.2.4 Services..............................................................................015
2.2.4.1 DDNS....................................................................................015
2.2.4.2 FTP........................................................................................016
2.2.4.3 Samba....................................................................................016
2.2.4.4 SSH/SFTP.............................................................................017
2.2.4.5 Swapfile................................................................................017
2.2.4.5.1 How To use swap file..............................................017
2.2.4.6 Syslog....................................................................................018
2.2.4.7 Telnet.....................................................................................018
2.2.4.8 WebServer............................................................................018
2.2.4.8.1 how to use...............................................................018
2.2.4.9 Opkg......................................................................................018
2.2.4.10 Transmission (BitTorrent (BT))........................................018

2.2.5 Sharing...............................................................................020
2.2.5.1 Printers.................................................................................020
2.2.5.2 Users......................................................................................021
2.2.5.3 Shares....................................................................................021

2.2.6 System................................................................................022
2.2.6.1 Status....................................................................022
2.2.6.2 Log........................................................................022
2.2.6.3 Monitor.................................................................022
2.2.6.4 Config....................................................................023
2.2.6.5 Firmware..............................................................023
2.2.6.6 Packages...............................................................023

2.2.7 Transmission.....................................................................023

3. HOW TO...............................................................................................024

3.1 Install/Uninstall additional packages.................................024


3.2 Use transmission (download using torrent).......................025
3.3 Howto Debian environment within SnakeOs …...............025
4. Misc......................................................................................................028
4.1 FAQ.......................................................................................028
4.2 Troubleshooting...................................................................032
4.3 How To set up a serial interface........................................033
4.3.1. Hardware setup.....................................................................034
4.3.2 Software setup …...................................................................036
i. Introduction
Snake OS is firmware written for Str8132-Based NAS, design to enhance the functions of
your NAS by making it easier to use, safer and more intuitive than the factory firmware.
It is freely available to anyone who wish to use it.

ii. Compatible devices


The current version of SNAKE OS was tested to be compatible with the following devices:
Most of str8132 board based embedded systems.

– NS-K330 - 100% compatible


CPU clock at 250MHz, CPU: FA526id(wb)(ARMv4) Memory: 32MB = 32MB

– WLXKJ652 - 100% compatible *


CPU clock at 250MHz, CPU: FA526id(wb)(ARMv4) Memory: 32MB = 32MB

*NOTE: There is a different version based on a RDC chip being delivered from
Dealextreme, as reported on May/2010, that is incompatible with Snake OS.

It is marked as WLXKJ652R. Prefer to buy the NS-K330 or another model, for increased
chances to run Snake OS

– 650 BT LAN STORAGE (w or w/o DIRtec brand) - 100% compatible


CPU clock at 250MHz, CPU: FA526id(wb)(ARMv4) Memory: 32MB = 32MB total PCI
clock at 33M

– NAS ME-747ANS
– Agestar NAS NSB3AST / NSB3AS - ??
– IGRS Windrunner D10 – reported to work flashing via serial cable (see Link)
Based on CNS2132 (STR8132). 16Mb Flash. 64Mb RAM.

iii.TERMS & CONDITION


This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

iv. DISCLAIMER:
Snake OS team neither assumes nor accepts any liability for any, including, but not limited
to damage, malfunction, and/or loss of your hardware or data or anything else that you may
own regardless of the cause or reason for any such misfortune. Snake OS team will not be
liable for lost profits, loss of business or other consequential, special, indirect, punitive or
other damages, even if advised of the possibility of such damages, or for any claim by any
third party. These terms and conditions may be subject to change without notice.
By using Snake OS you/your corporation agree to these terms and condition
#SIDE NOTE:
Hey we did out of our enjoyment and love for this hardware. So we do not want any legal
trouble from anyone. So to avoid these trouble please READ THE MANUAL carefully and
FOLLOW THE INSTRUCTION carefully
I any problem arise please write in our issue page OR google group .Many
member will be reluctant to assist you through any problems
1. Installing & Upgrading Firmware

1.1 Requirement
- Compatible hardware (see section ii.), with basic setup
- Snake OS firmware. (download here)
for first time install =>“snakeos-V1.x.x-xxxxxxxx-from-original.zip”
for upgrade/downgrade =>“snakeos-V1.x.x-xxxxxxxx-from-snake.zip”
where "V1.x.x-xxxxxxxx" is your desired version
**WARNING: IF YOU FLASH THE WRONG FILE, YOUR DEVICE WILL
BRICK
******SO PAY SPECIALL ATTENTION AT THE FILE YOU ARE USING.
Extract the file, anywhere on your PC, after downloading
- A PC with a web browser

1.2 Installing From Factory Firmware to Snake OS


1.2.1 Start and connect to your NAS
1.2.2 Open a web browser and enter "http://NAS" into the address field in the
browser, where "NAS" is the name of your NAS.
Alternatively will may enter ip address. If there is a DHCP SERVER existed in the LAN, the
LAN Server will get the IP address automatically from the DHCP SERVER when startup. If
there is no DHCP SERVER existed in the LAN, the LAN Server will start up with the
default IP address 192.168.0.240 and provide the DHCP service with fixed IP addresses
range from 192.168.0.1 to 192.168.0.239.
1.2.3 Log in to your NAS
A log in screen will be shown, then you have to enter default user and password.
user: admin
password: admin
1.2.4 Select 'Tools' menu and click 'Upgrade firmware'.
It will let you do NAS Firmware Update.
1.2.5 On 'Upgrade firmware' page, Click the 'Browse…' button and select the correct
firmware image for Installing Snake OS.
Now select the “snakeos-V1.x.x-xxxxxxxx-from-original.bin" file from the Extracted file and click 'Update' to
start updating the firmware automatically.
**WARNING: IF YOU FLASH THE WRONG FILE, YOUR DEVICE WILL
BRICK, SO PAY SPECIALL ATTENTION AT THE FILE YOU ARE USING

1.3 Upgrading/Downgrading Snake OS firmware


this part assume that you are already familiar with the Snake OS, and you know how to use
and navigate through it. If not read the user manual on section 2
1.3.1 Start and connect to your NAS in your web browser
1.3.2 Select 'System menu and click 'Firmware'.
It will let you do NAS Firmware Update.
1.3.3 On 'Firmware' page, Click the 'Browse…' button and select the correct firmware
image for Installing Snake OS.
Now select the “snakeos-V1.x.x-xxxxxxxx-from-snake.bin" file from the Extracted file and click 'Go' to start
updating the firmware automatically.
**WARNING: IF YOU FLASH THE WRONG FILE, YOUR DEVICE WILL BRICK, SO
PAY SPECIALL ATTENTION AT THE FILE YOU ARE USING
2. Starting, web interface & setting

2.1. Connecting and login


To Connect, open up your favorite web browser (Mozilla Firefox,Internet Explorer, etc.) and
to the address bar enter "http://snake"

If it did not work, enter the IP address of your NAS


Default IP on router with static IP., is 192.168.0.240
On router with assigned by DHCP you need to find your NAS IP through your router

You should now see a login dialog. See below

If your device has just been updated to Snake OS, the default is
User Name: admin
Password: snake
If everything went fine, you should now see a page with a menu and information about your
system. something like this.
2.2 Web Interface
This will be a basic info on the web interface.

2.2.1 My NAS
This is the page you'll see shortly after login. The page contains a summary of your system
and a button which will allow you to reboot your NAS.
Here are brief explanations for each line:
• Kernel version: Shows current Linux kernel version and variation. Kernel is responsible for
things like I/O management, memory management, device controlling, etc. Snake OS uses
currently Linux kernel version 2.6.16 gazineu variation.

• NAS version: Shows current firmware version of your NAS.

• Storage Name: Basically your hostname. For more information, see 2.3.1.

• LAN IP Address: IP address of your NAS. It's assigned by DHCP or by Static IP


configuration. Default IP has been set 192.168.0.240 (static).

• LAN MAC Address: Basically it is the hardware ID of the NAS' network card. Snake OS is
able to change it though.

• Physical RAM: How much there's device's internal memory total/free. Makes device run
faster by storing temporary data here.

• Swapfile: “Extra RAM”. A file on a mass memory device which will be used if no more
RAM is available. Disadvantages compared to RAM are slower read/write time and
shortening Flash drives' lifespan.

• Uptime: How long it is from the previous boot.

• Reboot: restart/reboot your NAS

2.2.2 Device
This section has all the settings related to the base operation of the NAS

2.2.2.1. Hostname
This is the place to change your NAS hostname. Hostname is a unique name that is
given to all network devices. It is your choice how you'll name your device but you
shouldn't use the same name on two or more devices. There are also some other
restrictions that apply but more on that see
http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names.

2.2.2.2 Admin
Place to change passwords for the web interface, SSH and Transmission. It is required you to
type the password twice to avoid typing mistakes.
2.2.2.3 LAN Settings
There are the basic settings to get your NAS connected to the Internet
2.2.2.3.1 IP Address
This is the place where it is possible to change IP address and DNS settings of the device.
NOTE:wrong settings here may disconnect your NAS from the Internet.

1.) Automatic setting and configuration:


-Tick 'Use DHCP Address' and 'Use DHCP for DNS'.
-Click apply
*This configuration should be fine on most of the users but it also has its own downsides. When using DHCP,
your router may sometimes forget configured leases and that way it may assign a totally new IP for your NAS.

2.) Half-automatic configuration :


*where only IP, Subnet Mask and Default Gateway are configured automatically. You'll need to configure your
DNS settings manually.

-Tick IP settings by 'Use DHCP Address' and


-Untick 'Use DHCP for DNS'.
-Set DNS server and local DNS domain.
*DNS servers are used to resolve names on the web, that may be same as default gateway or another one. If
you have doubt about network settings, ask to you network administrator.

3.) Manually configuration settings:


-Untick IP settings by 'Use DHCP Address' and
-Untick 'Use DHCP for DNS'.
-Type a static IP address, netmask and default gateway according your network
configuration.
*Default IP address is 192.168.0.240 and netmask 255.255.255.0, but your may want to change it according to
your network configuration.
*You can read more about subnets in some websites like http://en.wikipedia.org/wiki/Subnetwork.

-Type IP address in 'gateway'.


*Probably default gateway is the computer or router that is used to connect to the internet.

-Set DNS server and local DNS domain.


*DNS servers are used to resolve names on the web, that may be same as default gateway or another one. If
you have doubt about network settings, ask to you network administrator.

2.2.2.3.2 MAC address


It is possible to change MAC address of the NAS here. You don't need to change this on
normal circumstances.

2.2.2.4 Web Interface


In this section you can change the default port used to access the NAS web interface.
The default port is the 80 (http default).

2.2.2.5 Time
Settings to change time on your NAS are placed here. You may want to select time zone
of your area and also set time either manually or by NTP (Network Time Protocol)
"Internet time".
2.2.3. Disks
This section contains settings related to the mass storage devices attached to your NAS.
2.2.3.1 Diskname
In this screen you can assign a name to each one of your disks (or partitions).The column
"Partition" shows the device ID detected by Snake OS. In the field "Mount Name" you can
type the a name for your disk (or partition). To save this, click on "Save" button. You can

also delete a name by clicking on "Remove".

2.2.3.2 Format
This screen lets you to format a device disk or partition. The device will be formatted as
ext3.
NOTE: ext3 is only accessible through 3rd party app on MS Windows.

2.2.3.3 Partition
You can choose mount or umount disks. When you insert a new disk, its automatically
mounted.
It's IMPORTANT to UNMOUNT every unit BEFORE REMOVING USB DRIVE FROM
NAS device.

When sda is mounted, for example, it's possible to locate it in the following path:
/usb/sda1 (first partition).
If you set a diskname, then you will find the partition under
/usb/diskname where "diskname" corresponds to the name you have given, as in 2.2.4.1.
This path can be accessed through SSH, as will be shown in Chapter 3.

2.2.4 Services
In this section you can change the settings about your NAS services.
2.2.4.1 DDNS
*DDNS is shortened from Dynamic Domain Name System and it allows you to set a
memorable subdomain for your external and dynamic IP. Practically this means you can
access your NAS (or other device depending on your NAT settings) outside your subnet
without remembering your external IP ie you can use snake.dynamicdns.com instead of
42.42.42.42.
To get started you need to register an account on some of the listed DDNS service
providers. After that fill in the details:
Alias: Type your dynamic domain name here
Username: Type your DDNS service username here
Password: Type your DDNS service password here
<SOMEONE SHOULD REVIEW THIS AS IM NOT SURE ABOUT THE LABELS>

2.2.4.2 FTP
This service enables sending and receiving files through File Transfer Protocol.
The following option can be set in this screen:

• Anonymous FTP folder: is the root location where users will have access to sendand
receives files;
• FTP enable checkbox: This option will enable or disable ftp service;
• Allow Anonymous: Setting this checkbox you will grant access to anonymous users in your
ftp server;
• Anonymous Can Write: Check this to give write permission to the anonymous users;
• Only Anonymous: Check this box to permit only anonymous users to your ftp server. This
way, the users created in the Sharing/Users section will not have access to the ftp server.
• Just below there is a label that shows service status. Four buttons can be used to apply
configuration, start, stop or restart the ftp service.
To connect your NAS via Ftp, use either your browser or ftp clients, such as FileZilla
(http://filezilla-project.org) for windows.
On browser, type ftp://xxx.xxx.xxx.xxx/ on address bar(where xxx.xxx.xxx.xxx is your NAS
IP address, i.e. "ftp://192.168.0.240" the default static IP address.)
On ftp clients, type your NAS IP address
i.e. "192.168.0.240" the default static IP address.

2.2.4.3 Samba
*Samba is a suite of programs that enables interoperability (including file sharing)
between a linux distribution (Snake OS in this case) and Windows.
The checkbox "Samba enabled" lets you enable or disable the Samba service. You can
also change the following options:
• Samba domain/workgroup. Insert here your network domain or workgroup. If
you are using Windows XP you can find workgroup name by right clicking in 'My
Computer' and selecting 'Properties'. Change to 'Computer Name' tab and look at
'Workgroup'.
• Samba security mode. Choose if you prefer anonymous login or by user. Users
settings will be shown in section 2.6.1.
It's also possible to see samba running status and the action buttons: Apply, Start, Stop,
Restart.

2.2.4.4 SSH/SFTP
see status and setting for start, stop and restart SSH service through this section. It's also
permit you to recreate keys. These keys are used to encode data and ensure the privacy over
the web.

2.2.4.5 Swapfile
The device doesn't have much RAM, so creating a swap file RECOMENDED, and it is very
useful to improve NAS performance. In this page it's possible to:
• Start swap file usage (checkbox);
• Select disk to write swap file to;
• Check status (active or not);
• Apply changes;
• Stop using swap file;
• Delete file.

2.2.4.5.1 How To use swap file,


- prepare a usb disk (preferably flash drive with ext3 file system), with at least 256MB free
space.
- plug it in
- determine what is the usb partition, by going to 'Disks' =>'Partition'
-now go to 'Services' => 'swapfile'
-tick 'Use Swapfile'
-Select the usb partition in 'Swapfile Disk'
-click 'apply'
if it doesn't run.
-reboot your NAS

2.2.4.6 Syslog
System log, all are self explanatory.
• Syslog Local Path.
• Network Syslog Enable
• Network Syslog Address
• Syslog status:

It's also possible to see syslog running status and the action buttons: Apply, Start, Stop,
Restart.

2.2.4.7 Telnet
Alternative to SSH

2.2.4.8 WebServer
a web based file browser

• Web Server folder. root folder view when opening


• Enable Web Server. to run webserver
• Web Server port. self explanatory. (default 8081)

2.2.4.8.1 how to use


to use, on your web browser address bar type xxx.xxx.xxx.xxx:8081 (where
xxx.xxx.xxx.xxx is your NAS IP address, i.e. "192.168.0.240:8081" the default static IP
address.)

2.2.4.9 Opkg
Pakage Manager for SNAKE OS

2.2.4.10 Transmission (BitTorrent (BT))


BitTorrent(BT) client, a P2P network protocol, configuration page.
Transmission is the BT client available in SnakeOS
This is the screen with Transmission options, use for configuring the Transmission BT
client.
The options are:
"Current torrent folder": set the folder were the downloaded files will be saved.
"Transmission enable": Check box to enable or disable the transmission service
“p2p Port”: The port used by default for file sharing
“Web Port”: The port for Transmission Web GUI
“Peer limit global”: Max number of peer connection for transmission
“Peer limit per torrent”: Max number of peer connection per torrent
"Speed Down": limit the download speeds by enabling the fields
"Speed Up”: limit the upload speeds by enabling the fields
"Enable Alternate Time": useful setting for enabling speed limit, for upload and
download, at a define time.These setting is define by below
“Alternate Speed Up”: limit the upload speeds by enabling the fields(KB/s)
“Alternate Speed Down”: limit the download speeds by enabling the fields(KB/s)
“Alternate Time Begin”: what time during the day the speed limit start
“Alternate Time End”: what time during the day the speed limit end
“Transmission - Alternate Time Days”: days when the speed limit is enabled
The lowest buttons let you apply the settings, start, stop and restart the service.
You can open Transmission home page by clicking in the link
"Transmission" using Snake OS web interface or typing IP address followed by port number
(i.e. http://192.168.0.240:9091).
Transmission and other configuration options will be explained in a further section.
You can check Transmission web site for more details: http://www.transmissionbt.com/

2.2.5 Sharing
In this section you can: view shared printers; select which folders will be shared; select
which users will have reading and writing privileges on it. Users and folders here are
related to Samba service (see details at section 2.5.2).

2.2.5.1 Printers
This screen permits you to list which printers are shared, showing name, device and TCP
port.
2.2.5.1.1 Installing the printer in your operational system
After connecting your printer(s) with the NAS you have to configure your computer(s) in
order to use your shared(s) printer(s). This section show how you should proceed to
install your printer.
Windows XP machine
Adding a new printer:
1) Click on windows "Start" menu, point to "Settings" and select "Printers and Faxes";
2) On the left bar of "Printers and Faxes" windows click on "Add printer";
3) The "Add Printer Wizard" will show up;
4) Click "Next", select "Local printer". Make sure that "Automatically detect and
install my Plug and Play printer" is not selected. Click "Next";
5) On this screen, select "Create a new port", highlight the Standard TCP/IP Port at
the pull-down menu;
6) The "Add Standard TCP/IP Printer Port Wizard" window will then appear. Click
"Next";
7) Type in the IP address assigned to the NAS in the "Printer Name or IP Address"
box, Click "Next". The "Port Name" field will automatically be filled in. Click "Next";
8) The "Additional port information" screen will appear. Select "Custom", click
"Settings" button, and click "Next";
9) In the "Configure Standard TCP/IP Port Monitor" window, select "RAW" protocol
and specify the necessary port number (9100, 9101 for second printer, etc). You can
verify this number in the SNAKE OS web interface at "RAW TCP port" field of the shared
printer(s);
10) Click "OK" to close the "Configure Standard TCP/IP Port Monitor" window and
"Next" on the "Add Standard TCP/IP Printer Port Wizard" window;
11) Click "Finish" to end the wizard;
12) Select the appropriate printer manufacturer and printer type in the list. If the
desired printer is not on the list, click "Have Disk" and insert the printer driver disk that
came with your printer to install the printer drivers. Click "Next";
13) Type in a new Printer name or leave it in default, and click "Next" button;
14) In the last step you can print a test page. Click "Next" and "Finish".
Modifying an existing printer:
You can modify an existing (installed) printer. You should change the port that the
printer is using to a TCP/IP printer port, like the procedure stated above. This resumed
procedure was taken from http://www.dd-wrt.com/wiki/index.php/
Printer_Sharing#Workstation_setup:
1) Find your printer in Control Panel - Printers etc. and open the properties page for
it.
2) Select the Ports tab.
3) Click Add Port and choose Standard TCP/IP printer port and click New Port
4) Enter you router's IP address (normally 192.168.1.1) and click Next
5) Set Device type to custom and click settings.
6) Make sure RAW is selected and specify the necessary port number (normally 9100,
9101 for second printer, etc) and click OK
7) Click Next and Finish and Close
8) Make sure the newly created port is selected for your printer and click OK
Windows 7 RC
Thanks to Dcirne to provide these steps.
Adding a new printer:
1) Click on windows "Start" menu, point to "Printers and Devices";
2) Choose "Add printer";
3) Select "Add network, wireless or bluetooth Printer";
4) Select "Desired printer is not listed";
5) Mark "Add printer using TCP/IP Address or hostname";
6) Choose "TCP/IP Device" and type IP address of the NAS;
7) Uncheck "Check printer and automatically choose the driver to use";
8) At "Device Type", choose "Custom" and click "Config";
9) Choose raw protocol, enter correct port number (default is 9100, which is also the
NAS' default port for 1st printer);
10) Click "OK" and Click "Advance";
11) Now choose the printer driver from the list install it with "Have disk" option;
12) Choose a printer name and whether to share it or not;
13) Check if the just installed printer will be the default one;
14) Print a test page if you want.

2.2.5.2 Users
When selecting 'Users' the following options will be displayed:

New: Click here to add a new user, which will have rights to access a certain folder.
Edit: Click here to modify options about the user selected on the list.
Remove: Click here to remove selected the user selected on the list.

2.2.5.3 Shares
In section 2.5.3 samba service was started and security mode was selected. Now you
will select which folders will be seen by which users (if you have chosen 'User and
Password Required').
Type some description for sharing in 'Share Name'. Then click in 'Shared Folder' text box
to browse some location which this sharing will point to. In next field, select if this folder
will be writable. Allowed user is the users that have rights to access the 'shared folder'
you just selected.

2.2.6 System
This menu has some options about system status and configuration.

2.2.6.1 Status
Select this item to view system status. Kernel version, NAS version, IP address, MAC
address, RAM, swapfile and uptime. The same with start page

2.2.6.2 Log
In this screen you can view the system log since the device has booted. The listing here
is equivalent with the output of a "dmesg" command issue at linux command terminal.

2.2.6.3 Monitor
This function is very useful to know how much physical memory, swapfile and cpu
processing is being used by system.
2.2.6.4 Config
Some actions require that system configuration be saved, like password changes, torrent
client options and other settings. After changing options like these, click in save button.
To reset settings to default, just click in "Set default" button.

2.2.6.5 Firmware
Here you can update firmware used in your NAS. It's possible to use Snake OS or any
other, just like you did to update from original firmware to Snake OS.
Snake OS has a special version beside original firmware format. It's a smaller and safer
to update version, as said in section 1.3.1. Click in 'browse' button, select a firmware file
(full or safer version) and clic 'Go' to start updating. It can take several minutes.

2.2.6.6 Packages
Use to install/ uninstall additional packages/software

2.2.7 Transmission
This is a link to opens a BitTorrent client Transmission in a new window.
Transmission administrative interface runs by default on port 9091.
3. How To...
3.1 Install/Uninstall additional packages
To install:
1. go to Service => Opkg
2. check “ Enable opkg (preferably you need to have a “permanent” usb drive, for swap and
additional data)
3. change “Opkg Disk:“ to your prefered disk and click apply

4. go to System => Packages


5. Click “Browse...”, beside “Install package”
6. Select *.opk file you wish to install and Click “open”
7. Click install

To Uninstall:
1. On System => Packages, choose packages you wish to remove, beside ”Installed
packages”
2. click Uninstall
3.2 Download using transmission (using torrent)
1. go to Service => Transmission and at the bottom page click “start” if you haven’t done so
already
2. using your PC browser, go to your favorite torrent site (i.e btjunkie.org, torrentz.eu, TPB,
etc...), download and save it anywhere.
3. now in snakeos go to “Transmission”(at the bottom of the page)
4. this page will pop up ( enable pop ups, if you havent already)

brief explanation:
-Corner black circle, “Open” – to select torrent for downloading
Middle black circle,click browse, to select torrent from pc or enter url for
torrent directly from website.
-Top red circle buttons,to remove/pause/resume (self explanatory) torrent
downloading, bottom red circle.
-Top green circle, toggle “filter”, for viewing specific torrent with selected, bottom
green state
-Top blue circle, toggle information display, bottom blue circle
-Bottom Pink circle, toggle setting dispay, top pink circle
-Bottom purple circle, enable/disable speed limits

Go to Transmission Website for further information

3.3 Howto Debian environment within SnakeOs


“Taken from Snake os Wiki page
Written by Robert Szabo.

Introduction
Very simple way to have Debian (and its huge number of packages). Chroot is a shell (embedded
system within a linux) where you have debian libraries, packages and the whole deb environment
within SnakeOS host.)
You only need to have an USB device attached. (No serial connection needed.)
Use ext2 or ext3 file system to extract files below. (On FAT it will be extracted, but wont work!)

Details
1. ssh to NAS - or putty from win
2. #cd /usb/sda1
3. Download chroot debian with wget:
4. # wget http://snake-os.googlecode.com/files/debian_chroot.tgz
5. backup your earlier debian config files if needed.
6. # rm -R debian ! This will erase previous debian directory!
7. #tar -xvf debian.tgz
8. #mount -o bind /proc /usb/sda1/debian/proc
9. #mount -o bind /dev /usb/sda1/debian/dev
10.#mount -o bind /usb/sda1 /usb/sda1/debian/mnt/sda1 - this is not mandatory
11.# edit /usb/sda1/debian/etc/resolv.conf -Set your name server, if you need. Default is
192.168.1.1
12.#chroot /usb/sda1/debian/
Now you are in chrooted debian shell.
To exit debian use "exit" command or reboot.

Some useful - "must have" thing:


• to have tons of debian packages use APT:)
• apt-get install packagename
• mc - Midnight Commander - feature full file commander. Just run: mc
• plowdown <--- downloading from hosting servicees like rapdishare and megaupload ( from
http://code.google.com/p/plowshare/downloads/list. apt-get install plowdown.
• screen <--- It allows you to run "virtual terminals" with the added benefit that closing the
connection the process keep running, so no need to do 10 ssh sessions, or using nohup. apt-
get install screen.
• Mount dev and proc, you can use fstab if yo whish. “

Simpler Version:
1. use your fav SSH client (like putty for windows)
2. enter your snake ip address and your snake os ssh port no (22 default)
3. something like the picture on the right will appear
4. enter log in as: “root” password: your snake os password
5. a snake picture will appear.
6. write the command below(red word) into the terminal
#cd /usb/sda1
Download chroot debian with wget:
# wget http://snake-os.googlecode.com/files/debian_chroot.tgz
backup your earlier debian config files if needed.
# rm -R debian ! This will erase previous debian directory!
#tar -xvf debian.tgz
#mount -o bind /proc /usb/sda1/debian/proc
#mount -o bind /dev /usb/sda1/debian/dev
#mount -o bind /usb/sda1 /usb/sda1/debian/mnt/sda1 - this is not mandatory
# edit /usb/sda1/debian/etc/resolv.conf -Set your name server, if you need. Default is
192.168.1.1
#chroot /usb/sda1/debian/
Now you are in chrooted debian shell.
And sh-3.1#should appear
To exit debian use "exit" command or reboot.
4. Misc.

4.1 FAQ
********************************************************************
********************************************************************
Written by Robert Szabo
Q: Where is the firmware /binary ?
Answer:

Use download section. Actual one is: http://code.google.com/p/snake-


os/downloads/detail?name=snakeos-V1.1.0-20100418-from-snake.zip&can=2&q=

Be aware: from snake and from original stock firm is different! Many people reporting that
they upgraded with wrong firmware and then it is bricked.
snakeos-V1.2.0-20100621-from-original.zip means upgrade this firmware if you have original stock
firmware. snakeos-V1.2.0-20100621-from-snake.zip use this if you have a previous version of
snake already installed.
Q: Can I upgrade my NS-K330 or WLX-652 with SnakeOS ?
Answer: Yes. Definitely. Recommended. More stable, and more functions.

Q: Where is user documentation?


Answer1: You can read it in download section.

Authors are: Douglas Gazineu, Jarko, José Maciel, Miguel Moreto

Q: Where to ask questions?


Answer: Read the forum and PAGES on the right side of

http://groups.google.com/group/dealextreme-nas-/topics?hl=en

Q: Device lost all connectivity, no answer for ping, ssh, http, ftp. What can I do?
Answer1: Hard Reset it.

NS-K330 has a reset button. Push it while powering on, with the reset button held in for
45 seconds (counted to 60 just in case). After it showed up under the default IP (or at
least the one assigned by the DHCP server), by the MAC address. Some people reported
that router must be power off also during NAS reset. Some other people suggest to
directly connect NAS to PC via the ethernet cable, not via router.

Q: Serial connect
If hard reset was not enough - device not respond yet.

Answer2: If you are not lucky with hard reset, second chance you are able to serial
connect to device and telnet via the RS232-TTL converter direct connect. You also have
to connect nas with the rj45 cable for TFTP access.

Picture and description here: http://groups.google.com/group/dealextreme-


nas-/web/serial-connection-how-to or http://groups.google.com/group/dealextreme-
nas-/web/serialconnectionhowto-ns-k330?hl=en

Q: FLASHing -
Serial connect was not allowed - device not respond/boot. Seems bricked. :(

Answer3: If you not enough lucky with serial connection either, next chance to write
and replace Flash. Flash contains the boot, and root partitions. (BIOS and Operation
system together.)

There is a smart (and cheap) flash writer using parallel port + 4 resistor + 1 condensator.
See detailes here http://rayer.ic.cz/elektro/spipgm.htm

With this you can reprogram your flash. (Or ask guys from the forum here to do for
you.)

1. flash write,
http://groups.google.com/group/dealextreme-
nas-/browse_thread/thread/08df34f7df625832?hl=en

2. And replace flash http://groups.google.com/group/dealextreme-nas-/web/nas-832-


flash-chip-relocation-tutorial

Most of the user don't need flash replace. Most of them have local network related
problems. (ex.: router don't give new IP address) So try first to shut down all network
elements before try to replace flash.

Q: Default user and password for the web interface ?


Answer: admin/snake

Q: Compile - dependences. What are known external dependencies for the source compile?
1. upx-nrv, libcurl3-openssl-dev, liblzo2-2, build-essential, kernel-headers, mtd-tools, ncurses-
dev, autoconf
Q: Compile. Hey guys it is great, How can I make my own one?
Answer:

1. Download source, (from Subversion at http://code.google.com/p/snake-os/source)


2. sudo su - became root
• Optional To adjust your kernel config:
1. Backup the "configs" folder
2. cp configs/str8132_defconfig_jffs2 kernels/linux/.config
3. cd kernels/linux folder
4. Export PATH to point to arm compiler. export PATH="path-to-source"/tools/arm-
uclibc-3.4.6/bin:$PATH
5. make clean && make menuconfig
6. Adjust your kernel settings.
7. Copy back kernels/linux/.config file to configs/str8132_defconfig_jffs2 file.
1. Execute "sh ./mk_snakeos_image.sh" in the top level directory
If the script aborts with any error messages you probably need some packages installed
to have development environment. See "Compile - dependencies" above for a list of
required packages.

mk_snakeos_image.sh script was made by Douglas which compile the kernel and make
root file system for JFFS, compress the binaries with UPX (which makes on the fly
decompiled binary)

Compiled firmware is here:

snake_os/release/ and tftp-capable image on output/

You could upgrade your NAS with your newly created custom firmware, under the
http://nasaddress/ under system/firmware menu

Q: FTP Write permissions problem for anonymous.


I have activated FTP. In FTP with anonymous only with write permssion.

Through samba i can read and write but by FTP i can only read. I haven't got write
permissions even though I have configured it in Snake OS.

Answer:
VSFTP root folder must have 755 but any sub folder for ftp write should have 777.

This can be done by using ssh to access the NAS and

chmod 777/usb/PATH-TO-FOLDER

Q: How to copy files from one mounted partition to another mounted partition?
Answer: Connect with SSH and run the command below. It will copy the files of
source_folder to dest_folder and log the output to log.txt (place outside the involved
folders).

nohup cp -av /usb/diska/source_folder /usb/diskb/dest_folder > /usb/diska/log.txt

This way, you can even disconnect the SSH client and the transfer will continue.

Q: Where is the source code / SDK of the STAR STR8131.


Answer: LSDK sources from cnusers forum: http://www.cnusers.org/

It needs free registration, which takes sometimes a few days.

Or download from here: http://www.megafileupload.com/en/file/206928/CNS2100-


LSDK-6-8-2-zip.html

Q: How to acces data of USB hard drive?


1. SMB via NAS (hdd is attached to NAS USB and NAS is accessed via SMB)
2. FTP - with any ftp klient. ex. Fireftp. 3. direct access via PC USB. use
http://sourceforge.net/projects/ext2fsd/ or http://sourceforge.net/projects/ext2read/
which can read even ext4 extents! 4. SCP - ssh based file management ex.: Winscp.

Q: What is the FTP/SMB performance on ext3 filesystem?

Write Read
Type
MB/s MB/s

FTP: 3-4 4-6

SMB
2-3 3 - 4,5
:
On NTFS the speed is MUCH_SLOWER!.

Speed on FAT almost as ext3, but not recommended.

Speed is much worst via wlan! less than 1MB/s !!

Use ext3 because it is fastest and safest, and SMB will hide which filesystem is under it.

Q: How can unrar files? Can I leave ssh session during unrar?
Yes. There is working ARM UNRAR for SnakeOs:
ftp://priede.bf.lu.lv/pub/Arhivatori/RAR/unrar/unrar-arm.tar.bz2

or here in download section:

1. tar -xvf unrar-arm.tar.bz2


2. copy unrar to nas sda1 root (/usb/sda1/) via windows share
3. ssh to snake
4. cd to directory where do you want to unrar files
5. nohup /usb/sda1/unrar e -r *.r*
it will extract all rar files from all subdirectories! nohup allows to leave ssh session
(without needing to be online.)

6. exit - leaving ssh.

Q: What is chroot? Why I need?


You can run hundreds of linux applications which are missing in the present SnakeOs.
(chroot is shell (a kind of sandbox) where you have debian libraries, and environment
within SnakeOS host.)

How can I do?:

Installation nehttp://code.google.com/p/snake-os/wiki/Debian_Chrooteds ~200MB disk


space on attached USB and only 5 easy steps to set up.

See documents here:

Q: How to save config in command line?


/usr/share/snake/config save
Q: How to make OPKG package ?
http://code.google.com/p/snake-os/wiki/Packaging
**************************************END**************************************
********************************************************************************

Q: Will it work with my internet provider (like Velox, Virtua, Speed and others)?
Yes. It doesn't matter what provider you have, it's necessary NAS be configured like
any other computer. Look at section about LAN settings.
Q: Which binaries can I download or compile to use with these NAS models?
You need to have linux ARM binaries.The processor is compatible with armv4t
instructions.
Q: My NAS will stop freezing when I install snake OS?
Original firmware has some problems related to CPU usage that causes freezing. This
problem was solved in Snake OS.
Q: What is the importance of using swapfile?
When system memory is full it will be necessary to use swapfile when applications
need more memory. When using swapfile you ensure memory requests will not be denied to
applications (like Transmission). If an application tries to allocate more memory than the
system have, your device can stop applications or freeze. A swapfile minimizes this risk.
Q: Is it possible to use USB hub?
Yes, you can use a USB hub and have more flash drivers connected to it.
Q: Does Snake OS support NTFS?
Yes, Snake OS supports NTFS for reading and writing. However, it could be a better
performance if you use ext3 or other Linux native file system.
Q: How can I know the version installed?
In the web admin interface, go to System -> Status, it will show OS version as "NAS
Version".

4.2 Troubleshooting

4.2.1. I've just updated to Snake OS but now my system doesn't start.
Check if the system led start. If not, you will have to make a serial connection to debug.
Refer to appendix.
If the system led start, it may have a cabling problem or your computer is not on the
same network as NAS. Refer to LAN Address section for info on how to setup your
network.

4.2.2. My system stop starting suddenly.


Try to disconnect it from network and power and check if the system led start when
restarted.

4.2.3. I can't see my NAS at Windows Network.


Provided your system is working and accessible by web admin interface, check Samba
workgroup settings, and if you are running SNAKE OS beta3, at least.

4.2.4. I can't access my NAS when I type its IP address at Windows, like \\192.168.0.240
It may have a cabling problem or your computer is not on the same network as NAS.
Refer to LAN Address section for info on how to setup your network.
Check if Samba service is started.
Check if you have user and password created on your device. When in samba "User and
Password Mode", the computer only show NAS shares if authenticated.

4.2.5. I can't update firmware because Snake OS says binary file is invalid
File may be corrupted. Try to download it again.
Check if you are running the correct firmware image. Refer to Updating firmware section
for details.

4.3 How To set up a serial interface


This how to will help you to set up a serial connection with the NAS 652. This method is
based on the information taken from DealExtreme NAS google group

4.3.1. Hardware setup


The first thing you have to do is open the NAS in order to find the serial connection pins.
This picture taken from the group’s files area shows where the pins are and their functions.

You will need to connect the pins GND, Tx and Rx to a TTL serial cable. This means that
the voltages used to transmit the information will be 0 volts to represent bit zero and 5 volts
to bit one. You MUST NOT connect a RS232 serial cable directly. The RS232 standard
interface uses a voltage range between +5 and +15 volts to represent bit zero and -5 to -15
volts to bit one. This RS232 voltages will burn your NAS.

So, you have basically two options:


1) Use a serial cable that uses TTL voltage levels;
2) Build a RS232 to TTL level converter. This is a simple circuit based on the well known
and easy to find chip MAX232. You can easily find a circuit like this in web.
For example: http://pinouts.ru/Converters/rs232-TTL_cable_pinout.shtml
If you choose the option 1, the easiest one, you will find a suitable cable in dealextreme, like
the one posted by JG on 2009 May 4: http://www.dealextreme.com/details.dx/sku.13638

This cable is used for Nokia cellphones. It is basically a USB to serial converter without the
MAX232 chip to convert the voltage levels to RS232.
The picture below shows this cable. In this picture, the cable end that would connect with
the cell phone was cut off and changed by a female pin connector (like those ones used to
connect the front panel leds in a PC motherboard). In the NAS board holes the male pins
was soldered.

This is a closer look at the usb connector end:


As can be seen from the above picture the pins names are labeled on the circuit board.
So, you just have to connect the Tx wire (green one in this picture) with the with the Tx hole
in the NAS circuit board. The same applies to Rx (blue wire) and GND (white wire).
That is all the hardware you will need to connect your nas on an usb port of your PC.

I have cut off the cable end that would connect with the cell phone and changed it by a female pin
connector (like those ones used to connect the front panel LEDs in a PC motherboard). In the NAS
board holes I have soldered the male pins. The cable colors are -from left to right-
1. (GND) Black - Nearest to CPU black colored on the picture - (CPU is hidden under the
coin)
2. (TX) Red
3. (RX) White from usb cable soldered to yellow wire.
4. (Vcc) -Not connected.
You just have to connect the left 3 pins.
(note by ehabkost, Oct 7th 2010) The cable colors from the USB cable may not match the colors on
the picture above. For a CA-50 cable bought from Dealextreme on September 2010, the cable
colors were: 1. (GND) yellow; 2. (TX) blue; 3. (RX) red.
That is all the hardware you will need to connect your nas on an usb port of your PC.

4.3.2 Software setup


Using Windows XP
After plunging the usb-serial cable, your computer will automatically install a new COM
port.
In my case it was COM3. Firstly, you should verify what port was created in your case.
To do this:
1. right click on “My computer” on desktop or windows explorer.
2. Click on “Properties” and choose the tab “Hardware”.
3. Click on the device manager button. A list of all your hardware devices will show up.
4. Expand the “Ports (COM and LPT)” to see all the ports you have available.
The port created when you attached the usb cable should be there like something as
“Prolific USB to serial converter (COM4)”. In this example it was created the serial
port COM number 4. This port number may change depending on the usb port that
you connect the adapter.
Now you have to set up the connection. In windows you can use the Hyper Terminal
program. You will find it on StarMenu/Acessories/Communications.
5. Open Hyper Terminal.
If you have not used it before, it will ask you some informations
about your contry code and phone area code.
6 Cancel this (press cancel, yes and ok) and
you will get something like this (the windows used to obtain these screenshots was in
Portuguese language)
7. Give a name for your new connection and press OK.
You can cancel again if it asks the country and area code. After that you will see
something like this:

8. Choose the port that was assigned to your usb cable and press ok.
9. On port configurations you have to fill the fields with the serial connection parameters or
the NAS chipset, that are:
Bits per second: 38400
Data bits: 8
Parity: None
Stop bits: 1
The flow control field you can leave it with the default value.
Now you have just to connect the serial cable on NAS and turn it on. You will see on Hyper
Terminal screen the boot and kernel messages. You can press any key during the uboot start
up to have the uboot terminal.

Using Ubuntu 10.04 - Lucid Lynx.


After plunging the usb-serial cable, your computer will automatically install a new COM
port. Open a terminal, and type "dmesg" command.
# dmesg
pl2303 2-2:1.0: pl2303 converter detected
usb 2-2: pl2303 converter now attached to ttyUSB0

In my case device was /dev/ttyUSB0


Now you have to set up the connection. In Linux you can use the MINICOM Terminal
program. You can install it with
# sudo apt-get install minicom

Then run minicom with the following parameters:


• Bits per second: 38400
• Data bits: 8
• Parity: None
• Stop bits: 1
# minicom -D /dev/ttyUSB0 -b 38400

Your connection is done.


Now you have just to connect the serial cable on NAS and turn it on. You will see on
Terminal screen the boot and kernel messages. You can press any key during the uboot start
up to have the uboot terminal.
.

BLANK

You might also like