Welcome! Log In Create A New Profile

Advanced

How to restore uboot and rootfs of a partially bricked Segate Goflex Net

Posted by shv 
shv
How to restore uboot and rootfs of a partially bricked Segate Goflex Net
January 14, 2017 02:01PM
@bodhi,
I saw somewhere a post that flashing uboot and/or uboot env is also possible in the boot console (stop bootup at the beginning) using files from a connected usb stick. I have Goflex Net device where rootfs in flash is partly bricked. The original uboot is still on this device. Can you please tell me how to flash new uboot and uboot env with the boot console. This device does not support serial booting. Is there any other posibility?

Regards.
shv



Edited 6 time(s). Last edit at 02/01/2017 01:26PM by shv.
Re: How to flash new uboot from boot console
January 14, 2017 03:25PM
shv,

Quote

This device does not support serial booting. Is there any other posibility?

Is serial port not working?

If the only thing working is the original u-boot (assuming the stock OS in NAND is also bad), then you must have serial console.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
shv
Re: How to flash new uboot from boot console
January 14, 2017 11:11PM
bodhi,

the serial console is working. Nevertheless UART booting doesn't work because it is not supported form the processor. I could load something from USB or IDE ext2 filesystem.

Now I tried to flash the uboot from IDE:
ide reset
ext2load ide 0:1 0x6400000 /uboot.2016.05-tld-1.goflexnet.mtd0.kwb
nand erase 0x0 0x80000
nand write.e 0x6400000 0x0 0x80000
nand read.e 0x6500000 0x0 0x80000
cmp.b 0x6400000 0x6500000 0x80000
The device can be booted now.

There is a reflash procedure for Goflex Home: http://support.goflexhome.hipserv.com/en/reflash/. Is it possible to extract the root filesystem and flash it to NAND? How can I restore the original rootfs in the flash from that files?

I have one bad block: Device 0 bad blocks: 07940000.

-shv



Edited 10 time(s). Last edit at 01/15/2017 06:15AM by shv.
Re: How to flash new uboot from boot console
January 15, 2017 06:14AM
shv,

Use the latest Debian rootfs 4.4:

Quote

Updated 20 Feb 2016:

This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.

and do step 4 (append DTB to uImage), since this is stock u-boot. And don't set machid, just arcNumber. The rest of your envs are OK.

And if you still have trouble booting with HDD or USB from stock u-boot, I'll post instruction to flash u-boot in serial console.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 01/15/2017 06:17AM by bodhi.
Re: How to flash new uboot from boot console
January 15, 2017 06:19AM
shv
Re: How to flash new uboot from boot console
January 15, 2017 06:20AM
bodhi,

thanks for you answer. I found a way to flash the new uboot (see my updated previous post). Can you please help me to restore the original rootfs in the flash using hipserv2_seagateplug-20160314.ubi from http://support.goflexhome.hipserv.com/en/reflash/?

I have one bad block: Device 0 bad blocks: 07940000.

Regards.
shv
Re: How to flash new uboot from boot console
January 15, 2017 02:19PM
> the flash using hipserv2_seagateplug-20160314.ubi
> from
> http://support.goflexhome.hipserv.com/en/reflash/?

shv,

You would do a flash_erase on the rootfs mtd. And then ubiformat to flash it. Any bad block will be taken cared of by the formatting process.

However, I don't really know if this file is supposed to be flashed to this rootfs partition. I never look into the stock FW so not familiar with this file.

If you have a nanddump from that rootfs mtd, then it is much simpler. You can just flash_erase and nandwrite it. If you rather do this, then let me know. I can look to see if I can boot back to stock using one of my GF Homes and reset the password (I never use stock, but probably have set the password during the initial hacking).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 01/15/2017 02:23PM by bodhi.
shv
Re: How to flash new uboot from boot console
January 16, 2017 01:52AM
bodhi,

before trying to flash uib file I want to try backup and restore of the current rootfs mtd2. Can you please tell me the commands with the right options to backup and restore mtd2(rootfs)? Are there some commands in the serial console to deal with bad sectors and try to recover the information form such sectors?

Do you think that the ubi file form Goflex Home fits to Goflex Net?

- shv
Re: How to flash new uboot from boot console
January 16, 2017 02:17AM
shv,

Our own Wiki thread:

http://forum.doozan.com/read.php?2,23630

Quote

Booting Debian on Pogoplug

How to set up U-Boot for booting in multiple drives configuration
Backup and Restore NAND mtds
UART Booting HowTo for Selected Kirkwood Devices
Migrating from Arch to Debian?
How to boot new Debian rootfs using stock u-boot tftp
How to clone a rootfs from one Kirkwood box to another: Step 1 and Step 2

That thread main topic is Pogo V4. But the command is similar. For the rootfs mtd2 in this box:

Backup

Dump entire mtd2
nanddump --noecc --omitoob -f mtd2 /dev/mtd2

Restore

Erase entire mtd2
flash_erase /dev/mtd2 0 0
or 
flash_eraseall /dev/mtd2
and then (the default is obmitoob):
nandwrite --noecc /dev/mtd2 mtd2

Quote

Are there some commands in the serial console to deal with bad sectors and try to recover the information form such sectors?

No. And my recommendation is avoi doing this in serial console. Doing this in modern Linux is much friendlier and safer.

Quote

Do you think that the ubi file form Goflex Home fits to Goflex Net?

Yes. They are almost identical box, and have the same NAND partition scheme.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
shv
Re: How to flash new uboot from boot console
January 16, 2017 02:12PM
bodhi,

I tried backup and restore and got the same results as before:
...
[    2.320000] sdhci: Secure Digital Host Controller Interface driver
[    2.320000] sdhci: Copyright(c) Pierre Ossman
[    2.330000] usbcore: registered new interface driver usbhid
[    2.330000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[    2.340000] TCP cubic registered
[    2.340000] NET: Registered protocol family 1
[    2.350000] NET: Registered protocol family 17
[    2.350000] md: Autodetecting RAID arrays.
[    2.360000] md: autorun ...
[    2.360000] md: ... autorun DONE.
[    3.500000] Empty flash at 0x00e54e48 ends at 0x00e55000
[    7.300000] VFS: Mounted root (jffs2 filesystem) readonly.
[    7.310000] Freeing init memory: 124K
[    7.820000] JFFS2 compression type 0x07 not available.
[    7.820000] Error: jffs2_decompress returned -5
[    7.830000] JFFS2 compression type 0x07 not available.
[    7.830000] Error: jffs2_decompress returned -5
[    7.840000] JFFS2 compression type 0x07 not available.
[    7.840000] Error: jffs2_decompress returned -5
[    7.850000] JFFS2 compression type 0x07 not available.
[    7.850000] Error: jffs2_decompress returned -5
[    7.860000] JFFS2 compression type 0x07 not available.
[    7.870000] Error: jffs2_decompress returned -5
/sbin/init[    7.870000] Kernel panic - not syncing: Attempted to kill init!
: error while lo[    7.880000] Scheduling watchdog timeout to force reboot...
ading shared libraries: /usr/lib/libgcc_s.so.1: cannot read file data: Input/output error
Seams that it is still damaged.

I could try ubiformat but the file hipserv2_seagateplug-20160314.ubi is about 180 MB big. This seams to be to big for the 32MB rootfs. Can you help me out with a backup of your Goflex Home rootfs if you have the original one still in the flash?

Regards.
shv
Re: How to flash new uboot from boot console
January 17, 2017 02:11PM
shv,

Quote

[ 7.820000] JFFS2 compression type 0x07 not available.
[ 7.820000] Error: jffs2_decompress returned -5
[ 7.830000] JFFS2 compression type 0x07 not available.
[ 7.830000] Error: jffs2_decompress returned -5
[ 7.840000] JFFS2 compression type 0x07 not available.
[ 7.840000] Error: jffs2_decompress returned -5
[ 7.850000] JFFS2 compression type 0x07 not available.
[ 7.850000] Error: jffs2_decompress returned -5
[ 7.860000] JFFS2 compression type 0x07 not available.
[ 7.870000] Error: jffs2_decompress returned -5

This error is because the rootfs has been mounted and modified in a kernel that use a different compression algorithm. This usually happened when the rootfs was mounted in a modern kernel. Stock OS does not have the compression. So booting back to stock is no longer possible with this rootfs.

Let me see if I can find an oroginal backup. If not, I will have to see if I can boot back to stock and reset the password.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: How to flash new uboot from boot console
January 17, 2017 06:38PM
This Pogoplug E02 mtd2 is from one of our forum members.

Download at Dropbox

pogoplug_e02_mtd2

md5sum
2df08bb79560637d30edc5c939b17672

sha256
80b9a94af0f21c371d456715e63714004de4e5a1e7450ce4f9ad0065e6b28a3e

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
shv
Re: How to flash new uboot from boot console
January 18, 2017 06:22AM
bodhi,

in contradiction to Pogoplug devices Goflex Net or Home provide Samba share functionality. Therefore I would prefere to flash an original Goflex rootfs. It would be nice if you could read out your Goflex Home rootfs if possible. With this rootfs I could also try if the recovery from http://support.goflexhome.hipserv.com works with Goflex Net.

-shv
Re: How to flash new uboot from boot console
January 18, 2017 01:50PM
shv
Re: How to flash new uboot from boot console
January 21, 2017 08:08AM
bodhi,

I successfully recovered my GFN device after readout mtd2 image from a new virgin device. If you want I can upload the mtd2 image.

-shv
Re: How to flash new uboot from boot console
January 21, 2017 02:40PM
shv Wrote:
-------------------------------------------------------
> bodhi,
>
> I successfully recovered my GFN device after
> readout mtd2 image from a new virgin device. If
> you want I can upload the mtd2 image.
>
> -shv

Awesome! pls do. In case somebody needs it.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
shv
Re: How to flash new uboot from boot console
February 01, 2017 01:23PM
bodhi Wrote:
-------------------------------------------------------
> Awesome! pls do. In case somebody needs it.

The mtd2 image of Seagate Goflex Net can be downloaded from this Link.



Edited 3 time(s). Last edit at 02/01/2017 01:27PM by shv.
Re: How to flash new uboot from boot console
February 01, 2017 01:52PM
Re: How to flash new uboot from boot console
March 04, 2017 10:29AM
very good!!
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: