Rescue System Pogo V3 - Using Stock Pogo V3 OS

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.

and then add this to the end of the current bootcmd. For example, if the current bootcmd is

bootcmd=run dt_bootcmd_usb; reset

then

fw_setenv bootcmd 'run dt_bootcmd_usb; run bootcmd_stock; reset'

Note: the idea is to add run bootcmd_stock to your current bootcmd. It might be different than the example.

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, and some do some cleanup.

2A. 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

2B. Edit the file /etc/init.d/rcS to kill pogoplug service permanently.

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

2C. Comment out these lines to ensure booting without NAND checksum errors:

While in Pogo OS, you can download the following binpack so that the normal tools for use in nand installation and fixing filesystem, will be available in the system (you should download it to your USB rootfs using another Linux box).

Booting into the stock pogoplug OS doesn't seem to be working for me. When I detach the USB rootfs, the pogoplug seems to keep trying and failing to boot - LED flashes green, then stays lit for a minute, flashes again, and then turns orange before starting the cycle over. During this cycle, I am unable to ssh to the pogoplug. Once I plug the USB rootfs back into the machine, it boots up into Debian on the next try.

emac Wrote:
-------------------------------------------------------
> Booting into the stock pogoplug OS doesn't seem to
> be working for me. When I detach the USB rootfs,
> the pogoplug seems to keep trying and failing to
> boot - LED flashes green, then stays lit for a
> minute, flashes again, and then turns orange
> before starting the cycle over. During this
> cycle, I am unable to ssh to the pogoplug. Once I
> plug the USB rootfs back into the machine, it
> boots up into Debian on the next try.

Do you have serial console? or did you set up netconsole? if you did, post the boot log here. If neither, then set up netconsole first so you can see what's going on.

Apologies since much of this is new for me. I believe I have netconsole set up properly, at least according to this blog post. However, I can't for the life of me get netcat to print the messages on the receiving machine. I am able to see the UDP messages coming through to my machine using Wireshark, however, and maybe that output might help? When I boot with the Debian USB, I see:

Quotebodhi
When you see this, then your netconsole is working. Now just a matter of being able to interrupt it. Instead of using 2 commands like in Jeff post. You can try to use one like this:

Do I need to be able to interrupt boot to debug the problem of not booting into stock OS? I still am unable to listen to the netconsole output on my machine. The above log was pulled from the messages I could see through wireshark, but when trying to listen from my console, I am able to ping the pogoplug, but see no actual messages coming through when it reboots. I want to be able to boot into the stock OS, but as you can see when I remove the USB running debian, the boot process fails out until I plug the USB back in at which it boots into debian.

Quotebodhi
> When you see this, then your netconsole is
> working. Now just a matter of being able to
> interrupt it. Instead of using 2 commands like in
> Jeff post. You can try to use one like this:
>

>
> Do I need to be able to interrupt boot to debug
> the problem of not booting into stock OS? I still
> am unable to listen to the netconsole output on my
> machine. The above log was pulled from the
> messages I could see through wireshark, but when
> trying to listen from my console, I am able to
> ping the pogoplug, but see no actual messages
> coming through when it reboots. I want to be able
> to boot into the stock OS, but as you can see when
> I remove the USB running debian, the boot process
> fails out until I plug the USB back in at which it
> boots into debian.

It would be easier to have netconsole or serial console. Netconsole is a whole different topic which covers what OS, and command do you use to set up netconsole server, ... However, if you can't make netconsole work and don't have serial console, you could boot into Debian and list

cat /proc/mtd
cat /etc/fw_env.config
fw_printenv

post the output here and I will take a look, perhaps something is wrong in u-boot envs.

Or if you want to get netconsole working first, post exactly what OS you're running netconsole server on, which command, and whether there is a router/switch in the middle of the connection, what your u-boot envs for netconsole look like.

As far as getting netconsole to work, I am trying to run the server off of a chromebook using crouton running xfce4. When I tried using your recommended command:

nc -lup 6666 xx.xx.xx.xx 6666

I received an error "nc: Cannot assign requested address"

nc -l -u -p 6666 & nc -u xx.xx.xx.xx 6666

The above commands work without error, both together or run separately, but never print any messages from the pogoplug as it starts up, even though I can see the messages on wireshark. There is a router between

>
> This did the trick, thank you.
>
> As far as getting netconsole to work, I am trying
> to run the server off of a chromebook using
> crouton running xfce4. When I tried using your
> recommended command:
>

nc -lup 6666 xx.xx.xx.xx 6666

> I received an error "nc: Cannot assign requested
> address"
>
>

nc -l -u -p 6666 & nc -u xx.xx.xx.xx
> 6666

> The above commands work without error, both
> together or run separately, but never print any
> messages from the pogoplug as it starts up, even
> though I can see the messages on wireshark. There
> is a router between

Netcat comes in many flavors. With crouton, I believe you're running Ubuntu on top of Chrome file system. If that is true, check the netcat version, and make sure you're using netcat traditional, not BSD version. Possible command on Ubuntu is:

Quotebodhi
Netcat comes in many flavors. With crouton, I believe you're running Ubuntu on top of Chrome file system. If that is true, check the netcat version, and make sure you're using netcat traditional, not BSD version. Possible command on Ubuntu is:

nc -kup 6666 xx.xx.xx.xx 6666

I am frustrated because this seems like it should be simple to get set up, but still not working. netcat was running BSD, but even after installing traditional and running your command, I still saw no messages coming through on the terminal, though I can still see them in wireshark. Could the router somehow be blocking the messages from reaching my server machine, or would changing the port number somehow help?

>
> I am frustrated because this seems like it should
> be simple to get set up, but still not working.
> netcat was running BSD, but even after installing
> traditional and running your command, I still saw
> no messages coming through on the terminal, though
> I can still see them in wireshark.

Is wirehark running on the Ubuntu laptop?

Can you ping the Pogo from the laptop during the time the Pogo is powering up? i.e start pinging it continuously and then power up.

> Could the
> router somehow be blocking the messages from
> reaching my server machine, or would changing the
> port number somehow help?

Can you plug in both the laptop and the Pogo to the router ports? It might be router, but if wiresharks sees the messages in the Ubuntu laptop then it is not the router.

while I am fiddling around with the OXNAS boxes, I naturally also wanted to try this. However, it looks like this is not working either for me, because I get very much the same result I get when I try to influence ethaddr during the boot process (either with uEnv.txt or through a setenv hidden in another procedure during boot). I.e., the box seems to boot (eventually the LED becomes green), but it does not obtain an IP address.

As I am essentially just using your uBoot environment as provided in the November, 22 2015 part of your uBoot thread, the relevant part of my uBoot environment looks like this:

Hello. I've just tried to do this for my Pogoplug Pro Oxnas. Now I can no longer boot. I was able to update uBoot to latest version prior to trying this out. I noticed after updating uBoot I was not able to change ethaddr. It kept saying cannot overwrite ethaddr. I thought maybe I could set the ethaddr with this Rescue system like on my other pogoplug E02. But now I can no longer boot. I may need to use a serial cable to try to set the uBoot settings. Any help is appreciated. Thanks.

I have just tried your suggestion, but it still does not boot. I cannot get the netconsole to work either now. Before it was reporting through netconsole and I was able to manipulate it. I am not sure if it is even booting and grabbing an IP address now, I cannot detect it on my openwrt router. I really hope that it is just uBoot environment settings that can be fixed with a serial cable. I will try it tomorrow after my exam and report back. I just wanted to report I had a similar experience as Chessplayer.

As a side note after searching here and on google, I saw that the oxnas can be booted using SATA harddrive https://archlinuxarm.org/forum/viewtopic.php?t=2146. This method appears old, but I want to use the same idea. If I made a new debian rootfs drive with my SATA harddrive and attach it, do you think it will work and maybe I can fix the uBoot settings that way?

Also, I noticed that when I updated the uBoot I was able to see the boot sequence with netconsole, but I was never able to ssh back into the pogoplug. I thought that it would keep the original stock POGO OS. I was expecting that to boot and allow me to ssh in. But the pogoplug would only boot with the debian rootfs USB I made. Is this normal behavior?

hachigo Wrote:
-------------------------------------------------------
> Hi bodhi.
>
> I have just tried your suggestion, but it still
> does not boot. I cannot get the netconsole to work
> either now. Before it was reporting through
> netconsole and I was able to manipulate it. I am
> not sure if it is even booting and grabbing an IP
> address now, I cannot detect it on my openwrt
> router. I really hope that it is just uBoot
> environment settings that can be fixed with a
> serial cable. I will try it tomorrow after my exam
> and report back. I just wanted to report I had a
> similar experience as Chessplayer.
>
> As a side note after searching here and on google,
> I saw that the oxnas can be booted using SATA
> harddrive

Yes, if you can get the direct SATA boot method going then that's one way of doing it. Note that it must be prepared a special way. But serial console is still the best approach.

> Also, I noticed that when I updated the uBoot I
> was able to see the boot sequence with netconsole,
> but I was never able to ssh back into the
> pogoplug. I thought that it would keep the
> original stock POGO OS. I was expecting that to
> boot and allow me to ssh in. But the pogoplug
> would only boot with the debian rootfs USB I made.
> Is this normal behavior?
>

It is normal. Any new u-boot will not boot Pogo OS without setting up extra envs (the original Pogo OS is still in NAND).

I was successfully able to boot with sata drive, but it had a deprecated version of arch linux and I was not able to install u-boot-tools package or mtd-utils. I was hoping that those tools would have been on there already. Before I give up and hook up a serial cable (I'm trying to avoid this because I don't have a JST header or soldering iron right now), is there anyway I can boot debian from sata drive? I've tried the combining the sata boot tutorial for arch linux here https://archlinuxarm.org/forum/viewtopic.php?t=2146 but instead of extracting arch linux oxnas package to rootfs I tried to extract Debian packages you posted here http://forum.doozan.com/read.php?2,16044 but it did not boot.

I'm not sure what I am doing wrong or if I am missing something. Arch boots fine but still unable to boot Debian from sata. It would be nice to boot from sata as I noticed the speed is faster with sata than USB.

So you are not booting SATA at all! you are booting the new u-boot from NAND. And it successfully "failed" and booted back to stock.

At this point, you can prepare a USB or a HDD rootfs without any special stuff. And boot into that disk.

Please interrupt serial console and get the listing of envs:

printenv

Booting the 3.17 Debian rootfs with the new u-boot is easy, no adjustment needed (if you've flashed the default envs). Booting Arch will need adjustment to u-boot envs. So let me know which rootfs you want to use. And that will determine whether you need to change u-boot envs.

Please, enter the code that you see below in the input field.
This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right.
If you enter the wrong code, a new image is created and you get
another chance to enter it right.