DockStar
What's a Dockstar?
Seagate's Free Agent DockStar is a very cheap, nifty little Linux machine with the following features:
- 1.2 GHz ARM processor
- 4 powered USB 2.0 ports broken out like so:
- 1 port with a USB mini A connector centered in the drive cradle section of the case allowing the user to just plug in a Seagate FreeAgent Go hard drive
- 3 ports with type A connectors (as you'd find on a mouse, keyboard, or USB flash drive)
- 1 Gigabit Ethernet NIC
- $20 price tag
- HiFN 795x crypto accelerator
- User replacable firmware (it comes with PogoPlug from the factory — the device is intended as a NAS)
It does have a few small annoyances:
- Only 128 Mbytes of RAM (256 or 512 would be so much nicer)
- No battery backed clock (but that's what NTP is for, anyway)
- Serial console is (somewhat) hard to get to (but the bootloader and Linux can use the normal Linux network console setup)
- It runs PogoPlug instead of a general purpose OS.
But it costs $20. So these annoyances are overlookable.
DockStar OS options
There are a number of options for replacing the PogoPlug OS on a DockStar: OpenWRT supports them. Plugbox Linux does, too. But I'm a Debian fan, so that's what I'm running on mine.
Jeff Doozan has done much of the legwork making Debian an easy option on a Dockstar. He has a procedure for installing a new bootloader, kernel, and root filesystem into the Dockstar's flash and bootstrapping a Debian installation onto a USB mass storage device attached to the Dockstar (thumb drive, jump drive, FreeAgent Go, portable USB hard drive or whatever) without breaking open the case and fiddling with a serial console.
Before Installing Debian
Here's the procedure I used to used when putting mine together:
- buy a Dockstar (actually used some Amazon credits to buy three of them for $20 each a few months ago)
- get some USB flash drives (found some 4Gbyte Sandisk Cruzers for $8 each at a local office supply store. Wonder why the 8Gbyte USB drives cost 4 times more instead of 2 times more)
- unbox Dockstar, note Ethernet MAC address from sticker on bottom of the case
- pick an IP address to give it (internal home network is 172.16.0.0/24 and I don't want the Pogoplug firmware phoning home before I've replaced it with Debian)
- set it up with a static IP address on the home network (quick edit to /etc/dhcp/dhcpd.conf)
- prevent IP from the dockstar from reaching the internet (
sudo iptables -I FORWARD -s 172.16.0.200 -j REJECT
on the router) - attach Dockstar to Ethernet switch, power it on, wait until it is pingable
- Make sure we can log in to it:
ssh root@172.16.0.200
(password should bestxadmin
) - Kill the Pogoplug proprietary processes running on the machine:
# killall -9 hbwd; killall -9 hbplug
- Make a backup of the factory firmware (instructions can be found at How to brick your Dockstar and void the warranty
Installing Debian
Jeff Doozan has done me a great service here. At his web site, you'll find instructions on getting Debian installed on a USB mass storage device (a 4Gbyte Sansisk Cruzer in my case). Here are some notes on my installation:
- The Pogoplug OS is used to perform the installation on the Dockstar. It needs to be working first.
- The Pogoplug OS needs internet access to download the Debian bits. But we still don't want Pogoplug phoning home, so be sure the
hbwd
andhbplug
processes aren't running before allowing the device to have internet access. - Jeff Doozan recommends making the Debian filesystem at least 512Mbytes in size. The base OS installed by debootstrap consumes about 300 Mbytes of space. I made mine 512Mbytes, followed by 512Mbytes of swap partition. Later on, I'll make the swap partition into a backup root partition, turn the remaining free space into an LVM physical volume, and slice that up until I'm happy with it.
- The installation target here is a 4Gbyte Sandisk Cruzer USB flash drive. It has been partitions like so:
# fdisk -lu /dev/sda Disk /dev/sda: 4000 MB, 4000317440 bytes 64 heads, 32 sectors/track, 3815 cylinders, total 7813120 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 * 2048 1050623 524288 83 Linux /dev/sda2 1050624 2099199 524288 83 Linux /dev/sda3 2099200 7813119 2856960 8e Linux LVM #
(Note that this partition layout does not show the sda2
device as being a swap partition. This was changed after the installation was done. Post-installation, sda2
was made into a regular filesystem with the backup insatllation on it. This allows me to specify that /dev/sda2
should be my kernel's root device (instead of /dev/sda1
) and fix whatever brain damage I've inflicted on it.
- Remove the
iptables
firewall rule that prevents the Dockstar from reaching the internet (Runsudo iptables -D FORWARD -s 172.16.0.200 -j REJECT
on the router.) - After the USB flash drive has been partitioned, it's time to run Jeff Doozan's installer:
cd /tmp wget http://jeff.doozan.com/debian/dockstar.debian-squeeze.sh chmod +x dockstar.debian-squeeze.sh export PATH=$PATH:/usr/sbin:/sbin # The Pogoplug OS doesn't include /usr/sbin or /sbin in root's PATH ./dockstar.debian-squeeze.sh
(The dockstart.debian.squeeze.sh
script puts an ext2 filesystem in /dev/sda1
, uses debootstrap to put a base Debian installation on it. It also puts an unlocked u-Boot bootloader, a Debian kernel image, and a tiny recovery filesystem into the Dockstar's NAND flash.)