Welcome! Log In Create A New Profile

Advanced

Pogoplug E02 Bad Block

Posted by musselmanb 
Pogoplug E02 Bad Block
December 02, 2013 05:18PM
My Pogoplug E02 have Bad Block. I followed instrution from this post http://forum.doozan.com/read.php?3,5728,5748#msg-5748 and got it to work/boot off a USB drive. However, I cannot get back into the stock OS. I can ping the ip but cannot ssh in. Also the mac address show on the router is incorrect. I did set the mac address in the environment. The mac address is correct when booted into ALARM. I mounted mtd2 and verified rcS "/etc/init.d/hbmgr.sh start" is not commented out. I would like to able to boot into orignal pogoplug if possible.

Appreciate any guidance :-)


Here is what i did

## Unknown uBoot detected on mtd0: 150f323cc589d1535d6e06c2038d0aa7
##
## The installer could not detect the version of your current uBoot
## This may happen if you have installed a different uBoot on
## /dev/mtd0 or if you have bad blocks on /dev/mtd0
##
## If you have bad blocks on mtd0, you should not try to install uBoot.
##
## If you have installed a diffirent uBoot on mtd0, and understand the
## risks, you can re-run the installer with the --no-uboot-check parameter
##
## Installation cancelled.

Pogoplug:/tmp$ /usr/sbin/flash_erase /dev/mtd0 0 5
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x40000
MTD Erase failure: Input/output error

Pogoplug:/tmp$ /usr/sbin/nandwrite /dev/mtd0 uboot.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000

Pogoplug:/tmp$ /usr/sbin/nanddump -nof /tmp/uBoot1.dump -l 0x40000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00040000...

Pogoplug:/tmp$ /usr/sbin/nanddump -nof /tmp/uBoot2.dump -l 0x40000 -s 0x60000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00060000 and ending at 0x000a0000...

Pogoplug:/tmp$ cat uBoot1.dump uBoot2.dump > uBoot.dump

Pogoplug:/tmp$ diff -s uboot.mtd0.kwb uBoot.dump
Files uboot.mtd0.kwb and uBoot.dump are identical



# flash the uboot environment

wget -O /tmp/uboot.environment http://jeff.doozan.com/debian/uboot/files/environment/uboot.environment

Pogoplug:/tmp$ /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done
Pogoplug:/tmp$ /usr/sbin/nandwrite  -s 786432 /dev/mtd0 /tmp/uboot.environment
Writing data to block 6 at offset 0xc0000

Pogoplug:/tmp$ /usr/sbin/fw_printenv
/usr/sbin/fw_setenv ethaddr 00:25:31:xx:xx:xx




-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:     0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000008000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            91 MiB
UBI: number of good PEBs:        728
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: ........ done.
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...



Edited 1 time(s). Last edit at 12/02/2013 06:14PM by musselmanb.
Re: Pogoplug E02 Bad Block
December 03, 2013 12:42AM
musselmanb,

Yours is no longer a bad block problem. This ubi error is typical, i.e. after the Pogo E02 installation we all have this error. Booting with USB is never a problem, but to try booting back to stock Pogo OS is problematic because of this (there had been frequent postings about this issue).

1. Please stop your netconsole and print out your envs. And I'll take a look.
> printenv

2. Boot with USB and mount the NAND rootfs partition like you did, copy any output from the command and post here.

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



Edited 1 time(s). Last edit at 12/03/2013 12:46AM by bodhi.
Re: Pogoplug E02 Bad Block
December 03, 2013 10:53AM
bodhi,

Thanks for your guide from your old post. I am able to get usb to boot. It is nice to be able to use the stock OS to troubleshoot failed to boot thumb drive

1. fw_printenv output

[root@alarm ~]# fw_printenv 
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
usb_rootfstype=ext3
arcNumber=3542
machid=dd6
ethaddr=00:25:31:24:50:33
serverip=192.168.1.100
ipaddr=192.168.1.101
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole



2. Booted from USB Stick

[root@alarm ~]# mkdir -p /tmp/pogoroot
[root@alarm ~]# mount -t jffs2 /dev/mtdblock2 /tmp/pogoroot
mount: special device /dev/mtdblock2 does not exist

[root@alarm ~]# mknod /dev/mtdblock2 b 31 2
[root@alarm ~]# mount -t jffs2 -o rw /dev/mtdblock2 /tmp/pogoroot/
[root@alarm ~]# cat /tmp/pogoroot/etc/init.d/rcS 
#! /bin/sh

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
mount -t tmpfs none /tmp
mkdir /tmp/var

echo "/tmp/core_%e_%t" > /proc/sys/kernel/core_pattern

hostname Pogoplug

ifconfig lo 127.0.0.1
ifconfig eth0 169.254.37.133
udhcpc -b `hostname`

#telnetd
/etc/init.d/db

/etc/init.d/hbmgr.sh start

#/bin/mount -a
[root@alarm ~]# 

Re: Pogoplug E02 Bad Block
December 03, 2013 01:20PM
Hi musselmanb,

I was hoping to see some error when you mount it, but it looks like your mtd2 is good! how about get back to netconsole and try both:

> ubi part rootfs
> ubifsmount ubi0:rootfs

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 03, 2013 04:01PM
Here you go

U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 10 
 0 

u-boot>> ubi part rootfs 
ubi part rootfs 
Creating 1 MTD partitions on "nand0":
0x000000500000-0x000002500000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22

u-boot>> ubifsmount ubi0:rootfs
ubifsmount ubi0:rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:ubi0:rootfs", error -19
Error reading superblock on volume 'ubi:ubi0:rootfs'!
u-boot>> 
Re: Pogoplug E02 Bad Block
December 03, 2013 05:42PM
musselmanb Wrote:
-------------------------------------------------------
> bodhi,
>
> Thanks for your guide from your old post. I am
> able to get usb to boot. It is nice to be able to
> use the stock OS to troubleshoot failed to boot
> thumb drive
>
> 1. fw_printenv output
>
>
> [root@alarm ~]# fw_printenv 
> ethact=egiga0
> bootdelay=3
> baudrate=115200
> mainlineLinux=yes
> console=ttyS0,115200
> led_init=green blinking
> led_exit=green off
> led_error=orange blinking
> mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)
> ,32M(rootfs),-(data)
> mtdids=nand0=orion_nand
> partition=nand0,2
> stdin=serial
> stdout=serial
> stderr=serial
> rescue_installed=0
> rescue_set_bootargs=setenv bootargs
> console=$console ubi.mtd=2 root=ubi0:rootfs ro
> rootfstype=ubifs $mtdparts $rescue_custom_params
> rescue_bootcmd=if test $rescue_installed -eq 1;
> then run rescue_set_bootargs; nand read.e 0x800000
> 0x100000 0x400000; bootm 0x800000; else run
> pogo_bootcmd; fi
> pogo_bootcmd=if fsload uboot-original-mtd0.kwb;
> then go 0x800200; fi
> force_rescue=0
> force_rescue_bootcmd=if test $force_rescue -eq 1
> || ext2load usb 0:1 0x1700000 /rescueme 1 ||
> fatload usb 0:1 0x1700000 /rescueme.txt 1; then
> run rescue_bootcmd; fi
> ubifs_mtd=3
> ubifs_set_bootargs=setenv bootargs
> console=$console ubi.mtd=$ubifs_mtd
> root=ubi0:rootfs rootfstype=ubifs $mtdparts
> $ubifs_custom_params
> ubifs_bootcmd=run ubifs_set_bootargs; if ubi part
> data && ubifsmount rootfs && ubifsload 0x800000
> /boot/uImage && ubifsload 0x1100000 /boot/uInitrd;
> then bootm 0x800000 0x1100000; fi
> usb_scan=usb_scan_done=0;for scan in
> $usb_scan_list; do run usb_scan_$scan; if test
> $usb_scan_done -eq 0 && ext2load usb $usb 0x800000
> /boot/uImage 1; then usb_scan_done=1; echo "Found
> bootable drive on usb $usb"; setenv usb_device
> $usb; setenv usb_root /dev/$dev; fi; done
> usb_scan_list=1 2 3 4
> usb_scan_1=usb=0:1 dev=sda1
> usb_scan_2=usb=1:1 dev=sdb1
> usb_scan_3=usb=2:1 dev=sdc1
> usb_scan_4=usb=3:1 dev=sdd1
> usb_init=run usb_scan
> usb_device=0:1
> usb_root=/dev/sda1
> usb_rootdelay=10
> usb_set_bootargs=setenv bootargs console=$console
> root=$usb_root rootdelay=$usb_rootdelay
> rootfstype=$usb_rootfstype $mtdparts
> $usb_custom_params
> usb_bootcmd=run usb_init; run usb_set_bootargs;
> run usb_boot
> usb_boot=mw 0x800000 0 1; ext2load usb $usb_device
> 0x800000 /boot/uImage; if ext2load usb $usb_device
> 0x1100000 /boot/uInitrd; then bootm 0x800000
> 0x1100000; else bootm 0x800000; fi
> bootcmd=usb start; run force_rescue_bootcmd; run
> ubifs_bootcmd; run usb_bootcmd; usb stop; run
> rescue_bootcmd; run pogo_bootcmd; reset
> usb_rootfstype=ext3
> arcNumber=3542
> machid=dd6
> ethaddr=00:25:31:24:50:33
> serverip=192.168.1.100
> ipaddr=192.168.1.101
> if_netconsole=ping $serverip
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version;
> preboot=run if_netconsole start_netconsole
> 
>
>
>
>
> 2. Booted from USB Stick
>
>
> [root@alarm ~]# mkdir -p /tmp/pogoroot
> [root@alarm ~]# mount -t jffs2 /dev/mtdblock2
> /tmp/pogoroot
> mount: special device /dev/mtdblock2 does not
> exist
> 
> [root@alarm ~]# mknod /dev/mtdblock2 b 31 2
> [root@alarm ~]# mount -t jffs2 -o rw
> /dev/mtdblock2 /tmp/pogoroot/
> [root@alarm ~]# cat /tmp/pogoroot/etc/init.d/rcS 
> #! /bin/sh
> 
> mount -t proc none /proc
> mount -t sysfs none /sys
> mount -t devpts none /dev/pts
> mount -t tmpfs none /tmp
> mkdir /tmp/var
> 
> echo "/tmp/core_%e_%t" >
> /proc/sys/kernel/core_pattern
> 
> hostname Pogoplug
> 
> ifconfig lo 127.0.0.1
> ifconfig eth0 169.254.37.133
> udhcpc -b `hostname`
> 
> #telnetd
> /etc/init.d/db
> 
> /etc/init.d/hbmgr.sh start
> 
> #/bin/mount -a
> [root@alarm ~]# 
> 
>

I've overlooked :) try mounting jffs in netconsole, not ubifs!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 03, 2013 10:15PM
don't know if I did it right. Mount command not found. However, from the ls command I see an extra uboot-original-mtd0.kwb file with zero byte.

U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 10

u-boot>> ls
ls
Scanning JFFS2 FS: ........ done.
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 bin
 drwxr-xr-x        0 Thu Jan 15 19:07:02 2009 dev
 drwxr-xr-x        0 Tue Nov 03 13:38:59 2009 etc
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 lib
 lrwxrwxrwx       11 Wed Nov 04 05:24:31 2009 linuxrc -> bin/busybox
 drwxr-xr-x        0 Thu Dec 18 21:45:09 2008 mnt
 drwxr-xr-x        0 Tue Feb 26 17:26:05 2008 proc
 drwxr-xr-x        0 Tue Mar 10 23:53:33 2009 root
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 sbin
ls drwxr-xr-x        0 Sat Jan 01 00:13:40 2000 tmp
 drwxr-xr-x        0 Thu Jan 15 18:31:53 2009 usr
 lrwxrwxrwx        8 Wed Nov 04 05:24:32 2009 var -> /tmp/var
 -rw-r--r--        0 Sat Jan 01 00:24:15 2000 uboot-original-mtd0.kwb
 -rw-r--r--       32 Sat Jan 01 00:25:53 2000 uboot-original-mtd0.kwb.md5
 -rw-r--r--   524288 Sat Jan 01 00:25:55 2000 uboot-original-mtd0.kwb
u-boot>> ls /tmp
ls /tmp
u-boot>> ls /mnt
ls /mnt
u-boot>> mkdir /tmp/pogoroot
mkdir /tmp/pogoroot
Unknown command 'mkdir' - try 'help'
u-boot>> mount -t jffs2 /dev/mtdblock2 /mnt
mount -t jffs2 /dev/mtdblock2 /mnt
Unknown command 'mount' - try 'help'
u-boot>> 

Re: Pogoplug E02 Bad Block
December 04, 2013 12:46AM
musselmanb,

Sorry, I was posting from my phone and text got cut off! There is no real mount command for jffs2. I meant it seems the original kernel uImage and rootfs were written to NAND in jffs2. That's why you have successfully mounted the rootfs in Linux with mount -t jffs2 /dev/mtdblock2 command.

This command was the correct one to run to boot back to stock.
pogo_bootcmd=if fsload uboot-original-mtd0.kwb;then go 0x800200; fi

But as you've found, there was a problem with that original uboot kwb. Try mounting rootfs in Linux again, delete the 0 length file. And reboot. Stop netconsole and then

>run pogo_bootcmd

See what'll happen.

Other thought: if somehow you delete the wrong original uboot file, then just let me know and I'll post it here.

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



Edited 1 time(s). Last edit at 12/04/2013 12:58AM by bodhi.
Re: Pogoplug E02 Bad Block
December 04, 2013 09:43AM
I made a copy of uboot-original-mtd0.kwb from another working E02 to the root of the usb. Booted to linux and do a md5 to compare. They appear to be identical. Also ls show only 1 uboot-original-mtd0.kwb file.
[root@alarm pogoroot]# ls -l
total 513
drwxr-xr-x 2 root root      0 Nov  3  2009 bin
drwxr-xr-x 5 root root      0 Feb 26  2008 dev
drwxr-xr-x 4 root root      0 Dec 31  1999 etc
drwxr-xr-x 2 root root      0 Nov  3  2009 lib
lrwxrwxrwx 1 root root     11 Nov  3  2009 linuxrc -> bin/busybox
drwxr-xr-x 2 root root      0 Dec 18  2008 mnt
drwxr-xr-x 2 root root      0 Feb 26  2008 proc
drwxr-xr-x 2 root root      0 Dec 31  1999 root
drwxr-xr-x 2 root root      0 Nov  3  2009 sbin
drwxr-xr-x 2 root root      0 Dec 31  1999 sys
drwxr-xr-x 2 root root      0 Dec 31  1999 tmp
-rw-r--r-- 1 root root 524288 Dec 31  1999 uboot-original-mtd0.kwb
drwxr-xr-x 7 root root      0 Jan  6  2009 usr
lrwxrwxrwx 1 root root      8 Nov  3  2009 var -> /tmp/var 

[root@alarm pogoroot]# md5sum uboot-original-mtd0.kwb 
c7b77a049725096d83db958f39b2c0c3  uboot-original-mtd0.kwb
[root@alarm tmp]# md5sum /uboot-original-mtd0.kwb 
c7b77a049725096d83db958f39b2c0c3  /uboot-original-mtd0.kwb

I went ahead delete uboot-original-mtd0.kwb and copy over a new one
[root@alarm pogoroot]# ls -ah
.   bin  etc  linuxrc  proc  sbin  tmp			    usr
..  dev  lib  mnt      root  sys   uboot-original-mtd0.kwb  var
[root@alarm pogoroot]# rm uboot-original-mtd0.kwb 
[root@alarm pogoroot]# ls
bin  dev  etc  lib  linuxrc  mnt  proc	root  sbin  sys  tmp  usr  var
[root@alarm pogoroot]# cp /uboot-original-mtd0.kwb .
[root@alarm pogoroot]# ls
bin  etc  linuxrc  proc  sbin  tmp			usr
dev  lib  mnt	   root  sys   uboot-original-mtd0.kwb	var
[root@alarm pogoroot]# md5sum uboot-original-mtd0.kwb 
c7b77a049725096d83db958f39b2c0c3  uboot-original-mtd0.kwb

Back to uboot, now I have 3 uboot-original-mtd0.kwb.
u-boot>> ls
ls
Scanning JFFS2 FS: ........ done.
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 bin
 drwxr-xr-x        0 Thu Jan 15 19:07:02 2009 dev
 drwxr-xr-x        0 Tue Nov 03 13:38:59 2009 etc
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 lib
 lrwxrwxrwx       11 Wed Nov 04 05:24:31 2009 linuxrc -> bin/busybox
 drwxr-xr-x        0 Thu Dec 18 21:45:09 2008 mnt
 drwxr-xr-x        0 Tue Feb 26 17:26:05 2008 proc
 drwxr-xr-x        0 Tue Mar 10 23:53:33 2009 root
 drwxr-xr-x        0 Thu Dec 18 20:30:04 2008 sbin
 drwxr-xr-x        0 Sat Jan 01 00:13:48 2000 sys
 drwxr-xr-x        0 Sat Jan 01 00:13:40 2000 tmp
 drwxr-xr-x        0 Thu Jan 15 18:31:53 2009 usr
 lrwxrwxrwx        8 Wed Nov 04 05:24:32 2009 var -> /tmp/var
 -rw-r--r--   524288 Wed Dec 04 15:08:25 2013 uboot-original-mtd0.kwb
 -rw-r--r--        0 Sat Jan 01 00:24:15 2000 uboot-original-mtd0.kwb
 -rw-r--r--       32 Sat Jan 01 00:25:53 2000 uboot-original-mtd0.kwb.md5
 -rw-r--r--   524288 Sat Jan 01 00:25:55 2000 uboot-original-mtd0.kwb
u-boot>> run pogo_bootcmd
run pogo_bootcmd
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...

From another device, try to ping and ssh in
[root@ubuntu]# ping 192.168.1.101
PING 192.168.1.101 (192.168.1.101): 56 data bytes
64 bytes from 192.168.1.101: icmp_seq=0 ttl=64 time=139.909 ms
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=58.439 ms
^C
--- 192.168.1.101 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 58.439/99.174/139.909/40.735 ms
[root@ubuntu]# ssh root@192.168.1.101
ssh: connect to host 192.168.1.101 port 22: Connection refused
Re: Pogoplug E02 Bad Block
December 05, 2013 01:07AM
musselmanb,

Look like it booted the orginal Pogo OS. No way to tell for sure without serial console, though. But if you use nmap to scan your network, you should see whether port 22 is opened for SSH.

Have you registered this pogoplug E02 before at pogoplug.com? if you did, then try log in to that site and re-enable SSH. It should allow you to change password (the default login is root/ceadmin for Pogo E02).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 05, 2013 01:17PM
bodhi,

I brought this from ebay advertised as new. I was able to ssh in with default root/ceadmin to flash the uboot. The weird part is when Pogo OS is running, I get a different mac address on my router 00:50:43:00:02:02. When boot from usb, I get the correct mac 00:25:31:24:50:33 set in the env. The mac was correct at the first boot to ssh in. After uboot manual flash, I rebooted and notice the ip changed, that I discover the new mac address reported.

With your recomendation to register with pogoplug, I realize pogo service is not disabled since I didn't run Jeff's script. Maybe because of that my pogo is updated with ssh disabled. So I went ahead register it at http://pogoplug.com/activate/, great it found my device and I can see my files online. There is still no ssh enable option under setting, security.

The wired thing is, it seem to generate a new unique id everytime pogoplug is rebooted. After a reboot, I no longer see my files online. It show the device as offline. I do the activation process again and it add a 2nd device to the list and my files show up (1st one grayed out). Once my device is activated, doing it a 2nd time without rebooting will say device not found. I tried to manually add the id on the bottom label, doing so just show the device as offline.

Look like my nand is not saving or is acking weird with the mulitple uboot-original-mtd0.kwb listed.

I think it is best to reflash the pogo OS. What are the commands to save the mtd from a working pogoplug, erase and reflash to this pogoplug?

Thanks.



Edited 1 time(s). Last edit at 12/05/2013 02:03PM by musselmanb.
Re: Pogoplug E02 Bad Block
December 05, 2013 03:02PM
bodhi,

Let me know if these are correct steps

Boot into linux and make backup to root of usb
mkdir ~/backup
cd ~/backup
nanddump -nf ~/backup/mtd0.oob /dev/mtd0
nanddump -nf ~/backup/mtd1.oob /dev/mtd1
nanddump -nf ~/backup/mtd2.oob /dev/mtd2
nanddump -nf ~/backup/mtd3.oob /dev/mtd3
nanddump -nof ~/backup/mtd0 /dev/mtd0
nanddump -nof ~/backup/mtd1 /dev/mtd1
nanddump -nof ~/backup/mtd2 /dev/mtd2
nanddump -nof ~/backup/mtd3 /dev/mtd3
sha1sum mtd0 > ~/backup/mtd0.sha1
sha1sum mtd1 > ~/backup/mtd1.sha1
sha1sum mtd2 > ~/backup/mtd2.sha1
sha1sum mtd3 > ~/backup/mtd3.sha1


Same usb boot on different pogoplug and do restore
#a block is 128K, 1M is 8 blocks

#4Mx8=32 blocks
flash_erase /dev/mtd1 0 32
nandwrite /dev/mtd1 ~/backup/mtd1

#32Mx8=256 blocks
flash_erase /dev/mtd2 0 256
nandwrite /dev/mtd2 ~/backup/mtd2

#restore label setting
/usr/local/cloudengines/bin/blparam ethaddr=00:25:31:24:50:33
/usr/local/cloudengines/bin/blparam cesvcid=ABC.......OPQRS



Edited 1 time(s). Last edit at 12/05/2013 03:03PM by musselmanb.
Re: Pogoplug E02 Bad Block
December 06, 2013 01:36AM
musselmanb,

1. The nanddump and nandwrite go in pair. But I don't know the nanddump and nandwrite version you're using. Are you using what Jeff script uses?

Your nanddump and nandwrite look OK to me if those were same one that Jeff script uses.

nanddump -nof ~/backup/mtd1 /dev/mtd1
nandwrite /dev/mtd1 ~/backup/mtd1

2. Your flashing would work only if the stock Pogoplug NAND has the same MTD parts as what Jeff script defines. I don't remember if this is true. If you have a working stock Pogoplug now then you should login and do
cat /proc/mtd

to make sure the mtds you dump are correct location and size.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 06, 2013 10:05PM
i got it working except the mac address

1st backup from a working pogoplug
[root@alarm backup1]# mkdir ~/backup1
[root@alarm backup1]# cd ~/backup1
[root@alarm backup1]# wget http://download.doozan.com/uboot/nandwrite
[root@alarm backup1]# wget http://download.doozan.com/uboot/nanddump
[root@alarm backup1]# wget http://download.doozan.com/uboot/flash_erase
[root@alarm backup1]# chmod +x nandwrite
[root@alarm backup1]# chmod +x nanddump
[root@alarm backup1]# chmod +x flash_erase 

[root@alarm backup1]# ./nanddump -nof mtd2 /dev/mtd2
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x02000000...

use the same usb boot into linux to repair
[root@alarm backup1]# ./flash_erase /dev/mtd2 0 256
Erase Total 256 Units
Performing Flash Erase of length 131072 at offset 0x1fe0000 done
[root@alarm backup1]# ./nandwrite /dev/mtd2 mtd2
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
.
.
Writing data to block 253 at offset 0x1fa0000
Writing data to block 254 at offset 0x1fc0000
Writing data to block 255 at offset 0x1fe0000

[root@alarm backup1]# cd /tmp/
[root@alarm tmp]# ~/backup1/nanddump -nof newfile /dev/mtd2
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x02000000...
[root@alarm tmp]# diff -s newfile ~/backup1/mtd2
Files newfile and /root/backup1/mtd2 are identical

Reboot without usb
[root@ubuntu]# root@192.168.1.101
root@192.168.1.101's password: 
Pogoplug:~$ /usr/sbin/fw_printenv 
....
usb_rootfstype=ext3
arcNumber=3542
machid=dd6
ethaddr=00:25:31:24:50:33
serverip=192.168.1.100
ipaddr=192.168.1.101
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole


Pogoplug:~$ /usr/local/cloudengines/bin/blparam ethaddr=00:25:31:24:50:33
-bash: /usr/local/cloudengines/bin/blparam: No such file or directory
Pogoplug:~$ cd /tmp/ 
Pogoplug:/tmp$ wget http://download.doozan.com/uboot/blparam
Pogoplug:/tmp$ chmod +x blparam
Pogoplug:/tmp$ ./blparam ethaddr=00:25:31:04:80:e3  
Too many bit errors @ 0xa0000 -- Can't correct!
PAGE DATA:
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................


000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
   -- Invalid CRC32 on parameters: 0xffffffff != 0x619d86db

How do I fix my mac address? my router still show 00:50:43:00:02:02. Perhap this the real mac address, the label is wrong?



Edited 1 time(s). Last edit at 12/06/2013 10:20PM by musselmanb.
Re: Pogoplug E02 Bad Block
December 06, 2013 10:32PM
In pogo OS, what is your output of
cat /etc/fw_env.config
does it show 0xa0000 as the address?

If you have use fw_setenv in Pogo OS. Then continue using fw_setenv, don't use blparam. But if you have not, then use blparam. Because they have different checksum.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 07, 2013 11:14AM
Since it is a clone, all settings remain the same.
Pogoplug:~$ cat /etc/fw_env.config 
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0		0xc0000		0x20000		0x20000
Pogoplug:~$


Correct me if I am wrong. I think fw_printenv/fw_setenv is for Jeff uboot. blparam is for the orignal uboot. They serve different purpose. I agree we should use only fw_???env since we don't need to change any of the pogo boot env.

With a working E02, I ran blparam from ALARM work perfectly
[root@alarm backup1]# ./blparam 
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.0.0
run_diag=yes
console=console=ttyS0,115200
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/mtdblock2 ro
ethmtu=1500
usb0Mode=host
nandEcc=1bit
ethact=egiga0
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
bootargs=console=ttyS0,115200 root=/dev/mtdblock2 ro
serverip=169.254.254.252
ipaddr=169.254.254.253
ethaddr=
cesvcid=
ceboardver=PPV2
bootcmd=nand read.e 0x800000 0x100000 0x200000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
[root@alarm backup1]#

You can see, the output is different from fw_printenv. blparam also contain cesvcid value that pogo os use. I did a nanddump on block 5 (0xa0000) and confirm it is pogo uboot enviroment, same out as blparam. A nanddump on block 6 is Jeff's boot environment, same as fw_printenv.


Now back to the bad block E02. To get around the bad block, I erased block 0-5 (normally is 0-4 and block 5 is untouched). Since the new uboot is using block 5, the pogo uboot environment is wiped out.

I think I reached a dead end. I hope my theory is wrong. Please let me know if there is a work around.
Re: Pogoplug E02 Bad Block
December 07, 2013 03:30PM
musselmanb,

Your theory is correct :) because your bad block was on the first 4 blocks (I did not notice if you've posted the output of flashing uBoot on bad block). Original uBoot uses 0xa0000 for the envs. Jeff/Davy's uBoot uses 0xc0000. The reason was so that original uBoot envs would stay intact so it could be used in booting Pogo OS. But because of bad block, we wiped out block 5 to install new uBoot.

The bad block must have been block 4? am I guessing it right? If that was the case, there might be a solution.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 07, 2013 04:44PM
Block 2 is bad
Pogoplug:/tmp$ /usr/sbin/flash_erase /dev/mtd0 0 5
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x40000
MTD Erase failure: Input/output error

Pogoplug:/tmp$ /usr/sbin/nandwrite /dev/mtd0 uboot.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000



Edited 1 time(s). Last edit at 12/07/2013 04:49PM by musselmanb.
Re: Pogoplug E02 Bad Block
December 07, 2013 05:51PM
musselmanb ,

I think you're almost out of option here. The Pogo E02 does not have UART booting, so if we flash around the bad block without using block 5 (I had an idea how to do that), and it does not work, you can't recover without JTAG.

Here what I was thinking, but please do not attempt this if you have no way of recovering :)

The stock uBoot size must have been 3 blocks or less. And when CE flashed it to your Pogo, the bad block was skipped, but it was successfull because they did not pad the image to 4 blocks. Since your bad block is the 2nd one, you would need to chop the orginal uBoot backup image to 4 pieces (1 block per piece), flash the 1st block using the first piece, flash the 3rd block using 2nd piece, and 4rd block using the 3rd piece. And that get you the whole original uBoot into 3 blocks. If this was successful, to recover the original uBoot envs, you can get somebody to create the orginal uBoot envs in an image (like Jeff did) and flash it to block 5.

Wait a minute... other thought, if my theory is correct, then you could just flash the original uBoot envs image to block 5 :)

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



Edited 2 time(s). Last edit at 12/07/2013 06:08PM by bodhi.
Re: Pogoplug E02 Bad Block
December 07, 2013 06:38PM
look like i have hope. looking back at my own post (it is nice to have something i can look at it over and over again), uBoot didn't use block 5. It erase block 0-5, not counting block 5. To verify i dump each block individually and confirm that uboot written in block 0,1,3,4.

Pogoplug:/tmp$ ./flash_erase /dev/mtd0 0xa0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xa0000 done
Pogoplug:/tmp$ ./nandwrite -s 655360 /dev/mtd0 ~backup1/uboot-mtd0.environment
Writing data to block a0000
Pogoplug:/tmp$


bingo, all working now. I don't know why thing got corrupted. I think pogo try to update itself and disabled my ssh but the update maybe incomplete/changed while I was flashing uboot.
Re: Pogoplug E02 Bad Block
December 07, 2013 07:07PM
Congrat!

I am glad it worked out for you!

Hope my usage of the block numbers did not confuse anybody reading this. When I said block 1 to 4 above, I meant 1st block to 4th block.

Very possible the reason it was corrupted because of fw_setenv. It would write a different checksum to 0xa0000, and blparam expects different checksum. Usually the checksum got rebuilt during reboot a second time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug E02 Bad Block
December 07, 2013 08:42PM
bodhi ,

Thanks for all your help.

Side question, when i do ./nanddump -nof /tmp/mtd2 /dev/mtd2 I get the entire 32MB mtd2 image for backup. Is there a command to dump only the actual roofs data? Say if mtd2 block become bad, then the OS likely get corrupted too. The backup probably not restoreable too due to not enough blocks to write.

Is the dump extractable?
Re: Pogoplug E02 Bad Block
December 07, 2013 09:14PM
musselmanb

> Is the dump extractable?

It could be. We don't know exactly how much data to dump, without mounting it. But if you would want to recover from only a handful of bad blocks, then I would dump 32MB - 1 block, 32MB - 4 blocks and so on. See if that will be ok to flash it back.

Or you could try mounting it, copy the content with cp -aR to a USB thumb, and then repack the rootfs from USB in the format uBoot expect (ie. jffs2) and use it to flash only the actual size.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
cowboyuptx
Re: Pogoplug E02 Bad Block
December 25, 2013 05:56AM
Merry Christmas everybody!

Unfortunately I'm a big time noob who has experienced the dreaded bad block in my Pogo Black E02...

I tried to force the install with the "no-uboot-check" method, but of course that failed and now my device is in an "unstable state"....

I've read the posts by Bhodi / restamp Link that explain how to possibly correct this, but it's a little over my head... Anything beyond cut and paste to the terminal will have to be explained a bit more to me...

Bhodi mentioned that the first thing he did after the no-uboot-check failed, was to backup and then erase 5 blocks, but I'm not sure how to do either...

I still have my terminal open from the point I began my initial install attempt until the present, I can post any of this if it would be helpful?

Thanks for any help offered...
Re: Pogoplug E02 Bad Block
December 25, 2013 04:30PM
cowboyuptx,

Unfortunately I won't have time to give you a hand since I'm starting a long trip, but if your bad blocks are what we have seen in this forum then I could point you to the thread/posts. Or perhaps restamp will guide you with figuring out the commands. So for starting, while you are still in Pogo OS, pls post the output of:

dmesg

Note that if you have shutdown the box then the only way to recover is JTAG. This box does not have UART booting.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
cowboyuptx
Re: Pogoplug E02 Bad Block
December 25, 2013 05:41PM
Hi Bhodi... Merry Christmas! Thank you for everything you've done to help people in my situation, not to overdramatize the possible bricking of a Pogo that cost me $15 shipped... Nobody wants to break their new toy before they've even had a chance to play with it... Btw, my pogo is still on (no reboots), and the terminal is still open from the point I ran the initial install attempt, until the present...

Here's the dmesg output....

-bash-3.2# dmesg
[    0.000000] Linux version 2.6.22.18 (bdietrich@buildman) (gcc version 4.2.1) #81 Tue Oct 19 16:05:00 PDT 2010
[    0.000000] CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
[    0.000000] Machine: Feroceon-KW
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   DMA zone: 512 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 65024 pages, LIFO batch:15
[    0.000000]   Normal zone: 0 pages used for memmap
[    0.000000] CPU0: D VIVT write-back cache
[    0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] Built 1 zonelists.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 ro
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.010000] Memory: 256MB 0MB 0MB 0MB = 256MB total
[    0.010000] Memory: 255872KB available (3592K code, 253K data, 124K init)
[    0.010000] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[    0.250000] Mount-cache hash table entries: 512
[    0.250000] CPU: Testing write buffer coherency: ok
[    0.250000] NET: Registered protocol family 16
[    0.250000] 
[    0.250000] CPU Interface
[    0.250000] -------------
[    0.250000] SDRAM_CS0 ....base 00000000, size 256MB 
[    0.250000] SDRAM_CS1 ....disable
[    0.250000] SDRAM_CS2 ....disable
[    0.250000] SDRAM_CS3 ....disable
[    0.250000] PEX0_MEM ....base e8000000, size 128MB 
[    0.250000] PEX0_IO ....base f2000000, size   1MB 
[    0.250000] INTER_REGS ....base f1000000, size   1MB 
[    0.250000] NFLASH_CS ....base fa000000, size   2MB 
[    0.250000] SPI_CS ....base f4000000, size  16MB 
[    0.250000] BOOT_ROM_CS ....no such
[    0.250000] DEV_BOOTCS ....no such
[    0.250000] CRYPT_ENG ....base f0000000, size   2MB 
[    0.250000] 
[    0.250000]   Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21_with_rx_desc_tuned)-- SHEEVA PLUG  Soc: 88F6281 A0 LE
[    0.250000] 
[    0.250000]  Detected Tclk 200000000 and SysClk 400000000 
[    0.250000] MV Buttons Device Load
[    0.250000] Marvell USB EHCI Host controller #0: c0652600
[    0.750000] PEX0 interface detected no Link.
[    0.750000] PCI: bus0: Fast back to back transfers enabled
[    0.750000] SCSI subsystem initialized
[    0.750000] usbcore: registered new interface driver usbfs
[    0.750000] usbcore: registered new interface driver hub
[    0.750000] usbcore: registered new device driver usb
[    0.750000] NET: Registered protocol family 2
[    0.760000] Time: kw_clocksource clocksource has been installed.
[    0.850000] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.850000] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.850000] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.850000] TCP: Hash tables configured (established 8192 bind 8192)
[    0.850000] TCP reno registered
[    0.880000] RTC has been updated!!!
[    0.880000] RTC registered
[    0.880000] Use the XOR engines (acceleration) for enhancing the following functions:
[    0.880000]   o RAID 5 Xor calculation
[    0.880000]   o kernel memcpy
[    0.880000]   o kenrel memzero
[    0.880000] Number of XOR engines to use: 4
[    0.880000] cesadev_init(c00117b0)
[    0.880000] mvCesaInit: sessions=640, queue=64, pSram=f0000000
[    0.880000] MV Buttons Driver Load
[    0.880000] squashfs: version 3.3 (2007/10/31) Phillip Lougher
[    0.880000] squashfs: LZMA suppport for slax.org by jro
[    0.880000] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.880000] io scheduler noop registered
[    0.880000] io scheduler anticipatory registered (default)
[    0.900000] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
[    0.900000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    0.910000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
[    0.920000] Loading Marvell Ethernet Driver:
[    0.920000]   o Cached descriptors in DRAM
[    0.920000]   o DRAM SW cache-coherency
[    0.930000]   o Single RX Queue support - ETH_DEF_RXQ=0
[    0.930000]   o Single TX Queue support - ETH_DEF_TXQ=0
[    0.940000]   o TCP segmentation offload enabled
[    0.940000]   o Receive checksum offload enabled
[    0.950000]   o Transmit checksum offload enabled
[    0.950000]   o Network Fast Processing (Routing) supported
[    0.960000]   o Driver ERROR statistics enabled
[    0.960000]   o Driver INFO statistics enabled
[    0.970000]   o Proc tool API enabled
[    0.970000]   o Rx descripors: q0=128
[    0.970000]   o Tx descripors: q0=532
[    0.980000]   o Loading network interface(s):
[    0.990000]     o eth0, ifindex = 1, GbE port = 0
[    0.990000]     o eth1, ifindex = 2, GbE port = 1
[    1.000000] 
[    1.000000] mvFpRuleDb (cfdf6000): 2048 entries, 8192 bytes
[    1.000000] Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
[    1.010000] Copyright (c) 1999-2006 Intel Corporation.
[    1.020000] e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
[    1.020000] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.030000] 
[    1.030000] Warning Sata is Powered Off
[    1.030000] NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
[    1.040000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    1.050000] Scanning device for bad blocks
[    1.050000] Bad eraseblock 2 at 0x00040000
[    1.080000] Bad eraseblock 358 at 0x02cc0000
[    1.090000] Bad eraseblock 546 at 0x04440000
[    1.110000] Bad eraseblock 800 at 0x06400000
[    1.110000] Bad eraseblock 805 at 0x064a0000
[    1.120000] Using static partition definition
[    1.130000] Creating 4 MTD partitions on "nand_mtd":
[    1.130000] 0x00000000-0x00100000 : "u-boot"
[    1.140000] 0x00100000-0x00500000 : "uImage"
[    1.140000] 0x00500000-0x02500000 : "root"
[    1.150000] 0x02500000-0x08000000 : "data"
[    1.150000] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
[    1.160000] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
[    1.200000] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
[    1.220000] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[    1.220000] usb usb1: configuration #1 chosen from 1 choice
[    1.230000] hub 1-0:1.0: USB hub found
[    1.230000] hub 1-0:1.0: 1 port detected
[    1.350000] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.350000] USB Universal Host Controller Interface driver v3.0
[    1.630000] usb 1-1: new high speed USB device using ehci_marvell and address 2
[    1.780000] usb 1-1: configuration #1 chosen from 1 choice
[    1.780000] hub 1-1:1.0: USB hub found
[    1.790000] hub 1-1:1.0: 4 ports detected
[    1.900000] usbcore: registered new interface driver usblp
[    1.900000] drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
[    1.910000] Initializing USB Mass Storage driver...
[    1.910000] usbcore: registered new interface driver usb-storage
[    1.920000] USB Mass Storage support registered.
[    1.930000] mice: PS/2 mouse device common for all mice
[    1.930000] i2c /dev entries driver
[    1.930000] Linux telephony interface: v1.00
[    1.940000] md: linear personality registered for level -1
[    1.940000] md: raid0 personality registered for level 0
[    1.950000] md: raid1 personality registered for level 1
[    2.120000] raid6: int32x1     97 MB/s
[    2.290000] raid6: int32x2    114 MB/s
[    2.460000] raid6: int32x4    122 MB/s
[    2.630000] raid6: int32x8    110 MB/s
[    2.630000] raid6: using algorithm int32x4 (122 MB/s)
[    2.630000] md: raid6 personality registered for level 6
[    2.640000] md: raid5 personality registered for level 5
[    2.640000] md: raid4 personality registered for level 4
[    2.650000] raid5: measuring checksumming speed
[    2.700000]    arm4regs  :  1084.000 MB/sec
[    2.750000]    8regs     :   754.400 MB/sec
[    2.800000]    32regs    :   900.000 MB/sec
[    2.800000] raid5: using function: arm4regs (1084.000 MB/sec)
[    2.810000] device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
[    2.810000] dm_crypt using the OCF package.
[    2.820000] sdhci: Secure Digital Host Controller Interface driver
[    2.820000] sdhci: Copyright(c) Pierre Ossman
[    2.830000] usbcore: registered new interface driver usbhid
[    2.830000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[    2.840000] TCP cubic registered
[    2.840000] NET: Registered protocol family 1
[    2.850000] NET: Registered protocol family 17
[    2.850000] md: Autodetecting RAID arrays.
[    2.860000] md: autorun ...
[    2.860000] md: ... autorun DONE.
[    4.160000] Empty flash at 0x009ac208 ends at 0x009ac800
[    8.040000] VFS: Mounted root (jffs2 filesystem) readonly.
[    8.050000] Freeing init memory: 124K
[   10.170000] eth0: link down
[   10.180000] eth0: started
[   11.830000] eth0: link up, full duplex, speed 100 Mbps
[   19.370000] fuse init (API version 7.8)
[   19.740000] ufsd: module license 'Commercial product' taints kernel.
[   19.860000] ufsd: driver 8.1 (NNTFS4LINUX_U81_039_A)  LBD=ON compact loaded at bf040000
[   19.860000] NTFS read/write support included
[   19.860000] Hfs+/HfsX read/write support included
[   20.320000] rtusb init --->
[   20.330000] usbcore: registered new interface driver rt2870
[   20.350000] tun: Universal TUN/TAP device driver, 1.6
[   20.360000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   20.390000] Cloud Engines XCE Init [Version: 2.0.5.10]
[   20.400000] XCE: CPU MEMORY MAP:
[   20.400000] XCE:   -- 0x00001000 - 0xbeffffff (3055 MB)  User Space Mappings
[   20.410000] XCE:   -- 0xbf000000 - 0xbfffffff (  16 MB)  Kernel module space
[   20.410000] XCE:   -- 0xc0000000 - 0xcfffffff ( 256 MB)  Kernel direct-mapped ram
[   20.420000] XCE:   -- 0xd0800000 - 0xe7ffffff ( 376 MB)  Kernel vmalloc space
[   20.430000] XCE:   -- 0xe8000000 - 0xfeffffff ( 367 MB)  Kernel platform space
[   20.430000] XCE: CPU FEATURES:
[   20.440000] XCE:   -- I Cache:         enabled
[   20.440000] XCE:   -- D Cache:         enabled
[   20.450000] XCE:   -- Branch Predict:  enabled
[   20.450000] XCE:   -- MMU:             enabled
[   20.460000] XCE:   -- Alignment Abort: enabled
[   20.460000] XCE:   -- ICache Prefetch: enabled
[   20.460000] XCE:   -- DCache Prefetch: enabled
[   20.470000] XCE:   -- L2 Cache:        enabled
[   20.470000] XCE:   -- L2 Prefetch:     disabled
[   20.480000] XCE:   -- L2 Writethrough: disabled
[   20.480000] XCE:   -- Write Allocate:  disabled
[   20.490000] XCE:   -- Streaming:       disabled
[   20.490000] XCE: BLPARAMS: reading 2048 bytes @ a0000
[   20.500000] XCE: Loaded Property Size: 2048
[   20.500000] XCE:    - 'cesvcid' -> 'ZFS4TGKCMXLJ7SFY7ESASW7BNE'
[   20.510000] XCE:    - 'ceboardver' -> 'PPV2'
[   20.510000] XCE: Current GPIO State:
[   20.520000] XCE:  GPIO L OUT:    0xeff00000
[   20.520000] XCE:  GPIO L OE:     0xefffffff
[   20.530000] XCE:  GPIO L BLINK:  0x00000000
[   20.530000] XCE:  GPIO L POL:    0x00000000
[   20.530000] XCE:  GPIO L IN:     0x00000080
[   20.540000] XCE:  GPIO H OUT:    0xffffffff
[   20.540000] XCE:  GPIO H OE:     0xfffc3fff
[   20.550000] XCE:  GPIO H BLINK:  0x00008000
[   20.550000] XCE:  GPIO H POL:    0x00000000
[   20.550000] XCE:  GPIO H IN:     0x0003c000
[   20.560000] XCE: Kernel thread starting PID: 398
[   22.210000] XCE: BLPARAMS: reading 2048 bytes @ a0000
[   22.220000] XCE: BLPARAMS: reading 2048 bytes @ a0800
[   22.220000] XCE: BLPARAMS: reading 2048 bytes @ a1000
[   22.230000] XCE: BLPARAMS: reading 2048 bytes @ a1800
[   27.750000] XCE: XCE: LED -> CONNECTED
[ 1108.800000] eth0: link down
[ 1160.150000] eth0: link up, full duplex, speed 100 Mbps
[ 6580.800000] nand_erase: attempt to erase a bad block at page 0x00000080
cowboyuptx
Re: Pogoplug E02 Bad Block
December 25, 2013 05:44PM
Sorry I've been spelling your name wrong Bodhi... My bad...
Re: Pogoplug E02 Bad Block
December 25, 2013 07:03PM
cowboyuptx,

No problem :)

You're in luck here, it should be straight forward just like in the posts you've linked above.

Scanning device for bad blocks
[    1.050000] Bad eraseblock 2 at 0x00040000
[    1.080000] Bad eraseblock 358 at 0x02cc0000
[    1.090000] Bad eraseblock 546 at 0x04440000
[    1.110000] Bad eraseblock 800 at 0x06400000
[    1.110000] Bad eraseblock 805 at 0x064a0000

Your bad block is in the middle of where uBoot image should be flashed. So erasing 5 blocks is still applicable. The steps to verify the 2 pieces of uBoot after flashing over the bad block should be different because the bad block is the 3rd block (block 2, counting from 0). So the verification steps need to change to dump 2 blocks starting at block 0, and dump 2 blocks starting at block 3 (skip block 2).

If you live on the wild side, you can do it without verification steps (I would not recommend skipping this). Erase 5 blocks, like I did and flash uBoot image that should be in /tmp right now. Like this

-bash-3.2# /usr/sbin/flash_erase /dev/mtd0 0 5
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x60000
MTD Erase failure: Input/output error

-bash-3.2# /usr/sbin/nandwrite /dev/mtd0 uboot.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000

But the bad block will show in the above output as:
Bad block at 40000, 1 block(s) from 40000 will be skipped

and the flash error should be
Performing Flash Erase of length 131072 at offset 0x40000



If you rather do the verification (I strongly recommend that you do), then the address and size in the verification step must be changed.

I'll check back in a few days.

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



Edited 1 time(s). Last edit at 12/25/2013 07:05PM by bodhi.
cowboyuptx
Re: Pogoplug E02 Bad Block
December 26, 2013 01:18AM
Again, thanks for the help, and forgive my noobishness,

but I'm not exactly sure what command to run next in the terminal, nor what exactly needs to be changed since my bad block is block#2 and and the command in the link was for block 4...

This is what Bodhi did for verification, but it might as well be in Latin to me... What do I need to change?
-bash-3.2# /usr/sbin/flash_erase /dev/mtd0 0 5
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x60000
MTD Erase failure: Input/output error

-bash-3.2# /usr/sbin/nandwrite /dev/mtd0 uboot.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000

If anybody else other than bodhi can help then that would be great, otherwise, I don't mind leaving my system on for a few days until Bodhi gets back from what I'm sure is some well deserved vacation time... Thanks...
Re: Pogoplug E02 Bad Block
December 30, 2013 01:51AM
cowboyuptx,

I'm on the road for a few weeks, so I can only respond to question.

The above is not for verification. It's for flashing uBoot to NAND. What it means is in your case, the bad block is block 2, so those 2 command are to erase the necessary 5 NAND blocks (because only 4 blocks are usable in the first 5), and then write uBoot image to these 5 blocks (nandwrite autotmaticall skip the bad block, the uBoot image size is 4 blocks).


So below is the instruction (2 parts), flashing uBoot and verification, given the bad block is block 2.

I. Flashing uBoot

- Erase 5 blocks:
/usr/sbin/flash_erase /dev/mtd0 0 5
Expected output:
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x40000
MTD Erase failure: Input/output error

- Write uBoot image:
/usr/sbin/nandwrite /dev/mtd0 uboot.mtd0.kwb
Expected Output:
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000


II. Verification

- Dump NAND to 2 chunks, block 0 and 1 to uBoot1.dump, block 3 and 4 to uBoot2.dump
/usr/sbin/nanddump -nof /tmp/uBoot1.dump -l 0x40000 /dev/mtd0
/usr/sbin/nanddump -nof /tmp/uBoot2.dump -l 0x40000 -s 0x60000 /dev/mtd0

- Merge 2 parts together into a 4-block image
cat uBoot1.dump uBoot2.dump > uBoot.dump

- Compare the uBoot image and what were written to NAND:
diff -s uboot.mtd0.kwb uBoot.dump
Expected Output:
Files uboot.mtd0.kwb and uBoot.dump are identical

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



Edited 1 time(s). Last edit at 12/30/2013 11:59AM by bodhi.
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: