Welcome! Log In Create A New Profile

Advanced

Need help - Goflex home - uboot corrupted - errors wrting flash

Posted by metric 
Need help - Goflex home - uboot corrupted - errors wrting flash
June 06, 2013 01:48AM
I was moving away from arch to debian on my goflex home and debootstrap gave me incompatible hardware error. I chaged the arch number to dockstar and that action or something corrupted my environment.

I tried to update uboot with Jeff's script and it failed.

I also followed Bodhi's thread for manually writing the uboot here.
Forum Post

Here is my output. Everytime I read uboot I am getting different data.

rescue:/tmp# nanddump -bnof /tmp/uBoot.dump -l 0x80000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
rescue:/tmp# md5sum uBoot.dump 
6c042e9a01b414489093f6c1ac67402a  uBoot.dump
rescue:/tmp# nanddump -bnof /tmp/uBoot2.dump -l 0x80000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
rescue:/tmp# md5sum uBoot2.dump 
bee73b16c3ad2a1daefb02254c2a9aae  uBoot2.dump
rescue:/tmp# md5sum uboot.mtd0.kwb
77ce1df732843774e5257b615ba8a9db  uboot.mtd0.kwb

dmesg is also shows erros

[ 1309.298334] UBI error: ubi_io_read: error -74 (ECC error) while reading 129024 bytes from PEB 212:2048, read 129024 bytes
[ 1309.309536] UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 212
[ 1390.573808] UBIFS error (pid 145): ubifs_check_node: bad CRC: calculated 0x8c5a580d, read 0xe0ea7234
[ 1390.583023] UBIFS error (pid 145): ubifs_check_node: bad node at LEB 216:47000
[ 1390.590296] UBIFS error (pid 145): ubifs_read_node: expected node type 9
[ 1390.618565] uncorrectable error : 
[ 1390.622277] uncorrectable error : 
[ 1390.626158] uncorrectable error : 
[ 1390.630060] uncorrectable error : 
[ 1390.633496] UBI error: ubi_io_read: error -74 (ECC error) while reading 1998 bytes from PEB 55:34800, read 1998 bytes
[ 1390.644354] UBIFS error (pid 8340): ubifs_leb_read: reading 1998 bytes from LEB 53:32752 failed, error -74
[ 1390.654066] UBIFS error (pid 8340): try_read_node: cannot read node type 1 from LEB 53:32752, error -74
[ 1390.668442] uncorrectable error : 
[ 1390.671833] uncorrectable error : 
[ 1390.772425] uncorrectable error : 
[ 2354.898729] EXT3-fs (sda3): error: couldn't mount because of unsupported optional features (240)
[ 2372.443925] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 2913.272550] uncorrectable error : 
[ 2913.277301] uncorrectable error : 
[ 2913.282845] UBIFS error (pid 133): ubifs_decompress: cannot decompress 1953 bytes, compressor lzo, error -22
[ 2913.292924] UBIFS error (pid 133): read_block: bad data node (block 0, inode 288)
[ 2913.300457] UBIFS error (pid 133): do_readpage: cannot read page 0 of inode 288, error -22
[ 2913.314656] uncorrectable error : 
[ 2913.318728] uncorrectable error : 
[ 2913.322557] uncorrectable error : 
[ 2913.329609] uncorrectable error : 
[ 2913.333438] uncorrectable error : 
[ 2913.338077] uncorrectable error : 
[ 2913.341907] uncorrectable error : 
[ 2913.350964] uncorrectable error : 
[ 2913.358022] uncorrectable error : 
[ 2913.361848] uncorrectable error : 
[ 2913.366470] uncorrectable error : 
[ 2913.370313] uncorrectable error : 
[ 2913.375783] uncorrectable error : 
[ 2913.387698] uncorrectable error : 
[ 2913.391528] uncorrectable error : 
[ 2913.396963] uncorrectable error : 
[ 2913.413123] uncorrectable error : 
[ 2913.422914] uncorrectable error : 
[ 2913.430344] uncorrectable error : 
[ 2913.435749] uncorrectable error : 
[ 2913.441157] uncorrectable error : 
[ 2913.448157] uncorrectable error : 
[ 2913.458309] uncorrectable error : 
[ 2913.468478] uncorrectable error : 
[ 2913.473883] uncorrectable error : 
[ 2913.482964] uncorrectable error : 
[ 2913.498275] uncorrectable error : 
[ 2913.509229] uncorrectable error : 
[ 2913.512662] UBI error: ubi_io_read: error -74 (ECC error) while reading 129024 bytes from PEB 35:2048, read 129024 bytes
[ 2913.523779] UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 35
[13917.671023] UBIFS error (pid 8659): ubifs_decompress: cannot decompress 1294 bytes, compressor lzo, error -22
[13917.681016] UBIFS error (pid 8659): read_block: bad data node (block 29, inode 263)
[13917.688720] UBIFS error (pid 8659): do_readpage: cannot read page 29 of inode 263, error -22
[13917.698573] uncorrectable error : 
[13917.704228] uncorrectable error : 
[13917.710495] uncorrectable error : 
[13917.723573] uncorrectable error : 
[13917.730625] uncorrectable error : 
[13917.737677] uncorrectable error : 
[13917.745536] uncorrectable error : 
[13917.749777] uncorrectable error : 
[13917.771429] uncorrectable error : 
[13917.779216] uncorrectable error : 
[13917.786588] uncorrectable error : 
[13917.792787] uncorrectable error : 
[13917.812801] uncorrectable error : 
[13917.816620] uncorrectable error : 
[13917.821250] uncorrectable error : 
[13917.834936] uncorrectable error : 
[13917.848625] uncorrectable error : 
[13917.855604] UBI error: ubi_io_read: error -74 (ECC error) while reading 129024 bytes from PEB 16:2048, read 129024 bytes
[13917.866724] UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 16

I am currently in the rescue mode. Not sure how to proceed. It looks like mtd0 has bad flash. Can I use chained uboot from mtd3? How does one do it?

BTW the serial port on this device has stopped working too. I am using the same serial cable that I used to install rescue and uboot on this device previously. Is this connected to the corrupted environment?


Thanks....
Re: Need help - Goflex home - uboot corrupted - errors wrting flash
June 06, 2013 05:18AM
If your serial console doesn't show anything, it might be that your uBoot in mtd0 has been corrupted. You can try UART booting:
http://forum.doozan.com/read.php?3,7852,7852

If this works, then reflash uBoot to mtd0 while in serial console.
Re: Need help - Goflex home - uboot corrupted - errors wrting flash
June 07, 2013 05:46PM
Thanks Bodhi. I will try that but the device is currently up with the rescue system. I am afraid if I reboot and cannot get uart booting to work, I may have some hardware that cannot even function as a door-stop. Is this correct? Is there something I can try while the machine is up?
Re: Need help - Goflex home - uboot corrupted - errors wrting flash
June 07, 2013 06:33PM
metric,

Quote

rescue:/tmp# md5sum uboot.mtd0.kwb
77ce1df732843774e5257b615ba8a9db uboot.mtd0.kwb

Is uboot.mtd0.kwb is a saved image of current good uBoot image? You could try to reflash mtd0 with a good uBoot image from Debian command line.

First, verify your mtd partitions are what should be:
# fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)


Flashing example and expected output:
flash_erase /dev/mtd0 0 4

Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done

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

Before rebooting,

1. must setup netconsole if you don't have serial console.

2. Check your uBoot envs:

cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000


fw_printenv
the output should have no error and look sane (post here if you're not sure)

To boot with this new uBoot, you will need to use a Debian rootfs on USB stick, I assume you have one already?



Edited 1 time(s). Last edit at 06/07/2013 06:38PM 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: