or, “How to turn your Pogoplug into a BitTorrent, file and web server!”
Please note: Follow the instructions below at your own risk. Please do not blame me if your Pogoplug breaks 🙂
17/06/2012 – I’ve received a number of queries via my contact page so I thought I would clarify here; existing Pogoplug functionality (such as my.pogoplug.com and the Pogoplug drivers) should be unaffected by the instructions in this post (and my other blog posts regarding customising the Pogoplug). Enjoy!
Pogoplug is a small embedded Linux device sold to enable personal cloud computing. If you have never heard of Pogoplug, check it out here.
If you have one already and would like to add support for 100s of different applications, including a BitTorrent client, Samba, Apache Web Server, CUPS etc, then read on!
The great thing about the Pogoplug is that it allows root access via SSH, and also includes an unused internal flash drive, perfect for tinkering with. In this tutorial I am going to describe the steps I took to install a package management system which gives access to a whole host of useful applications that can run directly on your Pogoplug (and lots of other packages, a list of available ones can be seen here).
1. PREPARING YOUR POGOPLUG
First, make sure you have setup your Pogoplug correctly and it is accessible from my.pogoplug.com.
- Log in to my.pogoplug.com with your username and password
- Go to “Settings” > “Security Settings” page and tick “Enable SSH access for this Pogoplug enabled device”
Now you need to find the IP address of your Pogoplug in your local network. There are lots of different ways to do this, probably the most straightforward is to login to your router and look through the list of connected Ethernet devices. Once you have found your Pogoplug’s local IP address, you can SSH to it using a terminal application.
- Open up a terminal (instructions for Windows, Linux and Mac)
- Once you have your selected terminal open, type the following (replacing “123.456.789.100” with your Pogoplugs IP address:
- ssh firstname.lastname@example.org
- When prompted for a password, use “ceadmin” and hit enter
Congratulations! You are now connected to your Pogoplug.
2. CHECKING THE FILESYSTEM
Different Pogoplug models have varying filesystem structures. Depending on the version of your Pogoplug, you may need to use an external USB stick as storage for custom applications.
From the terminal currently connected to your Pogoplug, run the following:
mount -o remount,rw / mkdir /opt
If you see output from this command as:
Then you have a mtdblock3 partition. However, if you see the message:
ls: /dev/mtdblock3: No such file or directory
then you DO NOT have a mtdblock3 partition. Continue with the instructions below based on whether you have a mtdblock3 partition or not.
If you have a mtdblock3 entry
Run the following step:
mount /dev/mtdblock3 /opt
Now skip straight to to section 3 (“Installing a package management system”).
If you DO NOT have an mtdblock3 entry
If you do not see an mtdblock3 entry, you probably have a newer version of the Pogoplug which does not contain the spare mtdblock3 partition. In this instance, the best workaround I have for this at the moment is to mount an external USB stick and use that as the location to install packages. The instructions below will talk you through doing this.
Note that you will require:
- a USB stick
- a spare USB port in the Pogoplug (the USB stick will need to stay connected to the Pogoplug permanently)
When you have these, do the following:
- From the my.pogoplug.com interface, eject all drives currently attached and physically remove the drives from the Pogoplug
- SSH to the Poguplug and run “df -h”
- Plug the USB stick into the Pogoplug
- Run “df -h”. Look for the new entry since the last command was run, you should see something similar to the following:
/tmp/.cemnt/sdb1 1009.7M 48.0k 1009.7M 0% /tmp/.cemnt/mnt_sdb1
- Look for the drive name (the first entry on this line), e.g. “/tmp/.cemnt/sdb1”
- Mount the USB stick by performing the following (replacing with your drive name):
mount /tmp/.cemnt/sdb1 /opt
- Go to my.pogoplug.com and eject the USB stick
Now you have a USB stick mounted as storage for custom applications, you can continue with the instructions in the next step.
3. INSTALLING A PACKAGE MANAGEMENT SYSTEM
Now it’s time to install a lightweight package management system on the unused internal flash drive – this will enable us to install a whole host of useful packages that are not included on the Pogoplug as standard.
Copy and paste the following into your connected SSH session to prepare your Pogoplug for installing applications (it may be worth copying and pasting a line at a time and checking for any errors before continuing with the next step):
cd /opt wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ipkg-opt_0.99.163-10_arm.ipk tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf - mkdir -p /opt/etc/ipkg echo "src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable" > /opt/etc/ipkg/armel-feed.conf echo "src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable" >> /opt/etc/ipkg/armel-feed.conf
busybox | head -n1
You should see a version number for BusyBox. Continue with the instructions below based on your version number:
If you have version “BusyBox v1.7.0”
Run the following:
If this runs without errors, continue to section 4 (“Complete!”).
If you see an error similar to the following:
ipkg_download: ERROR: Command failed with return value 4: `wget –passive-ftp [...]
Then run the commands in the section below to update your version of wget, before continuing to section 4 (“Complete!”)
If you DO NOT have version “BusyBox v1.7.0” (e.g. “BusyBox v1.16.1”)
Newer versions of Busybox require manually updating the wget package that comes with your version of Busybox. To do that, you should be able to run the following:
cd /tmp/ wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/wget_1.12-2_arm.ipk tar xvzf wget_1.12-2_arm.ipk tar xzvf data.tar.gz -C / mv /usr/bin/wget /usr/bin/wget.old ln -s /opt/bin/wget /usr/bin/wget /opt/bin/ipkg update /opt/bin/ipkg install libnsl
Now you have the package manager installed, congratulations, there are a whole host of applications available at your disposal! You can see a list here, or by executing “/opt/bin/ipkg list” from the command line of your Pogoplug.
If you want Samba support on the Pogoplug, I’ve documented that here.