Showing posts with label Computers. Show all posts
Showing posts with label Computers. Show all posts

Monday, July 11, 2011

Setting up the Dreamplug

Just recently I got a Dreamplug from Global Scale Technologies. It is pretty cool in that it only draws 5W of power and comes with plenty of processing power and features for all sorts of things. It is initially designed for prototyping for full scale products. However it is great for the hobbyist to mess with and have a lower powered computer for servers, voip, etc.

In my case I got one to primarily act as little home server for file sharing, ssh, printer sharing, and scanner sharing. Eventually I would like to deploy one at the studio for backups and archiving as well. In the past I have used old desktops, but my latest one died and I got tired of paying the money to run a whole machine that sits idle 90% of the time. But as with anything the 10% of the time I need it, I need it, so it is definitely worth keeping around.

These are just some notes of things I ran into and I hope someone will find useful. I know I will on the next round with one of these.

Of course the website and user guide pretty much has zero information on it. At least it has nothing very useful. It mainly talks about the ports and interface and such.

In the box you get way more that it seems. The power supply can disconnect and be run with a DC cable. It can act as a brick or you can use another power cable. It comes with sliding connectors allowing you to switch. It also comes with cover plates for exposed contacts and a Cat5e network cable (which will handle gigabit).

Mine came preloaded with Debian Lenny. I was expecting it to have Ubuntu. Not sure what is going on there. Seems that many pre-shipped with Ubuntu, but mine is Debian, so no clue. But things did work out of the box. I am more of a RedHat guy and got spoiled with the GUI's in Ubuntu. So Debian (even though closely related to Ubuntu) is different enough to be a little slow going.

Since it came preloaded it was already partitioned and everything. It looks to have about 2GB of onboard storage which is nice. It starts up as a wireless access point as you can see from /root/init-setup.sh. It also starts up Samba, SSH, Bluetooth, FTP and (attempts) lighttpd. The AP is automatically set up to bridge to eth0 which is DHCP. It also boots at runlevel 2.

To get on the machine, I had eth0 DHCP and I picked it up off of my DHCP server. You can ssh in with root and the default password (check the UserGuide for it).

Oh and BTW, the LED's are obnoxiously bright. If you look in the init-setup.sh script and the wlan script, you can see how to turn them on and off. But not sure how to dim them and definitely not how manipulate the power one. May need some opaque tape for that.

So for my setup first things first:

  • Change root passwd
  • Turn off the AP by running wlan.sh
  • Remove it by commenting out /root/init-setup.sh in /etc/rc.local. That will also turn off bluetooth. On reboot, it will be LAN only.
  • Set a static IP for eth0. Since mine will just be a server (already have a firewall/router) there is no need really for eth1 or wireless. So you have to edit /etc/network/interfaces and change it to static with the right address, gateway, and netmask. However a bit of a gotcha is that ifplugd will stomp on it. So you must take out eth0 out of /etc/default/ifplugd. More information available here: http://www.newit.co.uk/forum/index.php/topic,1960.msg5610.html#msg5610.
  • Change hostname in /etc/hostname
  • Oh yeah and install NTP (aptitude install ntp) which defaults to the debian pool. Then change the timezone: dpkg-reconfigure tzdata

After that initial round, that at least takes care of the tricky stuff. After that it should all be regular *nix stuff.

Other stuff I did:

  • Installed LAME which wasn't as trivial as I had hoped. Added "deb http://www.debian-multimedia.org/ lenny main" to /etc/sources. Then I had to add the GPG key "gpg --keyserver pgpkeys.mit.edu --recv-key 07DC563D1F41B907" then "gpg -a --export 07DC563D1F41B907 | apt-key add -". Then "apt-get update." Took a few rounds of this to get some of the additional keys and I had to comment out a local apt repository from global scale. Then trivially "apt-get install lame" More information about getting lame from here: http://parabans.com/howto-install-lame-mp3-ripper-on-debian-linux-using-apt-get/. (Lame is slow as shit on this box BTW)
  • Installed smbclient (apt-get install smbclient) which then updated the rest. I decided to swap out the smb.conf file with the default one since it has comments that act as documentation.
  • Installed nmap, mainly to make sure I close all the right ports. Right now my only linux machine is a netbook with a crazy small keyboard.
  • Removed mysql from the startup scripts then uninstalled ( update-rc.d -f mysql remove, etc. apt-get remove mysql-common, etc.)
  • apt-get autoremove since there were some packages it was complaining about.
  • Added Cups Printing: http://wiki.debian.org/SystemPrinting
    aptitude update
    aptitude install cups cups-client hpjis
    aptitude install links
    links http://localhost:631/
    
  • Then added Scanner Sharing
    aptitude install sane
    ... bunch of configuration
    
  • Installed and configured samba

Performance specs are decent depending on what you are doing. Anything using the memory cards is dog slow. Off of an Esata Hard Drive things are much better. Samba speeds are excellent, it also does great as a scanning server. SSH under high loads is pretty slow (ie. sshfs). I set up a squid server and changing the default cache directory to hit the Esata drive makes it much much faster. I tested some basic MP3 compression and file compression tests, they are also slow.

Essentially this thing is geared for I/O such as a NAS or router. While it will work doing some CPU intensive stuff, don't hold your breath. Excellent for a power efficient small server with great I/O. Pretty happy with what it will be doing for me.

I will be posting more tests regarding SSH port forwarding and web page delivery as time progresses.