This procedure will allow us to use the stock Pogo V3 OS as a simple rescue system. When the Pogo V3 fails to boot with the currently attached rootfs on USB or HDD, stock Pogo OS can serve as a very simple rescue system to allow logging in through SSH and fix whatever is ailing the rootfs at the moment, eg. corrupted file system, mis-configured SSH, so on. Potentially, it can be used for more capabilities with optware or by just copying binaries to it.
Requirement:
The new u-boot has been installed in your Pogoplug V3.
Installation:
1. Setup u-boot envs:
and then add this to the end of the current bootcmd. For example, if the current bootcmd is
Shutdown the Pogo V3 and remove the current USB/HDD rootfs. Power up and it will boot into stock Pogo OS.
2. Login the Pogo OS and setup to kill the Pogo process permanently:
Find the Pogo dynamic IP address in your router, or use some scanning program such as Linux nmap, IOS Fing,... And then use the credential that you have set up previously for stock Pogo OS during intial set up to boot new U-boot and/or Debian kernel (remember that root/password ?).
After logging in, you can kill pogoplug process so it won't interfere with normal opration:
And then kill it permanently.
- Edit the file /etc/init.d/rcS:
Find the line which contains "hbmgr.sh start" and comment out the whole line, and add a new line to start dropbear:
3. Download useful utilities
While in Pogo OS, you can download the following binpack so that the normal tools for use in nand installation, fixing filesystem and create filesystem, will be available in the system (you can download it directly to the Pogo OS using wget, or download it to an USB stick on another Linux box).
Dowload at Dropbox
linux-tools-installation-bodhi.tar.gz
md5
ae8ba41ca3ab687b676ad42f26085c3c
This binpack contains these binaries (note that fw_printenv is the same binary as fw_setenv):
flash_erase, nandwrite, nanddump, fw_printenv, e2fsck, mke2fs, bzip2
Extract, and copy all binaries to /usr/loclal/bin for later emergency use.
4. Shutdown the Pogo V3, and powering up again to verify that you can login into stock OS.
DONE.
That's it! you have a simple rescue system on Pogoplug V3.
Please post feedbacks, especially about running the downloaded binaries. I have not tested this capability thoroughly.
Requirement:
The new u-boot has been installed in your Pogoplug V3.
Installation:
1. Setup u-boot envs:
fw_setenv bootcmd_stock 'setenv autoload n; setenv bootargs_stock "root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M"; setenv poweroutage yes; setenv boot "bootm 60500000"; setenv bootcmd_stock_fw "run set_bootargs_stock; run boot_nand"; setenv boot bootm 60500000; setenv boot_nand "run load_nand boot || run load_nand2 boot"; setenv kernflmode s; setenv load_nand2 "nboot 60500000 0 800000"; setenv load_nand "nboot 60500000 0 200000"; setenv set_bootargs_stock "setenv bootargs $bootargs_stock"; setenv mainlinelinux no; run bootcmd_stock_fw'
and then add this to the end of the current bootcmd. For example, if the current bootcmd is
bootcmd=run dt_bootcmd_usb; resetthen
fw_setenv bootcmd 'run dt_bootcmd_usb; run bootcmd_stock; reset'
Shutdown the Pogo V3 and remove the current USB/HDD rootfs. Power up and it will boot into stock Pogo OS.
2. Login the Pogo OS and setup to kill the Pogo process permanently:
Find the Pogo dynamic IP address in your router, or use some scanning program such as Linux nmap, IOS Fing,... And then use the credential that you have set up previously for stock Pogo OS during intial set up to boot new U-boot and/or Debian kernel (remember that root/password ?).
After logging in, you can kill pogoplug process so it won't interfere with normal opration:
killall hbwd
And then kill it permanently.
- Edit the file /etc/init.d/rcS:
Find the line which contains "hbmgr.sh start" and comment out the whole line, and add a new line to start dropbear:
###/etc/init.d/hbmgr.sh start /usr/sbin/dropbear
3. Download useful utilities
While in Pogo OS, you can download the following binpack so that the normal tools for use in nand installation, fixing filesystem and create filesystem, will be available in the system (you can download it directly to the Pogo OS using wget, or download it to an USB stick on another Linux box).
Dowload at Dropbox
linux-tools-installation-bodhi.tar.gz
md5
ae8ba41ca3ab687b676ad42f26085c3c
This binpack contains these binaries (note that fw_printenv is the same binary as fw_setenv):
flash_erase, nandwrite, nanddump, fw_printenv, e2fsck, mke2fs, bzip2
Extract, and copy all binaries to /usr/loclal/bin for later emergency use.
4. Shutdown the Pogo V3, and powering up again to verify that you can login into stock OS.
DONE.
That's it! you have a simple rescue system on Pogoplug V3.
Please post feedbacks, especially about running the downloaded binaries. I have not tested this capability thoroughly.