Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Pogoplug v4 Optware ipkg, how to restore /etc/init.d/rcS (4 replies)

$
0
0
I installed ipkg on my stock Pogoplug mobile v4 using this as a guide: http://blog.qnology.com/2013/11/how-to-install-optware-and-samba-on.html

I rounded up and installed all the required files / programs and had a working system until I made some bad edits to /etc/init.d/rcS that broke it. I did save a backup of unmodified rcS. I have broke ssh access and am not sure the system is reaching a running state at this point. The LED's blink upon power up, then both go out.

I have installed systools along with other packages with optware, and they are all installed under /opt.

I have ordered a USB to Serial TTL cable: http://www.newegg.com/Product/Product.aspx?Item=9SIA27C3GX9504

Would there be anything to try before my serial cable arrives? With a serial cable, will it allow me to log into a shell environment? I plan on using pico or minicom for access from my Arch desktop box.

---------------------------------------------------------------------------------------------------------------------------------------------------------

I ran into a few show stoppers during the ipkg install that I figured out and thought I would pass on as I saw others having similar issues.

I couldn't log into ssh after enabling it on the pogoplug web access. The following didn't work.

ssh [ip address]

After a bit of trial and error, this did the trick. You have to log in as root, using the password you created for ssh on the Pogoplug website.

ssh root@192.168.2.135 -oKexAlgorithms=+diffie-hellman-group1-sha1

The next thing was the source url's in the guide no longer work. I did find the required files / programs, but they were on github which uses https, and wget on my Pogo wasn't complied to handle it. I downloaded the files using my desktop, and setup a tiny, very basic http file server called webfs on it. That solved the wget issue.

Next issue revolved around the Pogo not having the right sources defined in env variables. I couldn't run ipkg or most other on board programs before fixing it with:

export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin

Now I could run all the stock programs supplied via busybox. I installed systools to replace busybox, and a few other programs before I messed up rcS trying to automate some of the below commands upon bootup.

Starting from ssh-ing in, performed the following commands to get everything working right:


[jeff@Arch2014p9 ~]$ ssh root@192.168.2.135 -oKexAlgorithms=+diffie-hellman-group1-sha1
password
~ # killall hbwd
~ # export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin
~ # fdisk -l
~ # mount /dev/sda1 /opt
~ # ls -a /opt
~ # mount -o rw,remount /
~ # export SHELL=/opt/bin/bash
~ # bash
~ # ipkg update

I'm thinking for future, copying the entire modified Pogo system over to run off USB or SD card so future breakage can be easily fixed. I'd like to try to retain the stock Pogoplug functionality, but just enhance it with wget over ssh capacity, then use it as a redundant backup system, one copy on external USB hdd, the other copy on line via Pogoplug free storage. Does this plan sound do-able?

Viewing all articles
Browse latest Browse all 3247

Trending Articles