Welcome! Log In Create A New Profile

Advanced

Need some help with uBoot on Grey Pogoplug, won't work don't want to brick!

Posted by Derrick 
Hi,

I had a previously working plugbox linux installation when one day, my plugbox died. No lights, just a high pitch screeching sound when plugged in. Assuming it was a hardware failure, I exchanged the unit (it was under a month old) and I now have a replacement one.

That being said, I am now having some MAJOR issues trying to get uBoot installed, and the plugapps (or debian, not sure which way i'm going this time) to install. This is my output from putty, but basically when I try to run the uboot installer program (even with the --no-uboot-check option) I am getting an error and scared to go any further. I'm not sure what to do, i'm hoping someone can help me.
Dumping data starting at 0x00000000 and ending at 0x00080000...
## Verifying new uBoot...
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.mtd0.kwb.md5   100% |*******************************|    74  --:--:-- ETA
##
##
## VERIFICATION FAILED!
##
## uBoot was not properly installed to mtd0.
##
##
## YOUR DEVICE MAY BE IN AN UNUSABLE STATE.
## DO NOT REBOOT OR POWER OFF YOUR DEVICE
##
##
## Make a backup of /tmp/uboot-mtd0-dump someplace safe and
## then re-run this installer.
-bash-3.2# rm install_uboot_mtd0.sh
-bash-3.2# wget http://plugapps.com/os/pogoplug/uboot/install_uboot_mtd0.sh
Connecting to plugapps.com (206.217.217.39:80)
install_uboot_mtd0.s 100% |*******************************| 17281  --:--:-- ETA
-bash-3.2# chmod +x install_uboot_mtd0.sh
-bash-3.2# ./install_uboot_mtd0.sh


!!!!!!  DANGER DANGER DANGER DANGER DANGER DANGER  !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
Seagate GoFlex Net
Seagate Dockstar
Pogoplug v1
Pogoplug Pink
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue:
Exiting. uBoot was not installed.
-bash-3.2# ./install_uboot_mtd0.sh


!!!!!!  DANGER DANGER DANGER DANGER DANGER DANGER  !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
Seagate GoFlex Net
Seagate Dockstar
Pogoplug v1
Pogoplug Pink
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue: ok
# checking for /usr/sbin/nandwrite...
# checking for /usr/sbin/nanddump...
# checking for /usr/sbin/flash_erase...
# checking for /usr/sbin/fw_printenv...
# checking for /etc/fw_env.config...

# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (69.163.187.226:80)
valid-uboot.md5      100% |*******************************|   756  --:--:-- ETA
## Unknown uBoot detected on mtd0: b5123ad4df03b5f64e43f6d7fe644b27
##
## 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.
-bash-3.2#
-bash-3.2# ./install_uboot_mtd0.sh


!!!!!!  DANGER DANGER DANGER DANGER DANGER DANGER  !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
Seagate GoFlex Net
Seagate Dockstar
Pogoplug v1
Pogoplug Pink
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue:
Exiting. uBoot was not installed.
-bash-3.2# ./install_uboot_mtd0.sh --no-uboot-check


!!!!!!  DANGER DANGER DANGER DANGER DANGER DANGER  !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
Seagate GoFlex Net
Seagate Dockstar
Pogoplug v1
Pogoplug Pink
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue: ok
# checking for /usr/sbin/nandwrite...
# checking for /usr/sbin/nanddump...
# checking for /usr/sbin/flash_erase...
# checking for /usr/sbin/fw_printenv...
# checking for /etc/fw_env.config...

# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (69.163.187.226:80)
valid-uboot.md5      100% |*******************************|   756  --:--:-- ETA
## Unknown uBoot detected on mtd0: b5123ad4df03b5f64e43f6d7fe644b27
##
## --no-uboot-check flag detected, continuing installation

############################################
Your device could not be auto-detected.

You must be using a device listed below to run this installer.

What device are you using? Type the number of your device and press ENTER.
1 - Seagate Dockstar
2 - Seagate GoFlex Net
3 - Pogoplug v1
4 - Pogoplug v2 - Pink
5 - Other
4
Selected Pogoplug v2 - Pink

# Installing uBoot
## Installing pinkpogo jeff-2010-10-23
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.mtd0.kwb.md5   100% |*******************************|    74  --:--:-- ETA
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.mtd0.kwb       100% |*******************************|   512k 00:00:00 ETA
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000
MTD Erase failure: Input/output error
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
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
## Verifying new uBoot...
Connecting to jeff.doozan.com (69.163.187.226:80)
uboot.mtd0.kwb.md5   100% |*******************************|    74  --:--:-- ETA
##
##
## VERIFICATION FAILED!
##
## uBoot was not properly installed to mtd0.
##
##
## YOUR DEVICE MAY BE IN AN UNUSABLE STATE.
## DO NOT REBOOT OR POWER OFF YOUR DEVICE
##
##
## Make a backup of /tmp/uboot-mtd0-dump someplace safe and
## then re-run this installer.
-bash-3.2# ls
hbplug.log             resolv.conf            usb
install_uboot_mtd0.sh  uboot-mtd0-dump        var
mtd0.uboot             uboot.mtd0.kwb
nanddump               uboot.mtd0.kwb.md5
-bash-3.2# nandwrite
Usage: nandwrite [OPTION] MTD_DEVICE INPUTFILE
Writes to the specified MTD device.

  -a, --autoplace       Use auto oob layout
  -j, --jffs2           force jffs2 oob layout (legacy support)
  -y, --yaffs           force yaffs oob layout (legacy support)
  -f, --forcelegacy     force legacy support on autoplacement enabled mtd device
  -n, --noecc           write without ecc
  -o, --oob             image contains oob data
  -s addr, --start=addr set start address (default is 0)
  -p, --pad             pad to page size
  -b, --blockalign=1|2|4 set multiple of eraseblocks to align to
  -q, --quiet           don't display progress messages
      --help            display this help and exit
      --version         output version information and exit
-bash-3.2# flash_erase /dev/mtd0 0 4
-bash: flash_erase: command not found
-bash-3.2# nandwrite /dev/mtd0 uboot.mtd0.kwb
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 80000
-bash-3.2#

Any help would be greatly appreciated!
Re: Need some help with uBoot on Grey Pogoplug, won't work don't want to brick!
December 13, 2010 04:59PM
I'm not an expert on this, but it seems to me that you have the dreaded "bad blocks on mtd0" condition. Jeff says don't try to install his uBoot if you have this, but of course, at this point, you have already done so, so you need to figure out how to continue before you turn off the power and brick your PogoPlug.

It seems the 4th block of NAND in your device -- the one from 0x60000 to 0x80000 -- is bad. That's why your checksum is failing and why the script is declaring the install unsuccessful.

Now, here's the rub: I have no idea how the uBoot invoker reacts to this error. If the error were in the uImage part of the NAND (which the uBoot reads from), or in the root filesystem (which the Linux kernel reads from), the bad block would simply be skipped and the data expected to continue in the next good block. (Does the uBoot bootstrap itself, perhaps from short program at block zero? If so, that program would have to have the smarts to skip bad blocks.) Perhaps someone else knows if an error in mtd0 is recoverable and can chime in. Or you could try putting the question directly to Jeff. When I emailed him directly about a similar problem with my Dockstar, he got back to me quickly.

Since you have little to lose at this point, here's my suggestion: Change the flash_erase command in the script to erase 5 blocks, instead of 4 in mtd0 and then do the nand_write again. It will skip the bad block and write it's block 4 into the NAND as block 5. Now nanddump enough blocks to get 0x80000 bytes in your file and see if its checksum matches Jeff's uBoot's. If it does, you've done everything you can to make it work. You'll need to then strip out or manually perform the steps in the installer to install the uBoot environment and cross your fingers that the hardware boot sequence is either two-stage, or will handle the bad block in the NAND OK.

The only other alternative that I can suggest is to try reinstalling the initial boot loader. If it fits into 3 blocks, that should work. You can then try changing it's environment to chain-boot Jeff's uBoot from another area of the NAND. This was the approach people used before they had a known good boot loader to install directly, and I've seen it documented elsewhere, if you care to look for it.

Or, you could take your PogoPlug back and tell them that the second device they sold you also has a hardware problem.

Good luck. Let us know what happens.
Re: Need some help with uBoot on Grey Pogoplug, won't work don't want to brick!
December 13, 2010 05:38PM
I did a some additional checking, and here's something potentially interesting: If you "od -Ax uboot.mtd0.kwb | tail", you get:
Quote

p0 od -A x uboot.mtd0.kwb | tail
053010 130326 000144 130353 000144 000000 000000 142414 000144
053020 000001 000000 000001 000000 041020 000141 130402 000144
053030 073352 000144 000000 000000 131030 000144 000004 000000
053040 000001 000000 041060 000141 131041 000144 131101 000144
053050 000000 000000 132672 000144 000020 000000 000001 000000
053060 065734 000141 132702 000144 132742 000144 000000 000000
053070 010202 011620 000000 000000 000000 000000 000000 000000
053080 000000 000000 000000 000000 000000 000000 000000 000000
*
080000
What this means is that the 4th block of mtd0 will be completely filled with zeros -- i.e., all of the uBoot code resides in the first three blocks of NAND. Thus, if you can get a sane uBoot environment written, it might just work as is. That is, if the uBoot doesn't perform a checksum on itself. (But why should it? If it finds an error in itself, what recourse does it have, whereas if it presumes it is sane and proceeds as such, it might work well enough to do its job, even with some innocuous errors. At least, that's how I would write it.)

YMMV. Good luck.
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: