Monday, March 31, 2014

DIY Portable AirPlay Speaker System

DIY Portable AirPlay Speaker System:

This is something I've been working off/on for over a year now. Originally inspired by the Boominator. However, I lack the carpentry skills and tools, so I decided to build this instead. I believe it's fairly unique in that it's totally portable (battery operated) and supports AirPlay.

Another photo of the back with captions on Amazon

YouTube Video:

  • AirPlay support provided by AirEnabler - broadcast it's own Wi-Fi network and allows iOS device to automatically maintain 3G/LTE connection for internet radio streaming from Pandora or iTunes Radio.
  • Battery operated; 6-8 hours on low-medium volume.
  • Runs off battery or AC wall charger and support charging while playing
  • Expandable to stereo (add 2nd speaker)
  • Switch out li-ion battery for 12v motorcycle battery for extended play (camping).

Friday, December 27, 2013

iPhone/Android VPN to PPTP VPN Server on TomatoUSB Router

iPhone/Android Phone Home - PPTP VPN Server for iPhone or Android on TomatoUSB Router

This is a quick tutorial on how to setup a PPTP VPN Server on your TomatoUSB Router. A PPTP VPN is ideal because it's fairly secure, simple to setup and both Android and iOS has built in PPTP VPN Clients which makes it convenient.

A VPN is a secure way for an iPhone or Android device to access local network resources such as internal web sites (SSL not required for secure access), samba shares, and SqueezeBox Server without the need to open up additional network ports on the router.

If you're looking for a router for this project, check out my [Tutorial] Apple AirPlay on TomatoUSB Router.


1) You're running Shibby's BIG-VPN build of TomatoUSB
2) Dynamic DNS is setup (Required for Client Setup). See my
[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN post for instructions on setting up Dynamic DNS Address.


1) Configure PPTP Server
2) Configure iPhone (iOS 7) VPN Client and Connect
3) Configure Android VPN Client and Connect - In Progress

Configure PPTP Server

Log into your TomatoUSB Router and go to VPN Tunneling->PPTP Server.

On the PPTP Server Configuration Page:

- Check Enable
- For Remote IP Address Range, pick a small IP Address range that is outside the scope of your DHCP Server but on the same network segment. For instance, I'm using 192.168.200.X as my network segment. My DHCP Server IP Adddress Range is So I used (outside the DHCP Range), giving me two IP Addresses (for two incoming iPhone).
- Set Broadcast Relay Mode to Both
- Set Encryption to MPPE-128
- Leave DNS Servers, WINS Servers, MTU and MRU at the default values.
- Under PPTP User List, add a user and set a password. You will need this info during the next step, Configure iPhone VPN Client.
- Save

Configure iPhone VPN Client and Connect

On your iPhone, go to Settings->General->VPN->Add VPN Configuration.
Select PPTP
Fill in the Description
For Server use your Dynamic DNS Address
Account name ("pptpuser" in this tutorial) and password.
Leave everything else as default.

Settings->General->VPN->Add VPN Configuration

Turn on VPN by going to Settings and sliding on "VPN". Note the "VPN" icon next to the clock when connected to VPN.

Turn iPhone VPN on by going to Settings and sliding on VPN

Configure Android VPN Client and Connect

Go to "Wireless and network" settings -> VPN settings.
Select "Add PPTP VPN"
Set VPN server name
Enable Encryption

Wednesday, November 6, 2013

How to Install Optware and SAMBA on the Pogoplug

In this tutorial, I'm going to show you how to install optware and samba on your Pogoplug to create a cheap and simple NAS.

What is optware? Optware is a package manager that allows you to install additional software on your embedded linux device such as the Pogoplug (think of it as a free little "App Store"), while maintaining the stock functionality.


1) Pogoplug - V2 such as the E02, V3 (oxnas) such as the Pogoplug P21/P22/Pro or the V4, also known as the Series 4 and Mobile. Pretty much any existing Pogoplug model is supported.
2) USB Hard Drive - 2TB or less recommended.

Outline of Steps:

1) SSH into Pogoplug
2) Partition and Format USB Hard Drive
3) Install Optware
4) Install SAMBA
5) Make sure everything works after a reboot

SSH into Pogoplug

If you haven't activated your Pogoplug (new out of the box), you should be able to SSH into it using root/ceadmin as the username/password. If you have activated it, you'll need to enable SSH via

SSH into Pogoplug using Putty or similar app

Partition and Format USB Hard Drive

Plug in your USB Hard Drive to your Pogoplug.

#stop service
killall hbwd

#partition drive
#create two partitions, a small 4GB partition
#for optware and the rest for your data
busybox fdisk /dev/sda

# Type in the following commands to erase
# and re-partition the USB Hard Drive 

# p # list current partitions
# o # to delete all partitions
# Create 1st Partition for Optware
# n # new partition
# p # primary partition
# 1 (one) # first partition
# <enter> # default start block
# +4G # to create a 4GB partition

# Create 2nd Partition for Data
# n       # new partition
# p       # primary partition
# <enter> # default to second partition
# <enter> # default start block
# <enter> # default end block #use the whole flash drive
# w       # write new partition to disk

#download mke2fs to format partition
cd /tmp
chmod +x mke2fs

#format and label partition
./mke2fs -L optware -j /dev/sda1
./mke2fs -L data -j /dev/sda2

#remount root to be writable
mount -o remount,rw /

#create /opt folder
mkdir /opt

#mount usb drive as /opt
mount /dev/sda1 /opt

Install Optware

# Install optware ipkg (package manager)
# Assumes /opt is mounted at this point

#download ipkg
cd /opt
tar -xzvf plug.tar.gz
rm plug.tar.gz

#Pogoplug Pro requires an updated wget
#Not needed for other models
#skip this section if not using Pro
cd /usr/bin 
mv wget wget.old
ln -s /opt/bin/wget /usr/bin/wget

# Setup profile
cd /etc
chmod 755 profile
source /etc/profile

#update available packages
ipkg update

Install Samba

ipkg install samba36 libnsl nano

#download example smb.conf
cd /opt/etc/samba

#Edit smb.conf (optional)
#to add additional samba shares
#nano /opt/etc/samba/smb.conf

#Start SAMBA
/opt/etc/init.d/S08samba start

You should now be able to access your Pogoplug's USB Hard Drive by \\pogoplug\usb

Make sure everything works after a reboot

#backup original rcS startup file
#restore the rcS.original file to revert
cp /etc/init.d/rcS /etc/init.d/rcS.original

#download mount script and make it executable
cd /etc/init.d
chmod +x mount_optext3

#add mount script to rcS file so it 
#runs automatically after a reboot
#this script will mount /opt
#the data partition is automatically mounted by the pogoplug software
echo "/etc/init.d/mount_optext3" >> /etc/init.d/rcS

#start samba on reboot
echo "/opt/etc/init.d/S08samba start" >>  /etc/init.d/rcS


Adding an Additional/Second USB Hard Drive

1) Attach additional USB Drive to Pogoplug.

2) Partition additional USB Drive. See "Partition and Format USB Hard Drive" section, but just create one partition.

  busybox fdisk /dev/sdb

3) Format and Label additional USB Drive

    ./mke2fs -L data2 -j /dev/sdb1

4) Remount root to be writable

   mount -o remount,rw /

4) Edit the smb.conf file and add an additional section that is similar to the "[usb]" section.

   nano /opt/etc/samba/smb.conf

  path = /tmp/.cemnt/mnt_sdb1/
  read only = no
  public = yes
  writable = yes
  guest ok = yes

5) Reboot. You should now be able to access the additional drive as \\pogoplug\usb2

Miscellaneous Notes

On the Pogoplug V2 (E02) and V4, you can actually use one of the internal flash partition for /opt. This is a fairly small partition (<75MB), but will be enough if only plan to run a simple NAS using SAMBA.

Using the internal flash partition is also a great way to avoid issues with using multiple USB hard drives.

Only recommended for more advanced users (don't email me for support unless you plan to send me a bitcoin/litecoin!).

# Pogoplug V2/V4 - Use internal flash partition for /opt
#remount root to be writable
mount -o remount,rw /

#create /opt folder
mkdir /opt

#erase mtdblock3
flash_eraseall /dev/mtd3

#mount internal flash partition as /opt
mount /dev/mtdblock3 /opt

Changes to above instructions if using internal flash for /opt
- only one partition needed on your USB hard drive
- "Install Optware" and "Install Samba" instructions unchanged
- modify the smb.conf file for correct partition
     path = /tmp/.cemnt/mnt_sda1/
- In the "Make sure everything works after a reboot" section, you don't need the mount_optext3 script
- Add the "mount /dev/mtdblock3 /opt" command before the "/opt/etc/init.d/S08samba start" command in the /etc/init.d/rcS file.


/opt not mounting - check the content of the /etc/init.d/rcS file and make sure /etc/init.d/mount_optext3 is called. Also double check that the /etc/init.d/mount_optext3 file exist and is executable. Minimize the number of attached USB drives

samba not working (\\pogoplug\usb not accessible) - double check that /opt is mounted correctly. Make sure that "/opt/etc/init.d/S08samba start" is the last line in the /etc/init.d/rcS file. Verify that the /opt/etc/samba/smb.conf exist.

data partition not mounted - the data partition is automatically mounted by the pogoplug software to something like /tmp/.cemnt/mnt_sda2. Run the "df -h" command to see what's mounted. Check the /etc/init.d/rcS file to make sure the pogoplug software start command ("/etc/init.d/ start") isn't commented out (begins with #).

Future Updates

I'll be flushing this tutorial with additional howtos in the near future. Please leave a comment and what you would like to see added.

Tuesday, October 8, 2013

Pogoplug V2 and V3 Serial Connection - E02, P21/P22, Pro

This is a quick how to tutorial on setting up a serial console connection to the Pogoplug E02 (V2) or P21/P22 (V3 oxnas).

Instructions for the Pogoplug V4 here.

A serial console connection is useful for recovering from a corrupt uboot environment or for troubleshooting general boot up issues.

You should be able to add a serial connection to your Pogoplug for less than $10 and in under 30 minutes.


1) USB to TTL Converter - I have a couple cheap USB to TTL converters based on the PL-2303HX chipset. Note that this chipset is not supported under Windows 8 and most PL-2303HX being sold on Amazon and Ebay are using fake chips which are not supported by the official drivers on Prolific's website. I'm using the drivers found here.

Ebay is another good source the the USB to TTL Converter.

Prolific PL-2303HX USB to TTL Converter

2) CD-ROM Audio Cable (Sound Blaster/MPC-2) - you need the one with a white connector (Sound Blaster plug) at one end and a black connector (MPC-2) at the other end. I got mine from a old computer. You can pick one up on Amazon for less than $5 otherwise Ebay is another good source.

3) Safety pin - used to modify the CD-ROM Audio Cable.

4) Small flat head screwdriver (optional)

Outline of Steps:

1) Opening up the Pogoplug
2) Modify CD-ROM Audio Cable
3) Connect the USB to TTL Converter to the Pogoplug
3) Install Drivers and Connect via Putty

Lets get started.

Opening up the Pogoplug

This part is pretty easy. You actually don't even need any tools, just a little force. 

Pull off the black feet, starting from the bottom. Clear plastic slides back.
The shell is held together by small plastic clips. This is where a small flat head screwdriver may be helpful. 

Modify CD-ROM Audio Cable

On the end with the black connector, use the safety pin to push out the the wires as shown below.

If you want a permanent serial connection, at this point (before reinserting the wires) you can drill a small hole on the back of your Pogoplug for the CD-ROM audio cable.

Now, reinsert the wires with the white wire on the edge, red in the middle and then yellow as shown below. Use electrical tape to tape up the black wire (not used). In the picture below, white will be GND.

Connect the USB to TTL Converter to Pogoplug

The CD-ROM Audio Cable that we modified will work for both Pogoplug V2 and Pogoplug V3.

Here is how everything should connect up. The white end of the CD-ROM audio cable can be plugged directly into the serial port of the Pogoplug. The black end of the CD-ROM audio cable can be plugged directly into the USB to TTL converter.

Pogoplug V2 (E02) Serial Console Connection

Pogoplug V3 Serial Console Connection
Make sure GND on the Pogoplug is connected to GND on the USB to TTL converter.
TXD on the Pogoplug should connect to RXD on the USB to TTL converter.
RXD on the Pogoplug should connect to TXD on the USB to TTL converter.
VCC and the 3.3v is not needed and should not be connected.

Install Drivers and Connect via Putty

Download drivers and install it. I'm using the drivers found here.

Plug in the USB to TTL converter and open up Device Manager and verify that Windows detected the USB to TTL converter correctly. Note the COM port number (COM4 in the example below).

Download putty from here and start it up.

Change the Connection type to Serial.

Under Category, click on Serial and change the serial line configuration settings to the following:

Speed: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow control: None

Change the COM port to the correct one found in Device Manager. Click Open.

Now power up your Pogoplug. You should see something like the following in your Putty Serial Console.

That's it.

Addendum (7/1/2014)

For some reason one of my Pogoplugs had a corrupted (or incorrect) uboot environment variable setting so I had a use a serial connection to recover it. The issue was, all my computers at home are now running Windows 8 and as mentioned above, the PL-2303HX USB TTL converter isn't compatible with Windows 8. What I ended up doing was using another Pogoplug which was already running Arch Linux ARM to connect to the problematic Pogoplug. These instructions will also work for other Linux systems.

On the working Pogoplug running ALARM:

1) Plug in USB to TTL adapter.
2) Install Screen

pacman -Sy screen

3) Start screen serial console session. The follow command will start the screen serial console with the appropriate settings for the Pogoplug (baud 115200, Data bits: 8, Stop bits: 1,Parity: None, Flow control: None).

screen /dev/ttyUSB0 115200 cs8 -cstopb -parenb

4) Some quick Screen commands:

Control + a and then ":quit" to exit
Control + a and then 'd' to detach

A couple of good post on resetting the uboot env on your Pogoplug:

Help, Pogogplug E02 , No LED,serial cable connected ,what next?


Sunday, July 14, 2013

DIY AirPlay Speaker System using a Asus WL-520gu Router

In this tutorial, I'm going to show you how to re-purpose a Asus WL-520gu router into an Apple AirPlay Speaker System. I have a custom built OpenWRT image already fully configured with AirPlay so all you have to do is flash and go.

Major kudos to the Wifi Radio project on which introduced me to OpenWRT and a major inspiration for this project.


- Asus WL-520gu Router (Stock Firmware, Tomato, DD-WRT or OpenWRT)
- Compatible USB Sound Card (USD DAC - Digital Audio Converter). See below.
- Speakers/Stereo System (or Headphones).

Flashing the OpenWRT AirPlay Firmware

Download my OpenWRT image pre-configured with AirPlay (aka ShairPort). Note that this firmware is specifically designed for the Asus WL-520gu router. If you use this firmware on any other router, you will brick it.

If you are already running Tomato, DD-WRT or OpenWRT (with Luci) on your router, you can flash directly from the web interface.

If you are running OpenWRT without a web interface, here are the commands to flash via command line:

cd tmp
mv MNkAm openwrt-brcm47xx-squashfs.trx
mtd -r write openwrt-brcm47xx-squashfs.trx linux

Otherwise if you are running the Asus stock firmware or need to recover from a bad flash, follow these instructions - Asus WL-520UG: Loving Tomato Firmware. Obviously, flash with the OpenWRT AirPlay image above.

Enjoy some Music

Plug in your USB Sound Card to the router and connect it to your speakers. Then power cycle the router.

On your iOS device, connect to the open/unencrypted 'AirPlay520gu' wireless network.

Important Note: Wireless is enabled by default within the image. However, the router requires one extra reboot after being flashed before wireless will start properly (Don't ask me why, I don't know). So basically, if you don't see the 'AirPlay520gu' wireless network, give the router a reboot/power cycle.

You should now be able to AirPlay music from your iOS device to the 'AirPlay520gu' AirPlay Speakers.

iOS 7 Beta - AirPlay to WL-520gu router from iTunes Radio

Different Modes and Use Cases

Standalone Mode (Default, no configuration needed) - Broadcast unencrypted/open SSID of "AirPlay520gu". DHCP Server enabled with no default route or DNS server to allow iPhone to maintain connection to LTE/4G network for internet radio streaming.

Wireless Client Mode - Connects to existing wireless network similar to how your iphone/ipad connects to your network. This is how most commercial AirPlay Speaker System work. HowTo: Switch to 'STA' mode

AP (Access Point) Mode - Connects to existing network via a wired Ethernet cable (or Ethernet over Powerline). Broadcast additional SSID to extend your wireless network coverage - add AirPlay and get better wireless coverage too! HowTo: Disable DHCP, change IP Address, Set SSID/Encryption type

Check the OpenWRT forums or Wiki for help on re-configuring your new AirPlay router!

Compatible/Recommended USB Sound Cards (Plug and Play)
Some additional USB DACs that I haven't tested personally, but should also work:
Note: The cheap "3D Sound" USB audio adapter may work, but there is at least two versions - one that works (C-Media chipset) and one that doesn't (6911 Chipset, JMTek, LLC 48Khz Only). My recommendation is to avoid them unless you're 100% positive you'll get the one with the C-Media chipset or to keep things simple, pick up the Syba SD-CM-UAUD USB Stereo Audio Adapter if you're on a tight budget or prefer the form factor.

DIY AirPlay Sound System for under $100

A great sounding AirPlay speaker system can easily be put together on a very limited budget and blow away anything sold at the Apple Store costing twice or three times as much. As an example, a LP-2020A+ Lepai Tripath Amplifier paired with the Dayton Audio B652 bookshelf speakers will give you awesome sound on a tight budget.

Syba USB Audio Adapter - $7
Lepai 2020A+ Amp - $23
Dayton Audio B652 Bookshelf Speakers - $52

Total cost $82 + router

What if I don't have a Asus WL-520GU Router?

Definitely do not buy one (unless you can get it super cheap, ~$10). This router has really dated hardware and is no longer manufactured.

Instead consider picking up a TomatoUSB compatible router or Pogoplug and following my other DIY AirPlay tutorials:
[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM

Another option would be my Apple AirPlay AirEnabler Adapter Kit, which is a totally plug and play solution that allows you to add Apple AirPlay to any existing home stereo, car stereo, pc speaker system, ammo box portable speaker systemstereo cooler or my favorite the Boominator, "the ultimate party machine".

Friday, March 29, 2013

[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)

In this tutorial, I'm going to show you how to add a CentOS 6 server as a OpenVPN client to your existing Site to Site VPN.

This is an extension of my [Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN and assumes you already have your Site to Site VPN operational. However, you should be able to follow this tutorial and connect to any existing OpenVPN Server.

At the end of this tutorial, your CentOS server will be able to securely access your LAN resources (i.e, computers, printers) on both sites and vice versa (you will also be able to seamlessly access your CentOS server).

Overview of the Steps:

1) Generate Certs and Keys
2) Copy/Transfer over Certs and Keys to Client VPS
3) Install OpenVPN (client)
4) Configure OpenVPN Client
5) Connect

Generate cert/keys for VPS (CentOS 6 32-bit OpenVPN Client)

SSH into your TomatoUSB OpenVPN Server.

#Setup and initialize environment
cd /opt/openvpn-easy-rsa
source ./vars

#myvps_client is the Common Name
./build-key myvps_client

Copy/Transfer over Certs and Keys to Client VPS

Since my CentOS server is running SSH, I'm going to use SSH and SCP (secure copy) to transfer over the certificates and key. You can also transfer over the keys via SFTP or a USB drive.

#create the /etc/openvpn/keys folder on my centos server
ssh mkdir -p /etc/openvpn/keys 

#copy over the certificates and keys
#all one line
cd /opt/openvpn-easy-rsa
scp keys/ca.crt keys/myvps_client.crt keys/myvps_client.key

Install OpenVPN on CentOS 6

#Bring everything up to date
yum -y update

#Add EPEL (Extra Packages for Enterprise Linux) Repo
# RHEL/CentOS 6 32-Bit ##
cd /tmp 

wget rpm -ivh epel-release-6-8.noarch.rpm

yum --enablerepo=epel install openvpn.i686

Configure OpenVPN Client

#copy sample client.conf to /etc/openvpn
cp /usr/share/doc/openvpn-2.2.2/sample-config-files/client.conf /etc/openvpn

#edit openvpn client.conf
nano /etc/openvpn/client.conf

Update the following lines
#remote 1194
#ca /etc/openvpn/keys/ca.crt
#cert /etc/openvpn/keys/myvps_client.crt
#key /etc/openvpn/keys/myvps_client.key

#start VPN manually to test
openvpn --config /etc/openvpn/client.conf

#test starting VPN as a service
service openvpn start

#autostart at OpenvPN client on reboot
chkconfig openvpn on

[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM - NAS (SAMBA), AirPlay, AirPrint, Google CloudPrint, SqueezeBox (Logitech Media Server), SqueezeLite, Plex Media Server

Pogoplugs sporting 1TB USB HDs, USB DACs and USB Wifi

In this tutorial I'm going to show you how to setup the following on a Pogoplug running Arch Linux ARM (aka ALARM for short).

   - enable swapfile
Apple AirPlay
SqueezeLite Player (Logitech Media Server/SqueezeBox Client)
SqueezeBox (Logitech Media Server)
Plex Media Server
Apple AirPrint
Google CloudPrint
Re-install service
Enable uPNP/DNLA (
Wireless Configuration
Motion Webcam
BitTorrent Sync
Transmission, Sabnzbd, SickBeard and CouchPotato
OpenVPN (client)
Mongoose (Simple Web Server)
OwnCloud (nginx php-fpm sqlite)
Backup and Restore ALARM


Want to take a small gamble? Pick up the Pogoplug P21 (Black) or Pogoplug B01 (Pink). Even though the box is labeled as a P21/B01, chances are the Pogoplug itself will be a E02 model. I've bought at least 6 P21/B01 from various vendors - Adorama,, and Ebay - and so far I have only received E02. Note that recently a small percentage of users (~20-30%)  have reported receiving a new P22 model which isn't supported under Arch Linux ARM.

Ebay is another good source for the Pogoplug E02.

Check the bottom of the Pogoplug to confirm Model number. Ignore the Model number listed on the box.

The E02 model is the ideal choice with 256MB RAM and a 1.2Ghz CPU versus other models (Series 4) which only has 128MB RAM and 800Mhz CPU. Don't get fooled by the USB 3.0 Ports in the Series 4 model; the CPU is a bottleneck and there is no performance difference with the USB 3.0 ports. Saying that, I like the Pogoplug Series 4 form factor with its SATA USM slot. For the Pogoplug Series 4, I would recommend the USM slot compatible Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive.

Pogoplug Series 4 with (USM Compatible) Seagate Backup Plus 1TB USB 3.0 Portable HD

This will be a work in progress, so please excuse the typos and grammar.

Note/FAQ Troubleshooting:
- Watch out for run-on commands. I'm having issues with the blogger editor.
- For bootup issues, see Troubleshooting ALARM Boot Up Issues near the end.

 - Pogoplug is installed behind a Router/Firewall on a secured LAN (home use only)
 - The Pogoplug is new and hasn't been registered on If it was, you may need to enable SSH via

If you only want to setup a simple NAS and/or have a unsupported Pogoplug version V3 (oxnas), please take a look at my Optware Tutorial.

Last Updated: 06/26/2014 (Update in progress)

Official Arch Linux ARM Installation Instructions:

Official Instructions for installing Arch Linux on the Pogoplug E02 can be found here:

For the Pogoplug Series 4 and Mobile, official instructions can be found here:

Pogoplug E02 Arch Linux ARM Installation Instructions (Summarized Version)

Note: If you get a command not found for "wget" or "reboot", try adding "busybox" in front of the command - "busybox wget http://xxx", "busybox shutdown"

Plug in the Pogoplug without any USB drive attached
SSH into Pogoplug
Log in as root/ceadmin. 

#Stop the Pogoplug software
killall hbwd

#Install UBoot
cd /tmp
chmod +x

#Would you like to disable the Pogoplug services? [Y/n]
#n - to keep original Pogoplug software 
#when booting without USB drives attached
#y - if you're not planning on ever using the stock
#Pogoplug software again

#Plug in USB Flash Drive or Hard Drive
#Use the back bottom USB port

If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.

#Partition your USB flash/hard drive
/sbin/fdisk /dev/sda

# Type in the following commands to erase
# and re-partition USB flash/hard drive 

# p # list current partitions
# o # to delete all partitions
# n # new partition
# p # primary partition
# 1 (one) # first partition
# <enter> # default start block
# <enter> # default end block (to use the whole drive)
# If you're using a hard drive, create a small
# 4GB partition instead of using the whole drive,
# leaving the rest for a data partition
# +4G # to create a 4GB partition
# w # write new partition to disk

#Format USB Flash Drive
cd /tmp

chmod 755 mke2fs

#format and label partition
./mke2fs -L ROOTFS -j /dev/sda1

#mount usb flash drive
mkdir -p /tmp/usb
mount /dev/sda1 /tmp/usb

#Download Arch Linux ARM (aka ALARM)

#and extract to USB Drive:
cd /tmp/usb
tar -xzvf ArchLinuxARM-kirkwood-*.tar.gz
#Unmount USB Drive and reboot
rm ArchLinuxARM-armv5te-*.tar.gz
sync  # Takes a while when using a flash drive
cd ..
umount /tmp/usb

#Update uboot env varibles
#Have uboot mount partition as ext3 
#safer in power outages
#E02 only, V4 defaults to ext3 already
/usr/sbin/fw_setenv usb_rootfstype ext3

#Correct machid - make LED Green versus Orange
#Only for E02
/usr/sbin/fw_setenv machid dd6


Note that after the reboot, the IP Address of your Pogoplug may have changed. However, you should be able to ping it by name - "ping alarm". Otherwise double check your router or use a IP scanning tool like AngryIP (Legacy) to confirm the IP Address of your Pogoplug.

SSH back into your Pogoplug and login with the username and password of root/root. Success? Congratulations! At this point, Arch Linux is now running on your Pogoplug.

Initial Arch Linux ARM Configuration and Package Installation

#Upgrade kernel and install some initial packages
#Hit Enter when prompted with "Enter a selection (default=all):"
#'Y' when prompted with linux-kirkwood and linux are in conflict.
#Remove linux? [y/N]
#Go get some coffee
pacman -Syu linux-kirkwood linux-kirkwood-headers ntp base-devel nano wget rsync

#list timezone
timedatectl list-timezones

#set timezone
timedatectl set-timezone America/Los_Angeles

#autostart ntp 

#pogoplug has no hardware clock
systemctl enable ntpd

systemctl start ntpd

#force time update after network starts
#all one line
echo "ExecUpPost='/usr/bin/ntpdate -u'">>/etc/netctl/eth0

#Add ROOTFS to fstab so fsck will run when needed
cho "LABEL=ROOTFS / ext3 rw,noatime 0 1" >> /etc/fstab


SAMBA Server - Setup your Pogoplug as a Network Attached Storage (NAS)

The Pogoplug makes an excellent NAS. Expect read/write performance between 23MB-28MB/s on a wired gigabit network using ext3/ext4. If you are using a 10/100Mb network, expect a maximum transfer rate of 9-10MB/s, which is the limit of 10/100Mb network. Wireless will be slower. Using NTFS partition will also affect performance (don't use it).

If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.

The instructions below assumes you have ALARM installed on the first partition of your USB hard drive. Replace "/dev/sda2" (second partition on first hd) with "/dev/sdb1" (first partition second hard drive) if you have ALARM installed on a USB Flash Drive and adding a new USB Hard Drive for SAMBA.

Note that these instructions are only applicable to 2TB drives or less. If you have a 3TB drive, you need to use gdisk to setup a hybrid MBR, which is not covered in this tutorial.

#Create a 2nd Partition on your USB Drive
/sbin/fdisk /dev/sda

# Type in the following commands to create a 2nd
# partition on your USB hard drive 
p       # list current partitions
# n       # new partition
# p       # primary partition
# <enter> # default to second partition
# <enter> # default start block
# <enter> # default end block #use the whole flash drive
# w       # write new partition to disk

#Format newly created 2nd partition, label as USB
#a reboot may be required for new partition 
#to be recognized
mkfs.ext3 -L USB /dev/sda2

#mount disk
mkdir -p /media/usb

#mount 2nd partition (/dev/sdb1)
mount /dev/sda2 /media/usb

#install samba and upgrade everything
pacman -Syu samba

#Create folder we'll be sharing
#will also hide the swap and lost+found folder
mkdir -p /media/usb/share

#download example smb.conf for public share
#no authentication require, everyone has 
#read/write access to / (root$) and usb (/media/usb/share)
cd /etc/samba

#Edit smb.conf (optional)
#change name, add additional shares
#nano /etc/samba/smb.conf

#start samba
systemctl start smbd nmbd

#mount after reboot
#all one line
echo "LABEL=USB /media/usb ext3 rw,noatime,nofail 0 0" >> /etc/fstab

#start samba
systemctl start smbd nmbd

#autostart samba on reboot
systemctl enable smbd nmbd

#test from computer: 


#reboot and test


Enable Swap File

Only create a swap file if you're using a hard drive. It is not recommended to setup a swap file on a USB flash drive as it can wear out and fail.

#This will create a 1024MB swap file
#Named "swapfile.img" in /media/usb (USB HD).
dd if=/dev/zero of=/media/usb/swapfile.img bs=1M count=1024

mkswap /media/usb/swapfile.img

#update swap file permissions
chmod 0600 /media/usb/swapfile.img

#You can now turn the swap file on using:
swapon /media/usb/swapfile.img

#check if swap is enabled

#turn swap off by using:
#swapoff /media/usb/swapfile.img

#enable swapfile on reboot
echo "/media/usb/swapfile.img none swap sw,nofail 0 0" >> /etc/fstab

#reboot and test

Apple AirPlay (aka Shairport) - Stream music from your iOS Device or iTunes

Compatible/Recommended USB Sound Cards (Plug and Play)

#Install some required packages
pacman -Sy libao alsa-utils avahi libpulse

#audio fix
echo "use_mmap=no" >> /etc/libao.conf

#Configure alsa - asound.conf file
cd /etc

#download pre-compiled version of shairport
#compiled 6/26/2014
cd /usr/local/bin

#make shairport executable

chmod a+x shairport

#or compile shairport on your own
cd /tmp
wget --no-check-certificate
tar xzf master
cd *shairport*
make install

#restart dbus
systemctl restart dbus

#autostart avahi-daemon
systemctl start avahi-daemon
systemctl enable avahi-daemon

#start shairport and test
shairport -a Living_Room -v

#Test, Control C to stop

#autostart shairport on reboot
#edit shairport.service file to update AirPlay name
cd /etc/systemd/system


#start shairport and test

systemctl start shairport
systemctl status shairport

#autostart shairport on reboot
systemctl enable shairport

#reboot and test

#Schedule ShairPort to restart daily
#switch editor to nano
export EDITOR="/usr/bin/nano"

#edit/create crontab
crontab -e

#paste in the below and exit
#restart shairport @ 5AM everyday
00 05 * * * /usr/bin/systemctl restart shairport

#list crontab
crontab -l

Adjusting the volume

#Find name of mixer control
#Typically PCM or Speaker

#Simple mixer control 'PCM',0
#  Capabilities: pvolume pswitch pswitch-joined
#  Playback channels: Front Left - Front Right
#  Limits: Playback 0 - 38
#  Mono:
#  Front Left: Playback 27 [71%] [-8.26dB] [on]
#  Front Right: Playback 27 [71%] [-8.26dB] [on]

#set volume to 90%
amixer set PCM 90%

#save setting
alsactl store

#Troubleshooting commands
aplay -L
cat /proc/asound/card0/pcm0p/sub0/hw_params

SqueezeLite Player (SqueezeBox/Logitech Media Server Client)

To do: update squeezelite.service to include fake MAC Address for Pandora

pacman -Sy faad2 libmad mpg123 libao alsa-utils avahi
#if not already done
#audio fix
echo "use_mmap=no" >> /etc/libao.conf

#Configure alsa - asound.conf file
cd /etc

mkdir -p /usr/local/bin
cd /usr/local/bin

#download the latest squeezelite version

mv squeezelite-armv5te squeezelite

#make executable
chmod a+x squeezelite

#download service file
cd /etc/systemd/system

#edit name (optional)

#nano /etc/systemd/system/squeezelite.service

#start squeezelite and avahi-daemon
systemctl start squeezelite 

#autostart squeezelite and 
avahi-daemon on reboot
systemctl enable squeezelite avahi-daemon

SqueezeBox (Logitech Media Server) Installation

#Install pre-compiled version (6/26/2014)
pacman -U

#start logitechmediaserver
systemctl start logitechmediaserver

#autostart logitechmediaserver on reboot
systemctl enable logitechmediaserver

#make music and playlist folder

mkdir -p /media/usb/share/music
mkdir -p /media/usb/share/playlist

#update permissions
chmod 777 /media/usb/share/music
chmod 777 /media/usb/share/playlist

#Configure @ http://pogoplug:9000 or http://ipaddress:9000

LMS Build Instructions

#Requires Swap of 512MB or more
#Takes 3 hours

mkdir -p /media/usb/share/build
cd /media/usb/share/build
wget --no-check-certificate
tar -xvzf logitechmediaserver.tar.gz
cd logitechmediaserver
makepkg -Acs --asroot

Plex Media Server

Plex is probably the best solution for accessing your music over the internet using a computer, iPhone or Android device.

Note that Plex on the Pogoplug (ARM in general) does not support transcoding. This means your media need to be natively supported by your Plex Client (e.g., mp4/m4v on iOS devices).

Major kudos to moonman on ALARM forum for providing the PKGBUILD.

#Install pre-complied version (6/26/2014)
pacman -U

#start plexmediaserver
systemctl start plexmediaserver

#autostart plexmediaserver on reboot
systemctl enable plexmediaserver

#Plex Media Server Build Instructions
pacman -Sy svn
mkdir -p ~/build
cd ~/build
svn checkout
cd plexmediaserver
makepkg -Acs --asroot

#Configure @ http://alarm:32400/manage

If you're having issues adding your media, try changing the permissions on the folder - chmod 777 /media/usb/share/music

AirPrint Server - Print to your non-AirPrint enabled printers

Needs re-validation (6/27/2014) - If you've successfully setup AirPrint, please leave a comment. Not sure what's going on, but ghostscript is hanging and I can no longer print a test page. However, in some cases, I still can AirPrint.
#Install CUPS and print drivers

pacman -Sy cups gutenprint ghostscript pycups python2 avahi 

#link python to python2
ln -s /usr/bin/python2 /usr/bin/python

#For HP Printer Drivers
pacman -S hplip

#For Samsung Printer Drivers
pacman -S splix

#Backup original cupsd.conf

cd /etc/cups
mv cupsd.conf

#download my cupsd.conf

#Start CUPS

systemctl start cups

Configure CUPS Printer(s)

Now open up your web browser and go to http://alarm:631/admin.

This part is YMMV. Not all printers will work.

Click the "Add Printer" Button.

In my case, I am using a Brother HL-2270DW (highly recommended, works great and cheap toner) which has built in wireless and supports various printing options - socket, ipp, http, etc. I'm going to use socket (AppSocket/HP JetDirect) which is the same option you would select if you had your USB printer directly connected to your PogoPlug. 

USB attached printers should be auto detected (untested).

For the Brother wireless printer, the Connection address I'm using is "socket://<PrinterIPAddress>:9100" ( for the record "ipp://<PrinterIPAddress>/pcl_p1" would also work).

If you're using a DD-WRT or TomatoUSB Router as your print server, "socket://<RouterIPAddress>:9100", would be the correct Connection address..

Name your printer. Check the "Share This Printer" checkbox. Select the Make/Model of your Printer. Basically you are selecting the drivers to use. For my Brother HL-2270DW, I went with "Generic"->"Generic PCL 6/PCL XL Printer".

Click Add Printer.

Set your Default Options.

Print a test page. Maintenance->Print Test Page.

Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer) if you're having a problem with printing a test page.

Back in the SSH Console

#download avahi airprint script

mkdir -p /opt/airprint
cd /opt/airprint

#this is all one line
wget -O --no-check-certificate

#make script executable
chmod 755

#add mime types needed for iOS6
echo "image/urf urf string(0,UNIRAST<00>)" > /usr/share/cups/mime/airprint.types
echo "image/urf application/pdf 100 pdftoraster" > /usr/share/cups/mime/airprint.convs

#autostart avahi-daemon
systemctl start avahi-daemon
systemctl enable avahi-daemon

#restart cups to pick up new mime types
systemctl restart cups

#Generate AirPrint service file
cd /etc/avahi/services

#Check for AirPrint-<PrinterName>.service file

#Test AirPrint from iOS Device

#autostart cupsd after reboot
systemctl enable cups

As a reference please check out this posting - [Tutorial] Apple AirPrint on TomatoUSB Router

Google CloudPrint - Print over the internet via Chrome Web Browser. Share your printer with friends/family.

Needs Updating (6/26/2014)

pacman -Sy git

#download cloudprint
mkdir /opt
cd /opt
git clone git://

#build and install cloudprint
cd /opt/cloudprint
python build
python install

#Run once to create auth files

#enter your google account email and password
#Google username:

#Test print from your Chrome web browser
#Control+C to close cloudprint

#To run as daemon
pacman -Sy yaourt

#Not sure why, but python2-daemon complains about these
#two files so we're renaming them
mv /usr/bin/easy_install-2.7 /usr/bin/easy_install-2.7.bak
mv /usr/lib/python2.7/site-packages/setuptools.pth /usr/lib/python2.7/site-packages/setuptools.pth.bak

#No need to edit anything
yaourt -ASy python2-daemon

#setup cloudprint to run on startup via systemd service
cd /etc/systemd/system
systemctl enable cloudprint.service

#Reboot and test CloudPrint

#Clear google credentials/auth files
#rm /root/.cloudprintauth
#rm /root/.cloudprintsaslauth

Cloudprint is very fragile. If you're having start-up or printing issues try the following steps.

- Clear your Google CloudPrint Print Queue -
- Delete your stored credential and reboot and start over.

One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or whatever).

Re-install service (original software) 

Great piece of software. My favorite is the iOS/Android app automatic photo/video backup feature. This is a simple and effective way to backup your phone's camera stream.

[Updated 9/25/2013] - Cloud Engine software was updated to 3.3.5.

Please go here for latest instructions/update: (Thanks moonman!)

#If upgrading from previous release
#uninstall old version
pacman -R pogoplug

#you may need to delete this file otherwise
#the new package will complain
#rm /usr/local/cloudengines/bin/hbplug.conf

#install pogoplug software

pacman -U
#download my sample pogoplug.conf file
#if upgrade, you can skip this
cd /etc

#edit configuration file

#edit vfsdir0
#add svcid (ID) from the bottom of your PogoPlug (no dashes)

nano /etc/pogoplug.conf

##example below: vfsdir<number>=<name>,<path>
##use the ID from the bottom of your Pogoplug 

#26 char (no dashes)


#note /etc/pogoplug.conf will be copied to
#/usr/local/cloudengines/hbplug.conf on service startup 
#hbplug.conf is the file that matters.
#if things are not working as expected, verify
#the content of the hbplug.conf file

#start pogoplug service

systemctl start pogoplug

#autostart pogoplug service on reboot
systemctl enable pogoplug

#reboot and register @

Enable uPNP/DNLA (

The Cloud Engine software has a (limited) built-in uPNP/DNLA server. Also note that Plex Media Server and Logitech Media Server both have built in DNLA Servers.

On -> Settings -> Media

Wireless Configuration
Last Updated: 8/14/2013 (needs updating 6/26/2014)

The following USB wireless adapters are Plug and Play:
Alfa AWUS036H (RTL8187)
Etekcity High Power 802.11 B/N/G 300M USB Wireless 1000mw Wifi Network Adapter with Dual Antenna (RT3072) - You can save yourself a few dollars picking up a generic one from China on Ebay.

These USB wireless adapters are not Plug and Play:
Airlink101 AWLL5099
Mini Wireless 150Mbs USB Ralink RT5370

NETCFG has been replaced by NETCTL

#install netctl and related packages
pacman -Sy wireless_tools netctl ifplugd wpa_actiond

#Connect to wireless network and create wireless profile
cd /etc/netctl

#check if wireless profile got created
#you should see wlan0-SSIDName
ls /etc/netctl

#Auto Connect to Wireless Network
systemctl enable netctl-auto@wlan0.service

#Auto Connect to Wired Network
systemctl enable netctl-ifplugd@eth0.service

#reboot and test

Motion WebCam

Attach a USB Webcam to your Pogoplug and turn it into a surveillance system.
More info -

Confirmed working with:
Logitech HD Webcam C270

#install motion and other required packages
pacman -S motion x264 fswebcam

#change to motion folder and edit motion.conf file
cd /etc/motion

#turn off localhost access only
sed -i 's:webcam_localhost on:webcam_localhost off:' ./motion.conf

#adjust resolution to 640x480
sed -i 's:width 320:width 640:' ./motion.conf
sed -i 's:height 240:height 480:' ./motion.conf

#disable http remote control
sed -i 's:control_port 8080:control_port 0:' ./motion.conf

#change webcam http port to 8088
sed -i 's:webcam_port 8081:webcam_port 8088:' ./motion.conf

#change folder where picture/video are saved
sed -i 's:/usr/local/apache2/htdocs/cam1:/media/usb/share/motion_capture:' ./motion.conf

#create required folders
mkdir -p /var/run/motion
mkdir -p /media/usb/share/motion_capture
#Start motion and access webcam @ http://pogoplug:8081
#Bug in Chrome, no longer allow you to view stream.
#Use Firefox or VLC

#A little hack to get motion to detect webcam correctly
fswebcam -r 320x240 -d /dev/video0 -v /dev/null

#start motion (non-daemon mode)
motion -n

#download service file, includes fswebcam hack
cd /etc/systemd/system

#auto start motion on reboot
systemctl enable motion

BitTorrent Sync

BitTorrent Sync is a free utility that uses the bittorrent protocol to keep folders in sync across devices. It can be used with OS X, Windows, Android and Linux.

#create folder
mkdir -p /usr/local/bin
cd /usr/local/bin

#download and untar
tar -xzvf btsync_arm.tar.gz

#delete unneeded files
rm LICENSE.TXT btsync_arm.tar.gz

#download service file
cd /etc/systemd/system

#start btsync
systemctl start btsync

#autostart btsync on reboot
systemctl enable btsync


Transmission, Sabnzbd, SickBeard and CouchPotato

Requires a swap partition or swapfile - 1GB recommended.

pacman -Sy sabnzbd sickbeard-git couchpotato-git transmission-cli python2-pyopenssl

#start and stop all apps to create config files
systemctl start transmission sabnzbd couchpotato sickbeard

#check status
systemctl status transmission sabnzbd couchpotato sickbeard

#shut them down
systemctl stop transmission sabnzbd couchpotato sickbeard

#transmission - allow login from any computer
cd /var/lib/transmission/.config/transmission-daemon/

sed -i 's^"rpc-whitelist-enabled": true^"rpc-whitelist-enabled": false^' ./settings.json

#sabnzbd - allow login from any computer
cd /opt/sabnzbd
sed -i 's^host = localhost^host =^' ./sabnzbd.ini

#start all
systemctl start transmission sabnzbd couchpotato sickbeard

#auto start after reboot
systemctl enable transmission sabnzbd couchpotato sickbeard

#make sure you change the permission of your folders appropriately
#chmod 777 /media/usb/share/downloads

# sabnzbd - http://alarm:8080
# couchpotato - http://alarm:5050/
# sickbeard - http://alarm:8081/
# transmission - http://

TimeMachine Backup
Configure Netatalk in Arch Linux for Time Machine Goodness

OpenVPN (Client)

As a reference please check out my other two tutorials on OpenVPN:
[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN
[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)

pacman -Sy openvpn

#generate keys on CA and copy them over
mkdir -p /etc/openvpn/keys

#copy sample client.conf to /etc/openvpn
cp /usr/share/openvpn/examples/client.conf /etc/openvpn

#edit openvpn client.conf
nano /etc/openvpn/client.conf

#Update the following lines
#remote vpnserverIPAddress 1194
#ca /etc/openvpn/keys/ca.crt
#cert /etc/openvpn/keys/pogoplug.crt
#key /etc/openvpn/keys/pogoplug.key

#start VPN manually to test
openvpn --config /etc/openvpn/client.conf

#autostart OpenVPN client on reboot
systemctl enable openvpn@client.service


pacman -Sy webmin perl-net-ssleay nano

#allow any IP to connect
sed -i 's^^' /etc/webmin/miniserv.conf

#start webmin
systemctl start webmin

#auto start after reboot
systemctl enable webmin


Mongoose (Simple Web Server)

pacman -U

pacman -Sy php-cgi

#Optional - Edit mongoose.conf

#nano /etc/mongoose/mongoose.conf

systemctl start mongoose
systemctl enable mongoose

#place files in /srv/http
#Access Web Server @ http://alarm:8088

OwnCloud (nginx php-fpm sqlite)

Note - I'm no longer actively working on owncloud. The default PogoPlug software works well enough for my needs. There is a bug with using a self sign certificate (expect a WebDav error). You'll need to mount a different disk for your owncloud data folder - /srv/http/owncloud/data (I was not able to get owncloud working if I used a different data folder path).

pacman -Sy owncloud nginx php-fpm sqlite3 php-sqlite

#copy owncloud files

cd /srv/http
cp -R /tmp/owncloud .

#update owner

chown http:http /srv/http/owncloud 
chown http:http /srv/http/owncloud/config
chown http:http /srv/http/owncloud/apps

#uncomment out required modules
sed -i 's^;^^' /etc/php/php.ini
sed -i 's^;^^' /etc/php/php.ini
sed -i 's^;^^' /etc/php/php.ini
sed -i 's^;^^' /etc/php/php.ini
sed -i 's^;^^' /etc/php/php.ini
sed -i 's^;^^' /etc/php/php.ini

#Maximum execution time of each script, in seconds
sed -i 's^max_execution_time = 30^max_execution_time = 300^' /etc/php/php.ini

#Maximum amount of time each script may spend parsing request data.
sed -i 's^max_input_time = 60^max_input_time = 600^' /etc/php/php.ini

#Maximum allowed size for uploaded files.
sed -i 's^upload_max_filesize = 2M^upload_max_filesize = 100M^' /etc/php/php.ini

#Maximum size of POST data that PHP will accept.
sed -i 's^post_max_size = 8M^post_max_size = 400M^' /etc/php/php.ini

#Maximum amount of memory a script may consume
sed -i 's^memory_limit = 128M^memory_limit = 512M^' /etc/php/php.ini


#backup config and download working nginx.conf
cd /etc/nginx 

mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.original

#Configure SSL

#create folder to store certs
mkdir -p /etc/nginx/certs
cd /etc/nginx/certs

#Now create the server private key

#you'll be asked for a passphrase
openssl genrsa -des3 -out pogoplug.key 1024

#Create the Certificate Signing Request (CSR):
openssl req -new -key pogoplug.key -out pogoplug.csr

#Remove the necessity of entering a 
#for starting up nginx with SSL using the above private key:
cp pogoplug.key

openssl rsa -in -out pogoplug.key

#sign the certificate using the above private key and CSR
openssl x509 -req -days 3650 -in pogoplug.csr -signkey pogoplug.key -out pogoplug.crt

#start nginx and php-fpm
systemctl start php-fpm
systemctl start nginx

#autostart nginx and php-fpm after reboot
systemctl enable php-fpm
systemctl enable nginx

#Finish configuration via https://PogoPlugIPAddress/owncloud/ or https://pogoplug/owncloud

Backup and Restore

Having a backup is always a good idea and is highly recommended. Its quick and simple and will save you the hassle of re-installation from scratch if anything ever happens to your flash drive (very common) or if you want to duplicate/clone your setup to another Pogoplug.

Offline Backup (Recommended) - These two methods, Disk Image and Tarball, requires unplugging the usb drive you want to backup and plugging it into another linux computer or VM, another pogoplug running ALARM (Arch Linux ARM), or same Pogoplug running alarm using a different USB flash drive.


1) Disk Image

#assumes /dev/sdb is the flash drive you want to backup
dd if=/dev/sdb of=/savetopath/pogoplug.e02.rootfs.backup.img bs=4M

#restore, swap if (in) and of (out)
dd if=/savetopath/pogoplug.e02.rootfs.backup.img of=/dev/sdb

2) Tarball (recommended and what I use)

#assumes the flash drive you want to backup is /dev/sdb1

mkdir /tmp/usb
mount /dev/sdb1 /tmp/usb

#backup to root
cd /tmp/usb
tar -cvzf /pogoplug.e02.rootfs.backup.tar.gz ./

cd /tmp/usb
tar -xzvf /pogoplug.e02.rootfs.backup.tar.gz

Online Backup using rsync

NTFS Formatted Drives

I'm not a fan of using NTFS drives with the Pogoplug for various reasons - performance, complexity, non-native linux, etc. If you have the option, my recommendation is to keep things simple and dedicate a ext3 formatted drive to your Pogoplug.

However, I understand in certain cases you have no choice - like when your data is already on a NTFS drive and you have nowhere to back it up. So saying that, try the following:

pacman -Sy ntfs-3g udevil
systemctl enable devmon@root.service
systemctl start devmon@root.service
df -h
#you should see your drive mounted under

#You might need to edit
nano /etc/udevil/udevil.conf

Please see Obihoernchen's blog for some NTFS performance tip. Also note, people have reported boot up issues with NTFS drives attached.

Again, this is something I don't use so I can not support it. And again, keep things simple and use a dedicated ext3 drive if possible.

Reverting Back to Stock

E02 model only. V4 doesn't have the option to boot to stock OS with USB flash drive unplugged.
Credit to Moustafa.

This isn't truly reverting your Pogoplug back to stock. What it will do is allow you to disconnect your USB flash drive from your Pogoplug and have it boot up to the default Pogoplug OS and connect to the service.

During the uBoot installation, the script asks whether to disable pogoplug service, and the default answer is y

Would you like to disable the pogoplug services? [Y/n]

You can turn back on the service by the following steps:
  1. Boot into original firmware (disconnect all USB drives)
  2. Connect using SSH
  3. Edit /etc/init.d/rcS script, and remove the comment(#) in front of the line reading /etc/init.d/ start
After rebooting into original firmware again, the services will be available as before.

Troubleshooting ALARM Boot Up Issues

The most common (and frustrating) issue with the Pogoplug and Arch Linux ARM is getting your Pogoplug to boot up consistently. This is not going to be an exhaustive troubleshooting guide, but I did want to point out some things I've learned and experienced that may help you.

- Double check your router for the correct IP Address of your Pogoplug. Otherwise use a network scanning tool like AngryIP (Legacy) to confirm the IP Address of your Pogoplug. On my iPhone, I use a free app call iNet.

- Not all USB drives (flash or hd) will behave the same. Use a high quality name brand USB drive if possible. If you experience boot up issues, try a different USB flash drive or hard drive. I've noted the USB drives that I've had success with above.

- USB flash drive or hard drive is corrupted due to improper shutdown. Plug the flash drive into a linux computer or another Pogoplug running ALARM and perform a fsck.

#/dev/sdb1 = drive and partition that needs fixing
fsck /dev/sdb1

- A cold/hard boot (disconnect/reconnect power cord) can behave differently than a warm boot (executing the 'reboot' command via the console). Yes, very strange. I've experienced where if I do a cold boot, the default Pogoplug OS will boot up and not ALARM. However, if I execute a reboot command from within the default Pogoplug OS, ALARM will boot up properly. I've also experienced the opposite, where ALARM will boot up properly from a cold boot, but if I execute a 'reboot' command via the console, ALARM will not boot properly. This all depends on your USB flash/hard drive. Try the following, it may help and typically it shouldn't hurt. I'm using the below bootcmd for two of my Pogoplugs with Western Digital My Passport drives.

#E02 - Only. Fix boot issue with some USB drives
#credit -
#print default bootcmd value
fw_printenv bootcmd

#default bootcmd
#[root@pogoplug ~]# fw_printenv bootcmd

#bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; #run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; #reset

#update bootcmd value to start, stop and start usb again
#all one line
fw_setenv bootcmd "usb start; usb stop; usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset"

#confirm update
fw_printenv bootcmd

- If you plan to attach a hard drive for SAMBA, try installing ALARM on a small partition on the hard drive (4GB) and skip using a USB flash drive. This will allow you to avoid any boot up issues related to multiple USB drives attached. [Update - 9/25/2013] I've updated the SAMBA installation section.

- If you have multiple USB drives attached, try Moustafa blog - Booting Pogoplug From The Correct USB Disk. Note that Moustafa's blog isn't applicable if you're having boot up issues with only one USB drive attached.

Setup Netconsole to see what truly is happening. Netconsole allows you to remotely view the Pogoplug boot up process. Here is a tutorial on setting up Netconsole.

- Do a re-installation. Unplug your USB drive and start over. During the uboot installation, reset the uboot env back to default.

- Try using a static IP Address. After installing ALARM to your USB drive (do not reboot), while still in the Pogoplug OS, edit the /tmp/usb/etc/netctl/eth0 file. You'll need to use vi (google if you're not familiar with using vi).

#while in the Pogoplug OS, after installing ALARM
vi /tmp/usb/etc/netctl/eth0

The content of the eth0 file should look like the following:

Description='A basic static ethernet connection'

- Corrupted uBoot Environment. You'll need to reset via a Serial console. Please see my tutorial on setting up a Serial Console Connection for the Pogoplug E02.

- On the Pogoplug V4 and Mobile, booting up to the default Pogoplug OS without the USB drive attached is not support; you'll get a green blinking led. If your installation is corrupted or not working for whatever reason and want to reinstall ALARM, you'll need to use another linux computer -

Miscellaneous Commands

#update hostname to pogoplug
hostnamectl set-hostname pogoplug

#change password

#poweroff (note that the light will not turn off)
sync #just in case

#check what ports are used/listening on
netstat -nptl

#check disk space usage, human readable output
df -h


That's it for now.

Please leave a comment if this is helpful or if you run into any issues. Thanks

Please consider donating to the Arch Linux ARM group. They are the ones that made this possible.