Welcome! Log In Create A New Profile

Advanced

Need help in restoring u-boot for Netgear Stora MS2110

Posted by stormy 
Need help in restoring u-boot for Netgear Stora MS2110
June 20, 2020 09:53AM
Hello guys. Could you please help me with some issues I have with a Netgear Stora MS2110?
This thing was bricked when I got it. I tried to revive it but the official recovery server is history(very bad and disrespectful move if you ask me).
So I started to look for ways to unbrick it and I found this forum. I started to play around with uboot and I have a serial connection established. In my "infinite" wisdom I did a resetenv and now this thing is out of control.

This is what happens when I power up the device:

CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 64MB
DRAM CS[1] base 0x04000000 size 64MB
DRAM Total size 128MB 16bit width
Flash: 0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
CRC in Flash: ffffffff, Calculated CRC: 619d86db
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
## Error: environment overflow, "stdin" deleted
## Error: environment overflow, "stdout" deleted
## Error: environment overflow, "stderr" deleted

CPU : Marvell Feroceon (Rev 1)
## Error: environment overflow, "console" deleted
## Error: environment overflow, "mainlineLinux" deleted
## Error: environment overflow, "CASset" deleted
## Error: environment overflow, "enaMonExt" deleted
## Error: environment overflow, "enaCpuStream" deleted
## Error: environment overflow, "enaWrAllo" deleted
## Error: environment overflow, "pexMode" deleted
## Error: environment overflow, "disL2Cache" deleted
## Error: environment overflow, "setL2CacheWT" deleted
## Error: environment overflow, "disL2Prefetch" deleted
## Error: environment overflow, "enaICPref" deleted


And goes on and on and on with these "environment overflow" errors and finaly I get the Marvell prompt.

I did manage to save a backup of my previous default environments but when i try to setenv for example:
setenv serveripaddr 192.168.0.1
I get ## Error: environment overflow, "serveripaddr" deleted

Any setenv command returns these "environment overflow" errors.

I do have a flashware.img on hand but again its having trouble with it and I get these errors.

USB 0: device mode
PEX 0: interface detected no Link.
Net: ## Error: environment overflow, "ethact" deleted
egiga0, egiga1## Error: environment overflow, "ethact" deleted

USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Trying to load image from USB flash drive using FAT FS
reading /flashware.img

** Unable to read "/flashware.img" from usb 0:1 **
Trying to load image from USB flash drive using ext2 FS partition 0
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:0 **
Trying to load image from USB flash drive using ext2 FS partition 1
....
.................................................................................................

1048576 bytes read
## Error: environment overflow, "filesize" deleted
Missing loadaddr environment variable assuming default (0x400000)!
Update bootcmd
## Error: environment overflow, "bootcmd" deleted
## Error: environment overflow, "console" deleted
Erasing Nand...Writing to Nand... done

bootcmd: setenv bootargs $(console) root=/dev/ram0 rootfstype=squashfs initrd=0x600000,0xffd00000 ramdisk_size=-3072 recovery=usb serverip=0.0.0.0; bootm 0x400000;
## Error: environment overflow, "bootcmd" deleted
Booting the image (@ 0x400000)...
Power Button is pressed!
MPP Sel: 00000530, Data IN Enable: 00020058, Data In Polarity: 00000040, Data In: 00000801
Power Button is released!
MAC: 00:01:4B:C3:DA:75, IP: 10.195.218.117
## Error: environment overflow, "ethaddr" deleted
## Error: environment overflow, "ipaddr" deleted
## Error: environment overflow, "serverip" deleted
## Error: environment overflow, "netmask" deleted
## Error: environment overflow, "image_name" deleted
## Error: environment overflow, "console" deleted
## Error: environment overflow, "bootargs_root" deleted
## Error: environment overflow, "rootpath" deleted
## Error: environment overflow, "ethact" deleted
*** ERROR: `serverip' not set
## Error: environment overflow, "bootargs" deleted
## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

Another weird thing is when i type printenv i get loads of blank screens and at the end
Environment size: 131069/131068 bytes
Marvell>>
The first size is bigger then the second which indicates to me some sort of corrupted data.

So if anyone has had this type of troubles please help me fix it. Im sorry for my bad spelling, english is not my language.
Thanks
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 20, 2020 04:22PM
stormy,

You have the same problem as Paul does.

https://forum.doozan.com/read.php?2,102054,104954#msg-104954

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 21, 2020 05:29AM
bodhi Wrote:
-------------------------------------------------------
> stormy,
>
> You have the same problem as Paul does.
>
> https://forum.doozan.com/read.php?2,102054,104954#msg-104954


While fundamentaly we have the same problem, if you carefully look at the usb recovery from flashware.img messages are pretty diferent

Paul's logs look like this:


USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Trying to load image from USB flash drive using FAT FS
reading /flashware.img

** Unable to read "/flashware.img" from usb 0:1 **
Trying to load image from USB flash drive using ext2 FS partition 0
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:0 **
Trying to load image from USB flash drive using ext2 FS partition 1
....
.
...................
.........................
..........................T ..
** ext2fs_devread() read error - block

** Unable to read "/flashware.img" from usb 0:1 **
Couldn't load recovery image from USB flash drive, Trying network interface



And my logs look like this:

USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
Trying to load image from USB flash drive using FAT FS
reading /flashware.img

** Unable to read "/flashware.img" from usb 0:1 **
Trying to load image from USB flash drive using ext2 FS partition 0
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:0 **
Trying to load image from USB flash drive using ext2 FS partition 1
....
.................................................................................................

1048576 bytes read
## Error: environment overflow, "filesize" deleted
Missing loadaddr environment variable assuming default (0x400000)!
Update bootcmd
## Error: environment overflow, "bootcmd" deleted
## Error: environment overflow, "console" deleted
Erasing Nand...Writing to Nand... done

Anyway... the fundamental problem is the same. These damn environment overflow errors.
I suspect is a hardware issue... flash memory gone bad.
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 21, 2020 03:56PM
stormy,

Quote

Trying to load image from USB flash drive using ext2 FS partition 1
....
.................................................................................................

1048576 bytes read
## Error: environment overflow, "filesize" deleted

Indeed, you got further than Paul in this boot. But still the recovery was not successful. Let post me think about this a bit.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 21, 2020 04:36PM
stormy,

> Erasing Nand...Writing to Nand... done

After this, you did reboot and still see the same error?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 21, 2020 05:08PM
bodhi Wrote:
-------------------------------------------------------
> stormy,
>
> > Erasing Nand...Writing to Nand... done
>
> After this, you did reboot and still see the same
> error?

Yes. Every time it does this. Even though I cant set any environment variables with setenv command, I can issue regular commands without errors if the commands do not depend on envirnoment variables. For example I have a factory u-boot.bin rom and tried the bubt command and i get this error:

Marvell>> bubt u-boot.bin
## Error: environment overflow, "ethact" deleted
*** ERROR: `serverip' not set
Marvell>>

But for example if I try to list the contents of the usb flash everything works fine:

Marvell>> ext2ls usb 0:1
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 4096 lost+found
470736 u-boot.bin
Marvell>>
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 21, 2020 05:30PM
stormy,

> But for example if I try to list the contents of
> the usb flash everything works fine:
>
> Marvell>> ext2ls usb 0:1
> <DIR> 4096 .
> <DIR> 4096 ..
> <DIR> 4096 lost+found
> 470736 u-boot.bin
> Marvell>>

Very good! you are in better shape than Paul.

You can try this (as I asked Paul to try in this post: https://forum.doozan.com/read.php?2,102054,104604#msg-104604). The mtd0 backup is attched in this post:

https://forum.doozan.com/read.php?3,33178,33184#msg-33184


Quote

Chainload u-boot using mtd0 backup.

1. Use a USB thumb drive formatted as Ext3. Put the mtd0 file on the root folder:

/u-boot_mtd0

2. Attach the USB drive to the box. Power up, interrupt serial console, and

usb reset
ext2load usb 0:1 0x800000 /u-boot_mtd0
go 0x800200


And see if it starts OK. Then try

ver
printenv


Please post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 22, 2020 03:50PM
Hey bodhi. Sorry ive been busy with work and didnt have time to reply. Here is what ive tried: I followed the instructions for uboot recovery with flashware.img like in that post, but encountered some problems and didnt continue. Here are my problems:

When verifying CRC32 for u-boot.mtd0 on my PC and the flashware.img loaded in nand of stora I had diferrent results
(I renamed u-boot.mtd0 to flashware.img and loaded it on the usb ext2 formated disk)

C:\Users\DELLSTATION\Desktop\stora>crc32.exe u-boot.mtd0
0xEC37629D (1,048,576)

and when flashware.img loaded in stora nand, i got a different number than in my desktop version of u-boot.mtd0


Marvell>> crc32 0x0 0x100000
CRC32 for 00000000 ... 000fffff ==> f8cb1075
Marvell>>

EC37629D versus f8cb1075
So clearly its a problem here and I did not continued.

I also have some bad nand blocks:
Marvell>> nand bad

Device 0 bad blocks:
06de0000
09280000
0cd60000
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 22, 2020 05:41PM
stormy,

> When verifying CRC32 for u-boot.mtd0 on my PC and
> the flashware.img loaded in nand of stora I had
> diferrent results

Of course, the CRC calculation is not the same between the PC and this box. So you cannot compare them. To calculate this CRC outside u-boot, you need to actually log into stock OS.

> I also have some bad nand blocks:
> Marvell>> nand bad
>
> Device 0 bad blocks:
> 06de0000
> 09280000
> 0cd60000

These bad blocks are OK. Far from mtd0 (the 1st MB).

Please see my new post:

https://forum.doozan.com/read.php?2,102054,105139#msg-105139

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 23, 2020 04:01PM
Hey bodhi.
First of all thanks for your help. I managed to recover the Netgear Stora MS2110 to stock u-boot.
Here is what I did:

-create USB flash drive with ext2 filesystem and a single primary partition(I used easeus partition master 14 which by default makes the USB partition logical and uboot cannot see it - so be carefull to make the usb partition primary)

-copy flashware.img in root directory of usb drive

-attach usb drive to Netgear Stora

-power on Stora

-leave the corrupted u-boot to do his thing untill I got this message

## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

-run this command at the Marvell>> prompt

nand erase 0xA0000 0x60000

-then run:
nand write 0xA0000 0xA0000 0x60000

-then run:
reset

All is back to normal I think. No more environment overflow errors. Now I can print and save u-boot environments!


Some background explanations.

A couple of years ago somebody gave me this Stora with the OS already bricked, so in my attempt to do a recovery(the official way wasnt working- servers were already dead) I managed to f**k up u-boot for the first time. After the first mistake I followed some instructions on the (then alive) openstora forum and got u-boot back in business.

Those instructions are in this post https://forum.doozan.com/read.php?3,33178,33184#msg-33184

I got a flashback memory and I remembered that the instructions in this post helped me restore u-boot to factory settings.
Thats why I didnt follow to the letter your instructions in Paul's thread: nand erase 0x000A0000 0x20000.

Funny thing is that my real name is Peter. Peter and Paul have u-boot problems :)
Again thank you for your instructions and time dedicated to us.


Now I have a couple of questions for you and maybe you could shed some light.

1) I still get some crc errors at boot

U-Boot 1.1.4 (Sep 4 2009 - 09:36:11) Marvell version: 3.4.14

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE60

Soc: 88F6281 A0 (DDR2)
CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 64MB
DRAM CS[1] base 0x04000000 size 64MB
DRAM Total size 128MB 16bit width
Flash: 0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
CRC in Flash: 52235cfe, Calculated CRC: d2e69e2b
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0, egiga1 [PRIME]
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x3ff800 -- 100% complete.
3145728 bytes read: OK
## Booting image at 00800000 ...


Do you have any idea whats going on? Is it the bricked Stora OS? Cuz it still doesnt work...


2)As I stated above the Stora OS still doesnt work (I can post the whole log but didnt want to clog this thread with hundreds of lines). Here are the final lines of the booting process.

Reset button not pressed
Proceeding normally.
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 239857664 bytes (234236 KiB, 228 MiB, 1889 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: 4 (latest is 4)
UBIFS: default compressor: zlib
UBIFS: reserved for root: 0 bytes (0 KiB)
INIT: version 2.86 booting
Welcome to HipServ
Press 'I' to enter interactive startup.
System clock set to hardware clock.
Setting clock : Tue Jun 23 21:26:25 UTC 2020 [ OK ]
Starting udev: [ OK ]
Setting hostname axentraserver.localdomain: [ OK ]
Setting up Logical Volume Management: No volume groups found
[ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
Mounting local filesystems: mount: sysfs already mounted or /sys busy
mount: according to mtab, /sys is already mounted on /sys
[FAILED]
Enabling /etc/fstab swaps: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
HipServ startup:Alarm cleared.
[FAILED]
Starting netgear-lifecycle:[ OK ]
Starting reset: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
INIT: Sending processes the TERM signal
[ OK ] netgear-lifecycle:[ OK ]
HipServ shutdown:[ OK ]
[ OK ] killall: Stopping netgear-lifecycle:[FAILED]
[ OK ]
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Saving random seed:
Syncing hardware clock to system time Hardware clock set to system clock.

Halting system...
System halted.


I do have some recovery files that I got from a great guy on the official netgear forums(maybe you are the same guy). But I dont remember what to do with them. I have some memories that it requires to setup a virtualbox machine to impersonate the hipserv axentra servers and change some ip address in u-boot and tftp boot (or other command) to that virtual machine, but i dont know how and what to do exactly.
Maybe you could help me with this chapter in my "Netgear Stora Recovery Saga".

Here is the list of files I have for the recovery of Stora OS:

-hipserv2_netgear-20111019.ubi
-recovery_script (no file extension)
-recovery_script.txt
-recoveryfullfs(recoveryfullfs.tar.gz).ubi

3) Is it worth it to try to recover the Stora OS? Because a few days ago I read somewhere that in order to get Stora to work it requires some activation on the Netgear servers and the servers dont work anymore. So basically we are stuck with a semi-bricked NAS. What do you recommend?
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 23, 2020 04:37PM
Peter,

Congrats!

Quote

Funny thing is that my real name is Peter. Peter and Paul have u-boot problems :)

Now we need Mary to complete the trio :))

Quote

Again thank you for your instructions and time dedicated to us.

Glad you found that instruction. I've been exhausting non-destructive tests so not to brick your boxes. But if someone already done the recovery with flashware.img properly, then that give us the confidence in flashing NAND directly.


Quote

3) Is it worth it to try to recover the Stora OS? Because a few days ago I read somewhere that in order to get Stora to work it requires some activation on the Netgear servers and the servers dont work anymore. So basically we are stuck with a semi-bricked NAS. What do you recommend?

Don't bother. What you should do is to try booting into the Debian rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2. And then you could install new u-boot.

========

Create this rootf on USB, and remember to do Step 4:


Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf


And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

1. Format a new USB drive with a single Ext3 partition, and label it rootfs.

2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1
tar -xjf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

If your Linux box does not have mkimage, then install it

apt-get install u-boot-tools

5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

And then post the envs from u-boot prompt:

printenv

I will come back and show you how to adjust the envs to boot this USB rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 23, 2020 04:53PM
> I will come back and show you how to adjust the
> envs to boot this USB rootfs.

Thank you very much bodhi. Im not familiar with many of the terminologies in those instructions but ill try to follow and if i get choked i will ask you for some air. See you tomorrow.

Hope Paul gets his s*it box back together too following those steps that i made.
Also do you know whats up with those crc errors at the begging of the booting process? Are they normal?

CRC in Flash: 52235cfe, Calculated CRC: d2e69e2b
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++Checksum Error!++++++++++++++++++++++++++++++
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 23, 2020 07:23PM
stormy,

> Also do you know whats up with those crc errors at
> the begging of the booting process? Are they
> normal?
>
> CRC in Flash: 52235cfe, Calculated CRC: d2e69e2b

They are "normal" when the envs in NAND area was checksumed by u-boot when it started, and it doesn't match with the CRC stored in NAND before. So the default internal envs inside u-boot will be used. And the envs in NAND will be ignored.

To correct it, either:

- Install new u-boot and its associated envs image: https://forum.doozan.com/read.php?3,12381

- [Don't do this yet] Do a saveenv at u-boot prompt to make u-boot recalculate the CRC, thus it will be stored as a new checksum. But don't try this saveenv, unless you know that it is OK. The problem you and Paul have encountered most likely because there is a bug in u-boot. With that in mind, I would not try to correct the checksum. Just use whatever comes out of printenv, and adjust them, to boot the Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Need help in restoring u-boot for Netgear Stora MS2110
June 23, 2020 09:31PM
Dear Stormy

You are a star! Thanks for your help. My Stora is now rebooting OK. I'm just trying to work through the Debian-5.2.9 install.

Best regards, Paul
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: