Welcome! Log In Create A New Profile

Advanced

Pogoplug pro mtd2 original rootfs nanddump wanted

Posted by jan1973 
Pogoplug pro mtd2 original rootfs nanddump wanted
October 24, 2014 08:20AM
Hi,

I have a bricked pogoplug pro. As far as I can tell only the mtd2 rootfs has been corrupted, so I'm looking for a nanddump with the orignal pogoplug software on it.

Thanks for your help!

Jan



Edited 2 time(s). Last edit at 10/24/2014 02:45PM by jan1973.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 24, 2014 03:44PM
jan1973 Wrote:
-------------------------------------------------------
> Hi,
>
> I have a bricked pogoplug pro. As far as I can
> tell only the mtd2 rootfs has been corrupted, so
> I'm looking for a nanddump with the orignal
> pogoplug software on it.
>
> Thanks for your help!
>
> Jan

It's been so long ago, I'm not sure I can find my mtds backup. However, do you have a log of what the original mtds look like? dmesg or cat /proc/mtd.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 25, 2014 04:39AM
~ # cat /proc/mtd
dev: size erasesize name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

from dmesg:

NAND: Page read time 40ms
<6>[ 5.240000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND
128MiB 3,3V 8-bit)
<6>[ 5.250000] Scanning device for bad blocks
<5>[ 5.320000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
<5>[ 5.330000] 0x000000000000-0x000000e00000 : "boot"
<5>[ 5.330000] 0x000000e00000-0x000008000000 : "rootfs"
<5>[ 5.340000] UBI: attaching mtd2 to ubi0
<5>[ 5.340000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
<5>[ 5.350000] UBI: logical eraseblock size: 129024 bytes
<5>[ 5.350000] UBI: smallest flash I/O unit: 2048
<5>[ 5.360000] UBI: sub-page size: 512
<5>[ 5.360000] UBI: VID header offset: 512 (aligned 512)
<5>[ 5.370000] UBI: data offset: 2048
<5>[ 5.780000] UBI: attached mtd2 to ubi0
<5>[ 5.780000] UBI: MTD device name: "rootfs"
<5>[ 5.790000] UBI: MTD device size: 114 MiB
<5>[ 5.790000] UBI: number of good PEBs: 912
<5>[ 5.800000] UBI: number of bad PEBs: 0
<5>[ 5.800000] UBI: max. allowed volumes: 128
<5>[ 5.810000] UBI: wear-leveling threshold: 4096
<5>[ 5.810000] UBI: number of internal volumes: 1
<5>[ 5.820000] UBI: number of user volumes: 1
<5>[ 5.820000] UBI: available PEBs: 0
<5>[ 5.820000] UBI: total number of reserved PEBs: 912
<5>[ 5.830000] UBI: number of PEBs reserved for bad PEB handling: 9
<5>[ 5.840000] UBI: max/mean erase counter: 2/1
<5>[ 5.840000] UBI: image sequence number: 0
<5>[ 5.840000] UBI: background thread "ubi_bgt0d" started, PID 278



Edited 1 time(s). Last edit at 10/25/2014 04:42AM by jan1973.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 25, 2014 02:48PM
Jan1973,

I remember now. Your MTD layout is orginal or Arch (WarheadsSE version).

We have new u-boot and kernel, which are most users in this forum use to install on Pogo V3 Pro/Classic:
http://forum.doozan.com/read.php?2,16044
http://forum.doozan.com/read.php?3,16017,page=1

The MTD content is still basically the same, except that we've redefined it:
from
dev: size erasesize name 
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" 
mtd1: 00e00000 00020000 "boot" 
mtd2: 07200000 00020000 "rootfs"
to
dev:    size   erasesize  name
mtd0: 00e00000 00020000 "boot"
mtd1: 07200000 00020000 "data"

So, either mtd2 in orginal installation, or mtd1 in newer installation. Anybody can help you by dumping that (114 MB) and upload it:

with original layout:
nanddump -nf pogov3.rootfs.mtd2 /dev/mtd2

with new layout:
nanddump -nf pogov3.rootfs.mtd1 /dev/mtd1

Any volunteer to help Jan?

BTW, this should be posted in U-Boot section to have more visibility.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/25/2014 02:57PM by bodhi.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 25, 2014 04:26PM
Bodhi, thanks for your answer. Does the stock pogoplug software work with the newer kernel?

I don't understand how and where nand partitions are defined. Is this done like a harddrive with a mbr that defines the partitions or is it defined in the /proc filesystem? How is the change from three partitions to two partitions accomplished?

My bricked pogoplug pro has no bad blocks in nand, what happens if the person who does the nanddump has bad blocks in mtd2? Should anything special be done then?

Just some more background information: I bought 10 pogoplug pros through an ebay-like site, of which I have 5 left. They're second-hand. Someone has tinkered with them and not in a good way. The result is that although the pogoplug software works, it doesn't update to a recent version. It's stuck at 2.x.x. Furthermore, the wireless adapter doesn't work. I tried to look into it and found that in rcS there's an insmod to load the wireless kernelmodule /lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/wireless/rt3390sta.ko. However, there's no kernel module to be found there. I copied a module I found online to that place. The result is a kernelpanic at the time of the insmod I think, so I can't ssh into the pogoplug anymore. What I'm stuck with now is device with an original bootloader & kernel and a rootfs with a kernelmodule on it that results in a kernel panic. I can talk to the bootloader with my rs232 ttl cable though.

My wish is to restore all of my pogoplug pros (including the bricked one) to their original state. (All the pogoplugs have the same problems.) The big challenge is the bricked one o fcourse. After doing some research I've come to the following conclusion: the easiest way to do debrick my plug is to boot it from sata and then do a flash_erase and a nandwrite of mtd2 to restore the original pogoplug software. Is this correct?

For this I need a nanddump of mtd2 (original layout) or mtd1 (new layout). Someone with a pogoplug pro help me please?? I can make a dumpfile of one of my other pogoplugs pro of course, but then I would still have pogoplug pro with the before-mentioned problems, so I'm looking for the original mtd2.


Thanks everyone,
Jan



Edited 3 time(s). Last edit at 10/25/2014 04:36PM by jan1973.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 25, 2014 05:05PM
Hi Jan,

Those pogoplugs were installed with Arch Linux ARM:
/lib/modules/2.6.31.6_SMP_820

- MTD definition is done with u-boot envs. You can define them anyway you want and the kernel will pick it up as specified. The boot mtd is what need to be correctly specified, since that's where u-boot resides. The rest is up to us. Stock mtd2 contains rootfs because that's where the manufacterer stored their SW in NAND.

- Since you have serial console, and the orginal boot loader intact, you could restore mtd2 to the original state. But it does not seem that's what you want. Since the Arch installation only update the /boot mtd (chainloading), you mtd2 is still original. I don't think it was modified in anyway with Arch installation. In fact, you are running stock u-boot and chainloading it to Arch u-boot which boots the USB/SATA rootfs.

- What you need is to change u-boot envs to ignore what Arch install did, just use the original u-boot envs to boot stock u-boot and kernel.

In summary, you probably don't need to restore anything. Just set the envs to the original state (find that from someone who still has the orginal). And then connect serial console to set them, and boot.


Further thought:

Arch install has a oxnas-reverse script provided by WarheadsSE. That script probably has what you need to find in there as how to reset the envs back to boot original SW.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/25/2014 05:14PM by bodhi.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 26, 2014 09:00AM
Let's start with the good news. I had a brainwave: since the kernelpanic was caused by me putting the wrong loadable wifi module on the filesystem, I removed the wifi card from the pci slot. Et voila: no more kernel panic. So I was able to get a shell again and I removed the faulty loadable module. There's one bit of strange behaviour still left though: the rootfs is mounted rw instead of ro and this persists after reboots:
/ # mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,relatime)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
none on /tmp type tmpfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)

How do I get it back to being mounted ro? It's really strange, the other pogoplug which I compared it to has its rootfs mounted rw too, when before it wasn't.. really strange

So right now I"m trying to determine which parts of the pogoplug are still original and which parts aren't.This is what I get from the serial console:
Stage-1 Bootloader XCE_STAGE1: 1.1: Tue Feb  8 01:40:26 PST 2011
Attempting to set PLLA to 700MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000E0000
  plla_ctrl2 : 0x001C01A0
  plla_ctrl3 : 0x00000016
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001C030
  Hdr CRC: 0x39F6D832
 OK


U-Boot 1.1.2 (Jul 29 2010 - 19:36:07)

U-Boot code: 60D00000 -> 60D1C030  BSS: -> 60D21800
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0
CE>> printenv
bootcmd=run boot_nand
bootdelay=2
baudrate=115200
autoload=n
netmask=255.255.0.0
bootfile="uImage"
kernflmode=s
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
boot=bootm 60500000
boot_nand=run load_nand boot || run load_nand2 boot
ethaddr=00:25:31:01:EE:28
cesvcid=xxxx
ceboardver=PPRO1
serverip=192.168.33.2
ipaddr=192.168.33.195
stdin=serial
stdout=serial
stderr=serial
bootargs=root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes

CE>> run boot_nand

Loading from device 0: 128MiB 3,3V 8-bit (offset 0x200000)
   -- Using 1bit ECC style encoding
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2259820 Bytes =  2.2 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 60500000 ...
   Image Name:   Linux-2.6.31.6_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2259820 Bytes =  2.2 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.31.6_SMP_820 (bdietrich@bd.pogoplug.com) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #100 SMP Fri May 6 20:38:58 PDT 2011
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
I've just taken out the pogoplug id from the environment variables, the rest it just as printenv showed them. From the e-mail address mentioned in the kernel messages I thought this was a stock kernel? On the filesystem I've found optware in the form of sonos and samba, this made me think it was a stock pogoplug with optware gone bad. Can you tell based on this information if the bootloader and kernel are still original? I'm sort of lost.

Thanks,

Jan
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 26, 2014 03:44PM
Jan,

This is stock kernel. But the envs look like have been changed (I could be wrong). It's best that you find the original envs or ALARM envs and see if you need restore them. If what you want is to run stock as original.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 27, 2014 08:20AM
@jan1973

i have a couple of pro's coming next month from the good old usa. if you can wait till then i will dump the nand (assuming they are standard nands and upload them to a dropbox public share.

stick a note in your calendar and pm me in a month if no one else comes forward with the required files
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
October 27, 2014 11:52AM
jan,

I found my old backup mtds (from a couple years ago!). If you think your stock mtd2 is indeed messed up (after restoring the envs like I mentioned), and still need it then I will upload.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Stephan
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 08, 2014 02:55PM
Hello,

Ive the same problem with my pogoplug pro. I ve tested a lot and now the device isnt booting anymore except from the modified sata hdd. there is an arch linux installed and from that i want to restore the nand. is it possible without a serial connection?

@bodhi
would you please be so kind and upload the original nand file plus a small instruction to flash this file without a serial (when its possible).?
many thanks in advance,

Stephan
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 08, 2014 11:11PM
@Stephan,

Sure I will shortly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 09, 2014 12:14AM
@Stephan,

Sorry I could not find it! :) I should have saved them somewhere when I found them. I was so sure I remember where they are ... in my 12 plugs!!!

However, if you are running Arch install from way back, then everything is still in NAND (stock u-boot and kernel). All you need to do is to run the oxnas-revese script to set the envs back to boot stock. And you can do this in Arch. Is that what you need?

UPDATE:

Oh, I've found the NAND back up with Arch kernel installed on it (meaning you can reverse to stock from there). Let me know if you want to use them.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 12/09/2014 12:17AM by bodhi.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 31, 2014 09:52PM
Bodhi

Do you mind post the NAND backup and instruction to restore the factory firmware? I am looking forward to it.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
January 01, 2015 03:14AM
@lijianch,

I'm away from home so don't have access to the backups. Please remind me in another 3-4 weeks.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi,
Did you ever uploaded the nand dump? My Pogoplug pro is bricked. I am booting with SATA but fw_setenv command is not working since it is being booted of the harddrive instead of the nand. I am avoiding serial atm since I cannot find any thread on serial. I think restore by nand dump is the last resort beside serial approach.
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 14, 2015 07:43PM
Thang Wrote:
-------------------------------------------------------
> Bodhi,
> Did you ever uploaded the nand dump? My Pogoplug
> pro is bricked. I am booting with SATA but
> fw_setenv command is not working since it is being
> booted of the harddrive instead of the nand. I am
> avoiding serial atm since I cannot find any thread
> on serial. I think restore by nand dump is the
> last resort beside serial approach.

Hi Thang,

No, because I could not find my stock Pogo V3 mtds backup. I only have backup of my curren mtds.

However, if you can boot with SATA, then you can unbrick it by flashing new u-boot, along with new u-boot default envs image. No need to worry about current envs. The default envs will work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi,
Do you have a guide to get do recovery from SATA? I flashed the new 2015 bodhi's uboot and using the default env with your guide. I also erased everything in mtd2 (rootfs) because it was openwert. When I unplug my the sata (with and without usb), I cannot connect to ssh. I tried to use a working the Rootfs Debian usb and it is not working either. Any hint would be grateful.

In addition, it seems pogoplug.com has release their source files for these Pogo series. Is there also a guide to reload these files from pogoplug.com?
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 15, 2015 03:02AM
Thang Wrote:
-------------------------------------------------------
> Bodhi,
> Do you have a guide to get do recovery from SATA?
> I flashed the new 2015 bodhi's uboot and using
> the default env with your guide. I also erased
> everything in mtd2 (rootfs) because it was
> openwert. When I unplug my the sata (with and
> without usb), I cannot connect to ssh. I tried to
> use a working the Rootfs Debian usb and it is not
> working either. Any hint would be grateful.
>

You did not need to erase mtd2. The new u-boot won't try to access it.

Pls post the log of what you did, perhaps I can tell a mis-step somewhere. If you have flashed new 2015 u-boot image, 2013 SPL image, and the default envs image (as instructed in the u-boot thread), then the remaining possible problem is the rootfs on USB.

Since you don't have serial console, the only way for me to help trouble shooting is to see the entire log (eveything, u-boot installation and rootfs creation).

> In addition, it seems pogoplug.com has release
> their source files for these Pogo series. Is
> there also a guide to reload these files from
> pogoplug.com?

No idea about stock FW restoration!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bohdi,
I got it the NAND to boot again. At the same time my SATA died, lol. I found out I had made two mistakes. SATA Archlinux boot detect NAND as mtd0, boot as mtd1, data/rootfs as mtd2. I follow through your guide again with replacing out mtd0 for mtd 1. The other thing I think you should make it clear is the new uboot is case sensitive (since old 2013 version does not look at the label). My usb was labeled at 'ROOTFS' . I have to change it to lower case 'rootfs' in order for it to boot off usb. I was following qnology guide for Openwrt prior to recovery effort. Thank you again for your help!
Re: Pogoplug pro mtd2 original rootfs nanddump wanted
December 17, 2015 08:22PM
Thang Wrote:
-------------------------------------------------------
> Bohdi,
> I got it the NAND to boot again. At the same time
> my SATA died, lol. I found out I had made two
> mistakes. SATA Archlinux boot detect NAND as
> mtd0, boot as mtd1, data/rootfs as mtd2. I follow
> through your guide again with replacing out mtd0
> for mtd 1.

Cool!

> The other thing I think you should
> make it clear is the new uboot is case sensitive
> (since old 2013 version does not look at the
> label). My usb was labeled at 'ROOTFS' . I have
> to change it to lower case 'rootfs' in order for
> it to boot off usb. I was following qnology guide
> for Openwrt prior to recovery effort. Thank you
> again for your help!

Everything is case sensitive in Linux :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: