Hi,
after completing the installation procedure you described, I issued the ipkg update command and I got and error msg saying that the command hasn't been found. I actually have a doubt about the command 10:
ln -s /tmp/mnt_opt/.opt /opt
Shouldn't be
ln -s /tmp/.cemnt/mnt_sda1/.opt /opt
instead?
Does the procedure also work if the USB is formatted with NTFS?
Thanks
How to Install (or remove) OpenPogo on Your Pogoplug-Attached USB Drive
Categories: PogoPlug Development
Update 4/2/10 - This guide does work for both V1 (brick) and V2 (pink) pogoplugs and also the Seagate dockstar. I have it installed on a V2 pink plug and it continues to work after the recent 2.1 Pogoplug upgrade. The recent 2.1 upgrade disabled telnet entirely and disabled ssh by default. ssh must be enabled from the settings page of my.pogoplug.com before starting this installation. All references to telnet need to be replaced by ssh. Please do not confuse this article with plugapps. This implementation of Openpogo provides additional features to the existing Pogoplug software by creating an opt folder on the USB drive that allows installation of Optware ipkg applications.
Updated 2/4/2010 to fix a bug in step 14 found by cdhyper - Thanks!! see this thread:
http://www.pogoplugged.com/forum/thread/12345/OpenPogo-and-Pogoplug-v2-Pink/
The OpenPogo project is doing a great job of adding features to the Pogoplug. His base system is loaded into the /opt folder on the Pogoplug's spare flash memory, but what do you do if you fill up that ~400MB?
An alternative would be to mount the /opt folder on a USB drive attached to the Pogoplug, and then you are only limited by the size of the USB drive. Sound good? It really isn't that difficult and can be done though ssh or telnet. It does require that the read only file system be changed, so be aware that there is a risk of bricking the Pogoplug. However, in this tutorial, I have tried to minimize the changes and the risk. Two files are created (profile and mount_opt), another file is backed up and then edited (rcS) and one sysmlink is created (link to opt on the USB drive) in the Pogoplug software, everything else is done in relative safety on the USB drive. This is not a replacement for OpenPogo, it is just an alternative method of installing it. All of the goodies over at OpenPogo will still work with this installation.
Telnet is available on both Windows and Linux; as such, these instructions were tested using telnet. However, you could do it just as well with ssh.
This tutorial assumes the following:
- you know the IP address of your Pogoplug (can usually bee obtained from your router),
- the Pogoplug is connected to your home network,
- your Windows/Linux PC is connected to your home network,
- your home network is connected to the internet,
- and that you have an ext2/ext3 formatted USB drive. If you need to format a USB drive with ext2 or ext3 then take a look at this article http://www.pogoplugged.com/article/12099/How-to-Partition-and-Format-a-USB-Dr...
All of the changes to the Pogoplug software will be done from the command line, so you will see every change and I will describe what each command does. I will also show you how to remove the changes at the end of the article if you decide this is not for you.
There are a number of files that are going to be loaded onto the USB drive. I have put them in a tarball and uploaded it to the Development Download section of this site. We will download that tarball and copy its contents to the USB drive. The files in the tarball are the files from the "/opt" folder in Openpogo's "openpogo-base-0.4.tar.gz" (Thanks Mike!), a file called "mount_opt" plus an "init" file from here: http://openpogo.com/forum/viewtopic.php?id=134 (Thanks tsella!). This "init" file allows programs to be started on reboot without further modifying the pogoplug software.
The following commands in bold are to be typed or cut and paste into the telnet window. Cutting and pasting is preferred as it is less error prone. If you are not familiar with cutting and pasting in a Windows console then this guide should help. http://ask-leo.com/how_do_i_paste_into_a_windows_xp_command_shell.html
Note: This article has been updated on 11/18/09. It will now work if you have more than one USB drive attached with a USB hub. The USB drives are assigned their mount point (sda, sdb, etc.) as they are detected and they are not always detected in the same order. I have added a script to detect the USB drive with the "opt" folder.
Let's get started.
- On your PC navigate to the Pogoplugged Development download page http://www.pogoplugged.com/download/list?cat=36 and download the "opt.tar.gz" file to your computer.
- Power up the Pogoplug with the ext2 formatted, but otherwise empty, USB drive plugged directly into the Pogoplug USB socket.
- On your PC open a browser and navigate to "my.pogoplug.com" and verify the empty USB drive is available. Upload "opt.tar.gz" that you just downloaded to the root of the USB drive. We will untar it later.
- On your PC bring up a command prompt/terminal and connect to the plug with telnet xxx.xxx.xxx.xxx replacing the x's with the plugs IP address. Login as root with the ceadmin password. You will now be at "/root". BTW you really should change your root password, but I will leave that for another article.
- Let's extract the files from the "opt.tar.gz" file. The first line navigates to the current root of the USB drive where we saved it. The second line extracts the files and lists them as they are extracted. They will be put in a folder named ".opt". The "." at the beginning hides it from the pogoplug software so you won't see any of these files from "my.pogoplug.com"
-
cd /tmp/.cemnt/mnt_sda1
tar -xzvf opt.tar.gz - It's time to make the changes to the pogoplug software. First we must make the pogoplug software writeable by remounting the root file system "/" as read/write (rw). We will remount it as read only when we've made the changes. Be very careful while we have it writeable.
-
mount -o rw,remount /
- The first change is adding the symlink. This command tells the operating system to look for the "/opt" folder at "/tmp/mnt_sda1/.opt'. The root of the USB drive will be at "/tmp/mnt_sda1" when we've made the changes to rcS. The ".opt" folder is where we will put the files from "opt.tar.gz"
-
ln -s /tmp/mnt_opt/.opt /opt
- Before editing rcS let's make a backup.
-
cp /etc/init.d/rcS /etc/init.d/rcS.backup
- Here are the changes to the rcS file which runs when the pogoplug boots. I'm assuming that the "/etc/init.d/rcS" file has not been modified. These three lines are added to the end of the existing file using the ">>" operator. This is a convenient way to do it as the standard pogoplug doesn't have a friendly editor. The first line just adds a comment to rcS to document we are changing the file. The second line calls "mount_opt" a script to locate and mount the USB drive with the "opt" folder. The third line tells rcS to run the "init" file on the USB drive. It will start our future openpogo applications.
-
echo '# code added below for OpenPogo /opt on USB with init on boot' >> /etc/init.d/rcS
echo '/etc/init.d/mount_opt' >> /etc/init.d/rcS
echo '/opt/etc/init' >> /etc/init.d/rcS - Our third change is to add the "profile" file. This script is executed when someone logs in via telnet or ssh. The first line is the standard header for a script. The second and third lines are comments. The last line does the work. It sets the "PATH" environment variable to include the future executable openpogo applications.
-
echo '#!/bin/bash' > /etc/profile
echo '# New profile added for OpenPogo /opt on USB' >> /etc/profile
echo '#' >> /etc/profile
echo 'export PATH=/opt/bin:/opt/sbin:/usr/bin:/usr/sbin:/bin:/sbin' >> /etc/profile - The last change is to copy the "mount_opt"script called in step 14 from the extracted tar to the folder "/etc/init.d/" and make it executable. This script is a little too long to type, so I included it in the tarball.
-
cp /tmp/.cemnt/mnt_sda1/.opt/mount_opt /etc/init.d/
chmod 755 /etc/init.d/mount_opt - We're done with our pogoplug software changes so make it read only again.
-
mount -o r,remount /
- We need to reboot but before we do that go to "my.pogoplug.com" and eject the USB drive. You can now reboot with this command. It will end the telnet session.
-
/sbin/reboot
- Wait until the pogoplug has fully booted. "my.pogoplug.com" will show the USB drive available again. The last thing to do to complete this alternate openpogo installation is to update the list of packages. Log in again using telnet and issue the command:
-
ipkg update
Your pogoplug is now at the equivalent state as after completing: http://openpogo.com/wiki/index.php5?title=GUIDE:_Installing_Base_Package except that the "/opt" folder is on your USB drive. You can delete the "opt.tar.gz" file using "my.pogoplug.com".
To prove it is really working, why not install a web server by following this guide.
http://www.pogoplugged.com/article/12032/How-To-Run-a-Web-Server-on-Your-Pogo...
Enjoy!
Removing the Changes
I promised that I would tell you how to remove these changes, so here it is.
- Login using telnet as above.
- Make the pogoplug software writeable
-
mount -o rw,remount /
- Overwrite the rcS file with the backup we made.
-
mv /etc/init.d/rcS.backup /etc/init.d/rcS
- Delete the profile and mount_opt scripts.
-
rm /etc/profile
rm /etc/mount_opt - Delete the symlink
-
rm /opt
- We've removed the pogoplug software changes so make it read only again.
-
mount -o r,remount /
- The last thing is to remove the ".opt" folder from the USB drive.
-
rm -r /tmp/.cemnt/mnt_sda1/.opt
- When you reboot, the Pogoplug will be back to where you started.
Is there any way to undo this mistake I made on my v2 pogoplug? I went to openpogo.com and installed the base package the same way I did on my v1 pogoplug, and only after doing that noticed the warning: "This guide is for the Pogoplug v1 "brick," not the newer Pogoplug V2 Pink." ...doh! now I don't know how to restore it to how it was. seems like there should be a similar process to reinstall what got overwritten by the downloaded script.
the page with instructions that I (unfortunately) followed is here:
http://www.openpogo.com/wiki/index.php5?title=GUIDE:_Installing_Base_Package
at this point the v2 pogoplug doesn't work properly, although I can ssh into it and see mounted usb drives, etc.
I installed openpogo yesterday on my pogoplug pink, and my sister unplugged the usb drive and now it i can't ssh it. the network card have the 2 leds (green and yellow) are fixed...
@pfal - the instructions are correct. When booting the mount_opt script looks for openpogo on any of the 4 usb ports and then creates another link to the physical device as /tmp/mount_opt/.opt. So a link pointing to a link pointing to a physical disk because we do not know what order the drives get mounted after reboot.
Also make sure that SSH is turned on at My.pogoplug.com.
http://placeshiftingenthusiasts.com/
Check out the Techlore Gift Buying Guide
i fixed it, i made the serial cable and restore my rcS file, reboot and work for me. Now, i have installed PlugApps and work fine...
I think I may have found a problem with the mount_opt script -- it assumes you have an ext2 filesystem on your usb drive (my drive is formatted as ext3). I was having trouble getting it to mount my /opt directory and took a look at the the script. If I manually ran the mount command without the -t ext2 option ("mount -o rw,nosuid,nodev,exec,noatime,sync /dev/sdb1 /tmp/mnt_opt") it worked.
I think this explains the problems found by the first poster.
Perhaps the mount_opt script should be updated to omit the "-t ext2" option in the mount command(s)?
-- Joe
I overwrote my rcS copy. I guess the only way to recreate is to echo redirect to recreate the original file? Plan to rename the existing rcS and then create a new one and reload. Or is there somewhere I can get a copy?
I'd just like to once again say that following the above guide won't work anymore, as OpenPogo has been discontinued. Forum admins can delete this topic.
RSS

