GuruPlug – Part 2

Powering on the GuruPlug was pretty straightforward. Turn the socket on, lights flash, network connects, job done.
However, not being provided with any documentation, I was left out in the cold as to how to access it.
As I expected, it was configured to use DHCP be default, so I was able to find it’s IP address from my router. However, I was never furnished with the root password. Luckily for me, someone had created a GuruPlug Quickstart guide on the wiki, which contained this nugget of detail (I’ve since changed it, in case any opportunistic crackers are reading).

sheevaplug-debian:~# cat /etc/apt/sources.list
deb lenny main contrib non-free
deb stable main contrib non-free
deb lenny/updates main contrib non-free
deb lenny-backports main contrib non-free
deb binary/

The GuruPlug ships running Debian “Lenny” 5.0 with a minimal set of packages. The enabled repositories include the standard Debian binary repos, plus and, bizarrely, a WiFi driver repo pointing to a 10.x.x.x address, presumably left over from the factory install. Disable that, then.

sheevaplug-debian:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 251M     0  251M   0% /lib/init/rw
udev                   10M  708K  9.4M   7% /dev
tmpfs                 251M  4.0K  251M   1% /dev/shm
rootfs                463M  207M  256M  45% /
tmpfs                 251M   23M  229M   9% /var/cache/apt

The base system takes up about half of the 512MB internal flash. Having attached a 1TB hard drive, it only seems sensible to expand the available space somewhat.
I won’t go into the nitty gritty, but suffice to say I used LVM for flexibility, and put /home /usr and /var on their own partitions.

Now that I had somewhere to put a home directory, next step was to create a user. The ‘Plug only comes with the root user setup, and logging in as root is poor form, so I set myself up a user with sudo privileges.

A quick reboot to make sure everything’s working and… Oh, wait a minute… it stopped connecting to the network. No worries because whenever you reboot it reverts the wireless to Access Point Mode. Except… that didn’t work either. And no remote access means no log in. Ah.

It turns out that I needed to buy one of these JTAG boards in order to access the GuruPlug’s serial port. Remember that USB cable I mentioned in part 1? Turns out that the JTAG plugs in to the ‘Plug and acts as an adapter. If you clicked that link, yes you’re reading it right, that’s £30 to get access to my own device.
Suffice to say I wasn’t overly chuffed by the situation. The NewIT website implies that there’s some sort of Mini-USB connection to the device itself (as was the case with the SheevaPlug) and the only indication otherwise was in the documentation that I was emailed 2 days after I received the device.
Fortunately for me, NewIT saw my point of view on this and offered my a discount on the board, which I gratefully accepted. But please be aware that if you’re looking at getting a GuruPlug for anything other than it’s out-of-the-box functionality, buy a JTAG board too!

So, a day after my email discussion with NewIT’s customer services, I got my JTAG board. Here it is:

I hooked the funny wiry connectors to the ‘Plug and the USB connector to my EeePC, an connected through Minicom

On rebooting, I could see that the LVM devices weren’t being found. I’m not sure exactly why this prevented it from connecting to the network, but I’m guessing there’s something important in /usr or /var that it couldn’t access.
After a few posts on the HantsLUG mailing list and analysis of the boot messages, it turned out that the USB disk wasn’t being “found” by udev until after LVM had initialised and scanned the Volume Groups. This in turn meant that the logical volumes weren’t active when they needed to be mounted, leaving me without a /home /usr or /var.
The mailing list and some Googling told me that most distributions had solved this problem with udev rules that re-scan the volume groups when a new device is discovered, but Debian doesn’t appear to have gotten there yet (at least, not in Lenny). I’m no master with udev rules, but I do know my way around an init script, so I modified /etc/init.d/ (the script that mounts everything in /etc/fstab) to manually re-scan the volume groups before it tries to mount. It’s not pretty, but it works.

vgscan # re-scan the Volume Groups
vgchange -a y # Activate the Logical Volumes
if [ "$VERBOSE" = no ]
        log_action_begin_msg "Mounting local filesystems"
        log_action_end_msg $?
        log_daemon_msg "Will now mount local filesystems"
        log_end_msg $?

So, now I can get back to business setting up the software. Join me again in part 3!

Guru Plug – Part 1

A few months ago I pre-ordered a GuruPlug, GlobalScale‘s new plug computer, and the successor to the SheevaPlug.
I’ve been wanting to run a home server for a while, to act as a web server as well as performing a few other always-on functions, but I’ve not been willing to pay the cost of running my desktop 24/7. Drawing under 5 Watts of power, the GuruPlug satisfies this need perfectly.
On Friday I finally received an email telling me my GuruPlug had been shipped, and on Saturday it arrived in the post.


The idea of plug form-factor machines is that everything is housed in the plug, that is to say, a block about the size of a plug with an integrated power transformer. Think along the lines of an Ethernet-over-mains adapter.
In the GuruPlug Standard, you get:

  • A 1.2 GHz Processor
  • 512 MB of RAM
  • 512 MB of NAND Flash
  • Wifi b/g
  • Bluetooth
  • 1 GB Ethernet Port
  • 2 USB 2.0 Ports
  • U-SNAP I/O for home automation devices

In the “Plus” model, you get an additional GB Ethernet port, a MicroSD slot and an eSATA interface.


GuruPlug Box
Upon opening the bag the ‘Plug shipped in, I was expecting a nondescript corrugated affair to await me inside, but instead I was presented with a rather nicely printed box, with a satisfying magnetic catch holding the lid shut.
Opened GuruPlug Box
Unpacked GuruPlug Box
Opening up, the box contains

  • The plug
  • A 3-pin adapter for plugging directly in to the wall
  • A 2-pin adapter for attaching a longer cable, if you want to sit the plug on a desk/shelf/etc
  • Said longer cable with a 3-pin adapter
  • A USB to Mini-USB cable (The Plug aparrently has a Mini-USB interface on the site, but with a non-standard connector and no adapter provided)
  • A Cat5e Ethernet Cable

A notable omission from this contents list is any sort of setup instructions or documentation whatsoever. Not such a good start.


Guruplug next to a tape measure and deck of cards
Here’s a quick indication of the size – the unit’s about 10cm long, slightly wider and longer than a deck of cards, and about as deep as 3 stacked on top of each other.


Assembled GuruPlug
Here the plug’s been assembled with the 3-pin adapter, ready to go.

GuruPlug in a wall socket with connected peripherals
I’ve hooked up the Plug to a 1TB hard drive in a USB enclosure, to allow me to use it for NAS/UPnP functionality. I’ve also plugged it into the router. As you can see it’s a cheap-as-free Netgear Special from my ISP, and the WiFi’s a tad dodgy, so while I could just connect the Plug wirelessly, I’d rather the security of the wired connection.

Close-up of powered on GuruPlug
Powering on, you get a nice display of LEDs on the front of the unit. Lacking any documentation, I don’t know what any of these mean, by they look pretty cool. Also note the decision to print the logo such that it’s upside down when plugged directly into the wall.
It’s notable that the Plug is completely silent when powered on. Unfortunately I can’t say the same for the hard drive.

So the hardware set-up’s all gone pretty well. Join me in part 2 for the software setup!