— updated 2012-05-27 —
As OddballHero points out in the comments, there is an easier way to do this than my lengthy instructions
- Register to join the nslu2 Yahoo group. It’s quick and easy.
- Check out the plug.tar.gz file (read the comments provided for that file). It’s an archive that has all the important files ready to go. It can save you a lot of time and work.
- You should also take a gander at the profile file they provide
- Once you follow the instructions on the Yahoo group installing rsync is as simple as
ipkg install rsync
— updated 2012-05-27 —
These instructions are meant to help you to setup a packaging system on your PogoPlug so that you can easily install popular software on your PogoPlug. I have only run these commands on the PogoPlug Pro (Model POGO-P21). I make no guarantees as to whether or not these instructions will work for you. I bought my PogoPlug primarily for backing up files. I find that using rsync on your PogoPlug is significantly faster and more reliable than using the PogoPlug desktop software for copying data and so installing rsync is the focus of this post. I personally do not like how the PogoPlug company is run, and I think their software is awful for the most part, but I do admire the hardware. If you want to get even more in-depth into PogoPlug hacking, check out the instructions at Arch Linux Arm, but I think Optware and ipkg are enough for most people. For this project you will need a USB flash drive that can host this software on the PogoPlug indefinitely. I was able to first accomplish this for myself thanks to the people at the NSLU2 project. My instructions are adapted from instructions I originally followed from their website. Their work in helping others use plug computers for more than their intended purpose makes this all possible. ipkg is the name of the package manager. It was used and has been used by a
lot of projects. Optware is one of the projects that uses ipkg. Enable SSH for your PogoPlug. You can do this in the settings page when you log in to your my.pogoplug.com account SSH in to your PogoPlug. The username will be [root] and the password will be whatever you set in the Settings page at my.pogoplug.com. Connect the USB drive that you will be using to host our /opt directory. One way to see a list of the filesystems mounted on your PogoPlug is to use df (disk free)
You should see output like the following.
Filesystem 1K-blocks Used Available Use% Mounted on ubi0:rootfs 104404 14600 89804 14% / none 62880 16 62864 0% /tmp /tmp/.cemnt/sda1 976758780 56935880 919822900 6% /tmp/.cemnt/mnt_sda1 /tmp/.cemnt/sdb1 990744 20300 920116 2% /tmp/.cemnt/mnt_sdb1
I can see from this output that my USB drive (1GB large) is being referred to as sdb1, while the drive hosting my pictures, music, etc. (1TB large) is referred to as sda1. We care about the USB drive that we’ll be using to install ipkg and Optware. In my.pogoplug.com, eject the USB drive for Optware. In my case, this drive is the smaller 1GB USB drive that I am dedicating to Optware. I named it “PNY OPT” while it was plugged into my computer, and that is the name I see in my.pogoplug.com. Format the USB drive for Linux (this erases all data on the drive)
Run this command to remount the root filesystem as read-write (it’s read only by default)
mount -o remount,rw /
Make a directory where we will mount our USB drive
Mount your drive at the /opt directory
mount /dev/sdb1 /opt
If you re-run our df command, you should now see that the USB drive is mounted on the /opt directory
Filesystem 1K-blocks Used Available Use% Mounted on ubi0:rootfs 104404 14600 89804 14% / none 62880 16 62864 0% /tmp /tmp/.cemnt/sda1 976758780 56935880 919822900 6% /tmp/.cemnt/mnt_sda1 /dev/sdb1 990744 20 940396 0% /opt
Now that the USB drive is mounted and ready, we can start to install some software. First, let’s get a better version of wget than what comes bundled on the PogoPlug We’ll change to the temp directory when we download our software
cd /tmp wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/wget_1.12-2_arm.ipk
Untar (unzip) this package into /tmp.
tar xzvf wget_1.12-2_arm.ipk
Although three files are unzipped, we only care about one. data.tar.gz. This file contains the binary. Untar the data (binary) files for wget into our /opt directory
tar xzvf data.tar.gz -C /
Now that we have a newer version of wget, let’s replace the existing version on the PogoPlug. First, rename the stock version of wget as wget.old
mv /usr/bin/wget /usr/bin/wget.old
Then, create a link at /usr/bin/wget to the new wget binary we installed
ln -s /opt/bin/wget /usr/bin/wget
Now if you run wget, you’re running our newer version. Next, we’ll setup ipkg, the actual package manager that will make the rest of our installs much easier. Download the ipkg package to /tmp (you’re still in the /tmp directory, right?) using our newer version of wget
Again, we’ll run our tar command, but this time on the ipkg file
tar xzvf ipkg-opt_0.99.163-10_arm.ipk
Let’s unzip the binary files for the ipkg software into our /opt directory
tar xzvf data.tar.gz -C /
Now we need to tell ipkg where to look for software when we ask it to do an install
echo 'src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable' >> /opt/etc/ipkg.conf
You should now be able to run a simple ipkg update command and see a success message. ipkg should state that it was able to see our mirror that we just added to the config
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages Updated list of available packages in /opt/lib/ipkg/lists/cross Successfully terminated.
This step is optional, but if you’re like me and don’t have a lot of experience with vi, you may want to install a more friendly text editor like nano
/opt/bin/ipkg install nano
You can update the PATH variable so that instead of having to type /opt/bin… in front of all your applications installed by optware, you can just type the application name
Now add /opt/bin and /opt/sbin to your PATH variable so that it looks like this.
#!/bin/bash export PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin
Then close and save the file, and run
so that your profile is immediately updated with the new PATH variable.
Re-mount the / filesystem as read-only so we don’t break something by accident
mount -o remount,ro /
Although / is now read-only, /opt is mounted on our USB drive which is not read-only, so you’ll still be able to write files to the /opt directory when running ipkg installs.
You should finally be able to run
ipkg install rsync
to install rsync, and relax. Now using rsync is up to you. One tip if you have issues, is that you may need to specify –rsync-path in your rsync command when trying to remotely connect to your PogoPlug, and in this case the rsync-path would be /opt/bin/rsync.