The first step is to get yourself a Linux environment. I suggest using a noob friendly build like Ubuntu. You can use it as live distro, install it, or create a virtual machine. As this is a total noob guide, I am inclined to think all of you reading this come from windows, so the easiest way is to make a live cd, live usb, and work from there, I suggest using Ubuntu. For this guide to work correctly, or just to work, you need internet connection.
2. Once on Linux, connect the usb drive you want to format.
Setting up your usb drive correctly
If you just want to share your drive, and not install Optware, skip this.
1. Go to system, Administration and Gparted Partition Editor, if you haven’t got it installed, install it through synaptic package manager.
2. Select you drive on Gparted, and now Delete all partitions.
3. Create a new partition with 512mb using linux-swap format, and call it SWAP (if you prefer using other names on the partitions, feel free to use them, but remember to change them everywhere where you see the names I use)
4. On the space left you have two options, make a big partition with all the space, to share and install optware, or make different partitions one to share, and the other just for optware ( I suggest using one big partition for everything, and then on the nas, jus show the folders you want restricting the access, or eliminating visibility)
If you want to follow my approach you'll have to select the unformatted space and create a new partition, name it OPTWARE, use ext3 as format (if on pendrive use ext2).
5. When Gparted finishes, unplug extract the drive and plug it in your router.
Set Tomato to work with your drive
1. Log into your Tomato router, go to USB and NAS and check Core USB Support, USB 2.0 Support, if you are going to use usb 1.1 also check those boxes, the same as usb printer support, just if you are going to use it, check the filesystems that you will be using, in this case if you did what I said and aren’t going to plug any other drives, just check Ext2/Ext3.
Also check Automount.
If you dont want to install Optware, and just share your drive you are done, skip this.
2. Nice now you should see at the bottom of the page on attached Devices, your drive, with the partitions you made, you'll see swap is not mounted.
5. Now lets introduce our custom Fstable, copy the selected to the opened table with the right click and paste (If you have more partitions or drives, or different naming scheme, mount their labels accordingly, and don’t mount for example two different drives on /opt at the same time!, also remember, all this is case sensitive).
Congratulations, now you are ready to start installing optware and start setting up your nas samba share, ftp, media server etc.
Tweak your usb HD
Lets add spindown if possible and modify swapiness on tomato.
1. Log on tomato web ui and go to USB and Nas, File Sharing, enable file sharing with no Authentication to start, when finished change it as you like, and add access to /opt or /mnt if you don't want optware.
2. Log on telnet or ssh to your router, and type:
You should hear your drive spinning down.
3. Now go into your share and copy something or open something and you will hear the drive spinning up.
4. Try again spinning it down and then up for a few times, to make sure everything is OK.
If your drive is not compatible it wont work, just forget about it and continue.
5. Optional, in telnet or ssh typing:
dmesg | tail
You can look at the kernel messages. Make sure there are no scary warning/error messages about USB drives or devices.
and paste the sd-idle-2.6 somewhere on your /opt or /mnt partition.
13. Go to tomato web ui, into administration, scripts and Init.
Input the following:
/opt/any folder you created for the program, or not/sd-idle-2.6
/mnt/any folder you created for the program, or not/sd-idle-2.6
For example my script looks like:
Remember to type the folders exactly as their name is, with lower and upper case letters.
14. To make sure you have permission to autorun the file type on telnet or ssh:
chmod +x /opt/(or /mnt)any folder you created for the program, or not/sd-idle-2.6
chmod +x /opt/share/spindown/sd-idle-2.6
15. Now reboot. To change settings on the idle program, if you used the same directory setup as I did use this, if not change accordingly:
root@unknown:/tmp/home/root# cd /opt/share/spindown
root@unknown:/opt/share/spindown# sd-idle-2.6 --help
Usage: ( runs as a daemon )
sd-idle-2.6 [ -d devices ] [ -i idletime ] [ -c checktime ] [ -h --help ] [ -v --version ]
-d [a-z]+ include where a => /dev/sda, b => /dev/sdb (default is all disks)
-i n n seconds a disk must be idle to spin it down (default 900, min 300)
-c n n seconds to sleep between idle checks (default 30, min 5)
-h --help usage
-v --version version
sd-idle-2.6 will manage all disks with default times
sd-idle-2.6 -d bc will manage /dev/sdb, /dev/sdc with default times
sd-idle-2.6 -d !bc will manage all disks except /dev/sdb, /dev/sdc with default times
sd-idle-2.6 -i 600 will manage all disks spinning down after 600 seconds or 10 minutes
As you can see, for example if you type:
cd /opt/share/spindown/sd-idle-2.6 -i 600
Your drives will spindown with 5 minutes of inactivity, the minimun time accepted.
16. Now lets change swapiness, all this is of course is optional.
Swapines is how linux determines when to start swaping pages to swap, I have mine set to 75, so when my memory drops down to 75 avaylible, tomato starts swapping.
To check your swapiness type on telnet or ssh:
17. To change your swapiness for example to 75 type:
echo 75 > /proc/sys/vm/swappiness
When rebooting this seting will be lost and it will be reverted to default swapiness.
18. To make the changes we are doing permanent the easy way, go to tomato web ui, into administration, scripts and Init.
Input the following under the already written:
echo 75 > /proc/sys/vm/swappiness
Some people like this value low so their ram is kept fully usen and everything is snappy, I like it high so that tomato uses the Ram for what is really important, you can play with this number and see how it goes.
19.Reboot. Your done.
If you are sick of having to log into telnet or ssh each time, try this method:
Unzip the file in a folder and open Puttykygen, generate a key, and dont give it a password.
Click save private key, and save publick key, and save both, dont close Puttykygen yet.
Now go into tomato webui and into admin access.
Enable SSH Daemon enable at startup and Allow Password Login, now go to Authorized Keys and copy all the key from Puttykygen, from the first number or letter to the las you see, and save.
Go to putty, type your router ip, select ssh, now go to Connection, SSH, to Auth, and on Private key select your previously saved key.
Now go to Session, on Saved Sessions type a name for this config (I have it as TOMATO), and click on save.
Now create a shortcut for putty, right click on it, properties, and at the end of the path type -load "TOMATO" (or the session you just created), apply, accept, and your done, you can now enter tomato without logging in, and with a little security.
If you dont need remote access to ssh, disable it, I think this approach is much more safe, than adding the hostname, username, and password at the end of the shortcuts path.
Installing the prerequisites for optware
1.For optware installation, first we need ipkg and Uclib, for this just type the following on telnet or ssh:
Once u’r done press esc twice and type:
You can also modify them if you have share enabled on /opt with a program like WinVi32, don't use notepad because when saving will make the file to loose format.
Remember to disable whitelist or to add your ip, or your lan (192.168.1.*) if not you wont be able to access the webui.
4.You can add a torrent watch folder adding and replacing this lines at the bottom of the config file:
Remember you can change download folder, activate and change incomplete download folder, etc.
Samba File sharing
To enable file sharing through samba (accessible on all oses) go to:
1. Tomato web ui USB and NAS, USB Support, File sharing, and enable file sharing, with or without authentication, that’s up to you, (for the first try ill try without authentication).
2. At the bottom of the page, you can mount the directories, or partitions you want to be seen or shared, and you can select to make them visible or not, writable, or not, etc, is quite self explanatory.
I usually create a folder on /opt, called optware, through telnet:
Then mount /opt/optware, and name it share, make it read/write and not hidden.
Then I access that folder and create Downloads, Uploads, Torrents, Incoming, folders and set my optware to use those folders accordingly.
3. If you are not using Optware and haven't configured manually your drive partitions (they are being managed by automaunt), your partition should be mounted as /mnt, so create folders on it, and make them visible through the method I exposed, or make visible all the partition.
Tomato has an integrated FTP sever, so it is really simple to set it up within the gui, im adding this small tuto as some people have had problems setting up FTP….. allthough its pretty Public Root Directory.
Open tomato's web ui and go to USB and NAS, FTP server.
Once there you must select to enable the FTP server on Lan or also make it viawable on WAN.
Select your ftp port (I suggest leaving the default 21), and forward it if you want it to be seen on Wan. To forward it just go to port forwarding, basic, and on ext ports, type 21, on Int adress type 192.168.1.1, on description, name it as you like (FTP).
Now select if you want anonimus users to acces, to read, read and write, or just write.
I wouldnt allow Admin login, just my grain of salt.
On Directories select what directories you want who to see, for example I've got as Anonymous Root Directory: /opt/optware/Uploads, as Private Root Directory: /opt, and as Public Root Directory: /opt/optware (private will create an exclusive directory on the directory and partition you select, with the name of the private user, and he/she will only be able to see that folder).
Enable the limit connection attemps.
Add users at the bottom of the page, and you are done with the basic config (private is on the same menu as read/write, etc).
1.To setup a Media server go to:
USB and NAS > Media Server tab and click on Media / DNLA Server and click Enable.
2. Once you have it enabled, you need to decide and setup where the database is saved for you media and other options. If you have very few music, pictures or videos then you can leave everything at default and just turn on "Scan Media at startup" and reboot.
3. If you have many media to share you will be better of designating a location on your “usb hd” orr jffs (I recommend doing it on your usb), to save the database, so create a Custom Database Path.
Doing this will ensure that you have enough space for your database.
4. On Database Location select "Custom Path" in the drop down box, and then enter the path to your hard drive, I suggest you create an specific folder for your database.
Depends on your config.
You can use any name you wish for the folder.
5. If you have a Tivo you can click on the Tivo Support and your Tivo will be able to connect to your hard drive and play TiVo compatible videos, music and display pictures.
6. The Strictly adhere to DLNA standards will allow server-side downscaling of very large JPEG images, which may hurt JPEG serving performance on (at least) Sony DLNA products.
I recommend leaving it off unless you are having a particular issue with Jpeg images.
7. On media directories if you want the whole hard drive to be scanned for media you can leave the directories at the default setting of /mnt or /opt
If you want to restrict the scan to specific directories or types of media then you can specify the type of media and the directory to scan specifically. The directory has to be exactly entered.
/mnt/videos Video only
/opt/videos Video only
8. Once you have everything set then click on Save.
Depending on the amount of files you have to be scanned and their types it could take some time for everything to show up on your DLNA client. In addition, depending on what DLNA client you are using you may need to force a re-scan on it also.
Specific optware guide requests
If you want an specific optware guide ask for it here: