Thursday, January 06, 2011

[Pogoplug] Install/Uninstall PlugApps to a USB flash drive

- Make sure all the wires are linked ( network, power, usb )
- Get IP address of pogoplug from router/modem
- Log into my.pogoplug.com to enable SSH access and set a password.
- SSH into pogoplug as root with putty.

- Partition/format the USB Drive on which you will install PlugApps
cd /tmp
wget http://plugapps.com/os/pogoplug/mke2fs
chmod 755 mke2fs
killall hbwd # This will turn off my.pogoplug.com functionality temporarily and unlock the USB drive for PlugApps installation.
/sbin/fdisk /dev/sda # delete all existing partitions and create a new one
./mke2fs /dev/sda1
/sbin/reboot


- Unplug usb and reboot and plugin usb when restarted

- Install PlugApps

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. Then upload it into the root of usb drive via my.pogoplug.com.

SSH again.

cd /tmp/.cemnt/mnt_sda1
# wget http://openpogo.com/base/openpogo-usb.tar.gz
# tar -xzvf openpogo-usb.tar.gz
tar -xzvf opt.tar.gz
mount -o rw,remount /
ln -s /tmp/mnt_opt/.opt /opt

# 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.

cp /etc/init.d/rcS /etc/init.d/rcS.original
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

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

cp /tmp/.cemnt/mnt_sda1/.opt/mount_opt /etc/init.d/
rm /tmp/.cemnt/mnt_sda1/openpogo-usb.tar.gz
chmod 755 /etc/init.d/mount_opt

/sbin/reboot


- SSH again after restart

Change to the original repository


Since OpenPogo is no longer maintained you should change to the original repository:

Change to the ipkg configuration directory
cd /opt/etc/ipkg

Check the name of the conf file
ls

You should see some filename with .conf in the ending, then edit this file
vi or nano filename.conf (probable armel-feed.conf)

Comment out current repo
"src cross http://openpogo.com/repo" 
to 
"#src cross http://openpogo.com/repo"

Then add the new repo underneath
src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable

Exit from your editor, then reboot your system
sync
sync
reboot

Once rebooted, log back in to your system and do an update
ipkg update


Congratulations! OpenPogo should now be successfully installed and you are all ready to go. Just log back in using ssh again.

UNINSTALL

In case you need to uninstall PlugApps, SSH into pogoplug first:
mount -o rw,remount /
mv /etc/init.d/rcS.original /etc/init.d/rcS
rm /etc/profile
rm /etc/mount_opt
rm /opt
mount -o r,remount /
rm -r  /tmp/.cemnt/mnt_sda1/.opt
/sbin/reboot

Reference:
How-to-Install-or-remove-OpenPogo-on-Your-Pogoplug-Attached-USB-Drive/

2 comments:

Arshad said...

Hey Chris, I had installad Plugapps on my Pink Pogoplug which worked fine. I tried to un-install it using your method described, but i think I have messed up my Plug.

Now I managed to get the serial link working but what should I do to get my plug working again.

Used the following method to uninstall plugapps:

mount -o rw,remount /
mv /etc/init.d/rcS.original /etc/init.d/rcS
rm /etc/profile
rm /etc/mount_opt
rm /opt
mount -o r,remount /
rm -r /tmp/.cemnt/mnt_sda1/.opt
/sbin/reboot


regards,

Arshad

Chris D. said...

Arshad, what is the condition of your plug? Is it not bootable or cannot link to network? Was there any error reported when you uninstall ?
Cause the stuff is in a usb drive, you can pull it out and restart your plug to see how it works.

I'm sorry I don't have experience on serial cable. You can try to google or get help at pogoplug forum: http://www.pogoplugged.com/forums.