So, this is a little different than my typical entries, but I feel I owe it to the open source community that has helped me through so many Linux related issues. This is the How-To on getting Dropbox to work on a Netgear Readynas Ultra (this guide should work with the Pro, NVX or any other x86 based Readynas).
Step 1) Prep
- Load in your hard drives.
- Let the Readynas format the drives (takes a couple hours). I used X-Raid 2, seems like the way to go.
- Go through setup: Make note of the IP address you select (probably want to use static IPs, write it down). Going forward, Ill refer to the readynas as being on IP 192.168.x.x
Step 2) Getting SSH Locked and Loaded
- Download the Bin for ToggleSSH (http://www.readynas.com/download/addons/x86/4.2/EnableRootSSH_1.0-x86.bin)
- Upload the Bin in //readynas/admin > System > Update > Local tab. It will verify, then install.
- Boom! You have SSH. Now some Linux CLI.
Step 3) Getting into the Readynas Command Line
- Open up a Terminal (preferably Linux, or Mac, but Windows should work too). Note: Below are the Linux commands, may be different than other OSs
- Enter command: $ sudo ssh 192.168.x.x Enter in your sudo password (local machine) and then it will ask for your root password on the Readynas. The root password is most likely netgear1 (for some reason, the su password is the t-1 password for admin access on your Readynas. So, the original password is netgear1 then you changed it in the setup to 12345. 12345 is your admin password, but SSH still uses netgear1 as the root password (further more if you change your password again to 54321 than the SSH password will be 12345. Weird, but thats how it is on my Readynas Ultra despite what the documentation says that the Admin and Root passwords are the same).
- NOTE: SSH may give you some jive. Just click yes. If you ever have to reset you readynas and you try logging into SSH again, it will give you a security error. Check this article out on how to get through the RSA check:
http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html
Step 4) You are in!
- Now, its time to get Dropbox cooking here is the step by step (Source:
http://forums.dropbox.com/topic.php?id=9454)
- $ useradd -d /c/dropbox -m dropbox
- $ su - dropbox -c "wget http://www.dropbox.com/download?plat=lnx.x86"
NOTE: Make sure that the file downloaded ends in tar.gz. If not, just enter the command again, it should download
- $ su - dropbox -c "tar zxvf dropbox-lnx.x86-1.0.10.tar.gz"
NOTE: Change dropbox.lnx.x86-1.0.10.tar.gz to whatever file downloaded in the step above. This is important for when a new version of dropbox comes out.
- $ su - dropbox -c "env LD_LIBRARY_PATH=/lib64:/lib:/usr/lib:/usr/local/lib .dropbox-dist/dropboxd &"
- Now a link should be popping up (may need to wait a minute). Cut and paste it into the browser on the local machine. Enter your credentials for dropbox, and now your readynas will be linked.
Now its a good idea to see if everything is running: First try:
- $ ps auwx |grep dropbox
You should see two entries, one that says grep and the other (top one) should be dropboxd. If not, trying running the last command above again. Also you can use this command:
- $ df -k
Run this command a couple times, just make sure that your primary drive is increasing in size.
Okay, you are all set. /c/dropbox/Dropbox should now be increasing in size. You can try to run a script to automate the start process (Here: http://forums.dropbox.com/topic.php?id=9454) I just chose to run
$ su - dropbox -c "env LD_LIBRARY_PATH=/lib64:/lib:/usr/lib:/usr/local/lib .dropbox-dist/dropboxd &" every time I restart the machine (which is rare anyways).
Step 5) Accessing your Dropbox on the network
Now, one annoying thing with this is that the /c/dropbox/Dropbox isn't really a standard share. So if you want to access it it will ask you for credentials (admin:12345 if you use the example above). Which is fine, especially if you are fine with the name of the folder being Dropbox.
So everything is now working. There is one final bonus step:
Bonus) Changing the Dropbox Directory and making Dropbox a standard Readynas Share.
So this is a cheater step for me. If you are savvy, you can install a C library, then a Python library and then download a python script to run that will allow you to change the directory to one of the Shares on the readynas (its all here: http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall)
But I have a cheater way: Modify the fstab and get the /c/dropbox/Dropbox folder to mount as a network share.
- Suppose you want dropbox to be in a share on the Readynas called Business. SSH into your Readynas (same as above) then follow these steps:
- $ sudo vi /etc/fstab
(Opens the VIM based editor, full list of commands here:
http://www.tuxfiles.org/linuxhelp/vimcheat.html)
NOTE: One newbie thing to note with vim is that you will want to hit the "insert key" when ever you want edit a line of the file and hit the ESC key when you want to save or quit.
- Enter the line (use arrow keys to get on a line with a line entry, hit insert, hit enter, and you should have a fresh line): //192.168.x.x/c/dropbox/Dropbox /c/Business cifs default,username=admin,password=12345,workgroup=WORKGROUP 0 0
NOTE: Of course change 12345 and workgroup to your settings. Capitalization is important. Check and double check the line, while I didn't brick my computer on this step, it is very possible to do so.
- To save and exit from vim do exactly this (dont think about it): Hit ESC > :wq > ENTER
- $ mount -a
If you don't see any errors after you hit mount -a, you should be all good. If you see some errors, consult the internet and correct. From now on, your dropbox folder will be replicated in your Business share. A few more notes:
- Positive: This is easy (way easier than loading a C, python library, and a script).
- Positive: Very reliable and robust (this will work even if you update dropbox, etc)
- Negative: I believe you are making actually two copies on the drives, not the big of a deal for 2gigs of data, but if you have a 50gig dropbox account, than this method probably wont make sense.
- Negative: You are using modest amounts of intranet bandwidth to update the network folder. I've tweaked this and actually have the readynas connect to the Dropbox folder via the second Ethernet port (the readynas ultra has two ethernet ports in the back). Not sure if this makes a difference, but it does in my mind.
Hope this helps some newbie like me out. Leave questions in the comments.