Welcome! Log In Create A New Profile

Advanced

Trying to recover Pogoplug E02 from serial

Posted by alexio 
Trying to recover Pogoplug E02 from serial
September 21, 2020 08:41PM
Hello all, I am hoping someone can help me . About a year ago I tried to flash the Popgoplug E02 to run Linux. i was able to SSH in via the backdoor method and thought things were going well. Unfortunately when i rebooted the pogoplug it was a fast blinking orange light and was not showing up under the router and I was unable to ssh back into it any more. So i figured i messed up the flashing and tossed it in the closet. Recently I figured id give it another go, so i ordered a usb to serial cable and hooked it up. after a day or so i was finally able to get serial access, and it appears that i am running all or some of a newer boot loader than the original. so Im wondering if I flashed all or some of a newer version ? I have spent the last few days on this forum and other web sites looking but a lot of the info seems like its from 2012/2013 and a lot of the links and downloads that people have posted that seem like they could help are no longer existing. I am ideally trying to run Linux preferably a Dabian type version but id settle for arch or centos . or maybe it would be easier to try to reset to the original firmware so i could ssh back into it and try again that way. This is what prints when i type in version

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28

I will try to attach the out put of the printenv command and the help command as well. I don't have any USB that goes with it although im fairly certain i did at the time when i tried to flash it. Thank you for your help.
Attachments:
open | download - printenv.txt (3.9 KB)
open | download - help.txt (3.5 KB)
Re: Trying to recover Pogoplug E02 from serial
September 21, 2020 11:35PM
alexio,

Your installed u-boot is OK. But your envs are not. They were populated with the envs that go with this u-boot version. But also has some bad modification that caused the booting to fail.

So now to boot into Debian. Create a new rootfs on USB thumb drive using Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

https://forum.doozan.com/read.php?2,12096

Scroll down to section:

Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

You can use another Linux box to create this rootfs.

After that, plug the USB rootfs to the Pogo E02. Start serial console on another Linux box, and power up the Pogo E02. Interrupt serial console and:

setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

and then print out the envs listing ,and boot

printenv
boot

See if it will boot into Debian.

And post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 22, 2020 08:04PM
okay i believe i did everything correctly, this was my log and the printenv

PogoE02> bootd
running scan_disk ...
Scan device usb
device usb 0:1
** No partition table - usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** No partition table - usb 0 **
loading uInitrd ...
** No partition table - usb 0 **
loading DTB /boot/dts/kirkwood-dockstar.dtb ...
** No partition table - usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

and this is the print env

PogoE02> printenv
arcNumber=2097
autoload=no
boot_nand=usbboot
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
device_type=mmc
devices=usb ide mmc
disk_number=3
disks=0 1 2 3
dnsip=192.168.1.1
dtb_file=/boot/dts/kirkwood-dockstar.dtb
ethact=egiga0
ethaddr=00:25:31:04:4A:85
gatewayip=192.168.1.1
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.1.32
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
nc_ready=0
netmask=255.255.255.0
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.0.15
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_loaded=0
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_ready_retry=15

Environment size: 3459/131068 bytes



Thank you for your help, I really appreciate it.

=====
moderator edit: please use code tags (formatted code button) to post log.



Edited 1 time(s). Last edit at 09/22/2020 11:28PM by bodhi.
Re: Trying to recover Pogoplug E02 from serial
September 22, 2020 11:31PM
alexio,

The USB rootfs was not prepared properly:

> running scan_disk ...
> Scan device usb
> device usb 0:1
> ** No partition table - usb 0 **

Make sure you follow the instruction very closely. If you'd like, post the log of the session when you created the USB rootfs here, I'll double check it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 23, 2020 12:39AM
okay i tired again and i got a different output this time.
its possible i could be doing something wrong

PogoE02> boot
running scan_disk ...
Scan device usb
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
CACHE: Misaligned operation at range [0ffba1a8, 0ffba9c0]
CACHE: Misaligned operation at range [0ffba1a8, 0ffba9c0]
** First descriptor is NOT a primary desc on 0:1 **
1 Storage Device(s) found
device usb 0:1
** No partition table - usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** No partition table - usb 0 **
loading uInitrd ...
** No partition table - usb 0 **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** No partition table - usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Re: Trying to recover Pogoplug E02 from serial
September 23, 2020 02:04AM
alexio,

> its possible i could be doing something wrong

Yes.

Or the USB thumb drive is not good for booting. What brand, model, and capacity is that?

> ** First descriptor is NOT a primary desc on 0:1
> **
> 1 Storage Device(s) found
> device usb 0:1
> ** No partition table - usb 0 **

Like I said, it could be the format of the USB drive.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 23, 2020 09:53PM
bodhi, you were totally right. i was messing up the partitions on the USB. i finally got the usb to load correctly and this was the outcome. it seems to not get all the way, but take me into a new initramfs environment.
I will attach the file with the print out because it is several pages long .
this is what happens when i type 'help' and what happens when i type 'exit'


help

(initramfs) help
Built-in commands:
------------------
        . : [ [[ alias bg break cd chdir command continue echo eval exec
        exit export false fg getopts hash help history jobs kill let
        local printf pwd read readonly return set shift source test times
        trap true type ulimit umask unalias unset wait
(initramfs)

exit

(initramfs) exit
[  683.808373][  T255] __nand_correct_data: uncorrectable ECC error
[  683.814561][  T255] print_req_error: I/O error, dev mtdblock0, sector 2040 flags 80700
[  683.822725][  T255] __nand_correct_data: uncorrectable ECC error
[  683.828826][  T255] print_req_error: I/O error, dev mtdblock0, sector 2040 flags 0
[  683.836464][  T255] Buffer I/O error on dev mtdblock0, logical block 255, async page read
[  684.153259][  T255] __nand_correct_data: uncorrectable ECC error
[  684.159384][  T255] print_req_error: I/O error, dev mtdblock0, sector 2040 flags 80700
[  684.167583][  T255] __nand_correct_data: uncorrectable ECC error
[  684.173650][  T255] print_req_error: I/O error, dev mtdblock0, sector 2040 flags 0
[  684.181264][  T255] Buffer I/O error on dev mtdblock0, logical block 255, async page read
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  LABEL=rootfs does not exist.  Dropping to a shell!


BusyBox v1.30.1 (Debian 1:1.30.1-4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)



thank you for being patient with me,

alexio
Attachments:
open | download - first attempt.txt (32.9 KB)
Re: Trying to recover Pogoplug E02 from serial
September 23, 2020 11:45PM
alexio,

The rootfs still not good. It was OK to boot the kernel. But when the kernel tried to mount the rootfs it could not find it.

Mount it on the Linux box that you used to create this USB rootfs. Assuming it is mounted at /media/sdb1

e2label /dev/sdb1
cat /media/sdb1/etc/fstab
ls -lart /media/sdb1/boot


And post the output here.

And by the way, it is OK to post the bootlog here. In fact, I'd prefer that because it is easier to trouble shoot if the entire log is displayed on the browser.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 24, 2020 12:06AM
this is the out put from cat /etc/fstab

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/mint--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=814f0b80-2607-4c6c-a85c-7ec12b3c3c00 /boot           ext4    defaults        0       2
/dev/mapper/mint--vg-swap_1 none            swap    sw              0       0

and this is ls -lart /boot

ls -lart /boot
total 243900
-rw-r--r--  1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-r--r--  1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r--  1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-------  1 root root  4295198 Oct 10  2019 System.map-5.0.0-32-generic
-rw-r--r--  1 root root   224447 Oct 10  2019 config-5.0.0-32-generic
-rw-r--r--  1 root root  8769272 Dec 13  2019 vmlinuz-5.0.0-32-generic
-rw-------  1 root root  4573787 Jul 10 02:54 System.map-5.4.0-42-generic
-rw-r--r--  1 root root   237786 Jul 10 02:54 config-5.4.0-42-generic
-rw-------  1 root root  9371904 Jul 10 02:56 vmlinuz-5.4.0-42-generic
drwx------  2 root root    16384 Aug 13 22:22 lost+found
-rw-r--r--  1 root root 67959582 Aug 13 22:42 initrd.img-5.0.0-32-generic
-rw-r--r--  1 root root 69744871 Aug 13 22:44 initrd.img-5.4.0-42-generic
-rw-------  1 root root  4575643 Sep  5 00:15 System.map-5.4.0-47-generic
-rw-r--r--  1 root root   237782 Sep  5 00:15 config-5.4.0-47-generic
-rw-------  1 root root  9380096 Sep  5 00:20 vmlinuz-5.4.0-47-generic
drwxr-xr-x 24 root root     4096 Sep 10 19:08 ..
-rw-r--r--  1 root root 69765963 Sep 10 19:09 initrd.img-5.4.0-47-generic
drwxr-xr-x  4 root root     4096 Sep 10 19:09 .
drwxr-xr-x  6 root root     4096 Sep 10 19:09 grub

Re: Trying to recover Pogoplug E02 from serial
September 24, 2020 12:14AM
alexio,

That's the output for the system you are using to create the rootfs. Not what's on the USB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 24, 2020 12:31AM
oops, my mistake ill try again

 cat /media/mint/e8546326-44b5-475c-90bd-ad0957e9aa48/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0

 ls -lart /media/mint/e8546326-44b5-475c-90bd-ad0957e9aa48/boot
total 46244
drwxr-xr-x 21 root root    4096 Feb 16  2015 ..
drwxr-xr-x  2 root root    4096 Aug 16  2019 dts
-rwxr-xr-x  1 root root 4963616 Aug 17  2019 zImage-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root  165790 Aug 17  2019 config-5.2.9-kirkwood-tld-1
-rw-------  1 root root 4963616 Aug 17  2019 vmlinuz-5.2.9-kirkwood-tld-1
-rw-------  1 root root 3101889 Aug 17  2019 System.map-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root 9649570 Aug 17  2019 linux-headers-5.2.9-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root 9713872 Aug 24  2019 initrd.img-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root 4963680 Aug 24  2019 uImage
-rw-r--r--  1 root root 9713936 Aug 24  2019 uInitrd
drwxr-xr-x  3 root root    4096 Aug 24  2019 .

Re: Trying to recover Pogoplug E02 from serial
September 24, 2020 02:10AM
alexio,

> cat
> /media/mint/e8546326-44b5-475c-90bd-ad0957e9aa48/etc/fstab

You've missed labeling the partition as rootfs.

In Mint, you can change the label of this USB partition using GUI.

And you can also do it in command line. Use the mount command to see the drive letter for the USB drive (currently it is mounted as /media/mint/e8546326-44b5-475c-90bd-ad0957e9aa48)

mount

And if it is indeed /dev/sdb1, then
e2label /dev/sdb1 rootfs
sync
And eject the USB drive.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Trying to recover Pogoplug E02 from serial
September 24, 2020 08:45PM
bodhi,
It worked! You were correct again. Although I labelled the disk 'rootfs' in the GUI section it seems i had to use the commands you provided to make it see the title properly. Thank you for all your help i really appreciate it.

alexio
Author:

Your Email:


Subject:


Spam prevention:
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.
Message: