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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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
Re: Need help in restoring u-boot for Netgear Stora MS2110
July 17, 2020 12:41PM
> 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.

Hey bodhi. Ive been really busy with real life and havent had the time to check back here.
I managed to do the instructions you gave me and here are my printenv:

Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
CASset=min
MALLOC_len=1
ethprime=egiga1
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=00:50:43:00:02:02
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loidaddr=0x02000000
autoload=no
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
console=console=ttyS0,115200
mainlineLiNux=no
fw_up=disable
bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
ethaddr=C0:3F:0E:B0:E8:8A
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
hddPowerCtrl=no
loadaddr=0x02000000
enaAutoRecovery=no
ethact=egiga1

Environment size: 1257/131068 bytes


I have one question: In step 4 of the instructions i replaced the kirkwood-goflexnet.dtb with kirkwood-netgear_stora_ms2000.dtb. My issue is that I have the MS2110 model of Netgear Stora. Is there any difference ?
Re: Need help in restoring u-boot for Netgear Stora MS2110
July 17, 2020 04:02PM
stormy,

> I have one question: In step 4 of the
> instructions i replaced the
> kirkwood-goflexnet.dtb with
> kirkwood-netgear_stora_ms2000.dtb. My issue is
> that I have the MS2110 model of Netgear Stora. Is
> there any difference ?

I don't believe there is any difference regarding that DTS. AFAIK, all Stora models have been running OK with the same DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help in restoring u-boot for Netgear Stora MS2110
July 18, 2020 05:44PM
Hey bodhi. I already posted here and you probably missed it, but I will do it again. I managed to create the rootfs labeled USB flash drive with Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 29 August 2019 update. But I dont know how to make it boot on my Netgear Stora.

Here are the Stora stock uboot printenv:

Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
CASset=min
MALLOC_len=1
ethprime=egiga1
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=00:50:43:00:02:02
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loidaddr=0x02000000
autoload=no
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
console=console=ttyS0,115200
mainlineLiNux=no
fw_up=disable
bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
ethaddr=C0:3F:0E:B0:E8:8A
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
hddPowerCtrl=no
loadaddr=0x02000000
enaAutoRecovery=no
ethact=egiga1

Environment size: 1257/131068 bytes
Re: Need help in restoring u-boot for Netgear Stora MS2110
July 19, 2020 04:17PM
stormy,

Try,

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'
boot

And once you've booted into Debian, repeat a few times to make sure, and then you can come back to serial console and save them.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 18, 2020 04:13PM
Hi Stormy,

Quote

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?

A running Stora runs independantly of Netgear's terminated service, except that one must access it directly with its own local IP address and not via the unavailable redirection service at 'www.mystora.com'.

Without Netgear's service, a Stora cannot be reset to Factory defaults. Further, the creation of the first user on a Stora after it has been reset to Factory defaults also depends on Netgear's terminated service. So I agree with bodhi, installing Debian is the only viable option.

Netgear Stora MS2110 was launched in 2010 as a low cost alternative to the more rugged ReadyNAS models. With a bandwidth in the order of 20 - 30 MB/s and only 128 MB RAM, Stora does not fullfill today's performance requrements for a home NAS. If someone still use this box as NAS, the time for upgrading has long been due.

However, the long term survivel of your documents, photos and videos depends on dayly, automatic and verified remote backup of the home NAS. For this job Stora is a low cost and capable solution you may set up at your parents home, your cottage or some other trusted place with internet access. Using HDDs (rather than SSDs) is fine, since the bottleneck is anyhow likely to be the internet link. It's buyer's market now for used Storas and large HDDs, so all home NAS owners should go get one while they can.

The site OpenStora at 'www.openstora.com' used to host a wiki and a forum dedicated to Stora. It is dead, but thanks to the WayBackMachine, its useful information is still available. Send them some good thoughts, and a donation if you can afford it.

Winter is coming, and then I will try to figure out a robust way to install a recent Linux kernel and bodhi's root file system on Stora without a serial console, since the serial console part may be too technical for some owners. I don't know if it's possible, though.

Regards,
Trond Melen
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 18, 2020 04:52PM
Trond,

> Winter is coming, and then I will try to figure
> out a robust way to install a recent Linux kernel
> and bodhi's root file system on Stora without a
> serial console, since the serial console part may
> be too technical for some owners. I don't know if
> it's possible, though.

It is quite easy.

I have released new 2017.07 u-boot for the Stora a few years ago:
https://forum.doozan.com/read.php?3,12381

So you can install Debian and u-boot at the same time (in one SSH session, before reboot) inside stock OS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 19, 2020 02:51PM
Quote
bodhi
It is quite easy.

Great! Give me a few weeks, and I will verify and report here.

Btw, do you have a dts-file for Stora? Or is it so similar to Seagate Goflex Home that the dts-files are the same?

Regards,
Trond Melen



Edited 1 time(s). Last edit at 09/19/2020 03:15PM by tme.
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 19, 2020 04:40PM
Trond,

Everything is in the patch file. See the release thread.


Quote
https://forum.doozan.com/read.php?2,12096
Updated 23 Aug 2020:

Kernel linux-5.8.3-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- BFQ IO Scheduler is now the default in the kernel. This is an improvement in making the system more responsive when under memory stress (Note: use a large swap space to avoid OOM killer).
- Added ISCSI Target capability (as loadable module).
- Updated Zyxel NSA320S capabilty to bring up 3.5" HDD in 2nd slot.

Latest Linux kernel 5.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-5.8.3-kirkwood-tld-1-bodhi.tar.bz2

md5:
28bdcebbb9470474f7803187abb1edb9
sha256:
e965824719223da17d7997efc3d43fc06d8a5a0abb0a9ba74d75658bc11909a9

This tarball contains 6 files:
linux-image-5.8.3-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.8.3-kirkwood-tld-1_1.0_armel.deb
config-5.8.3-kirkwood-tld-1
zImage-5.8.3-kirkwood-tld-1
linux-dtb-5.8.3-kirkwood-tld-1.tar
linux-5.8.3-kirkwood-tld-1.patch

The Stora and GoFlex Home are 2 different boxes. So they have different DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 20, 2020 03:55AM
Thanks bodhi,

I will try to add support for Netgear ReadyNAS RN102 in the upcoming u-boot-v2020.10 release and will start working on it today. To learn how the bits and pieces fit together, I went for a lower hanging fruit yesterday, and now I have build u-boot-v2020.07 with support for Netgear MS2110 Stora. It's ready for testing on target.

The patch is attached. The substance is all yours. I pulled 'board/Marvell/netgear_ms2110/netgear_ms2110.{h,c}' and 'include/configs/netgear_ms2110.h' out of '2017.07-kirkwood-tld-1', and 'arch/arm/dts/kirkwood-netgear_stora_ms2000.dts' out of 'linux-5.8.3-kirkwood-tld-1-bodhi'. I did some very minor changes to the code until there were no more complaints from the compiler. My modifications are encapsulated inside #if 0 and #if 1 to be easily spotted.

To make the U-Boot tools happy, I had to apply the new driver model to the USB/SATA and ETH interfaces. This included fiddling with the 'CONFIG_*' parameters, but I tried to limit it to a minimum.

Verification of the build (full listing attached):
cd /tmp
wget https://gitlab.denx.de/u-boot/u-boot/-/archive/v2020.07/u-boot-v2020.07.tar.bz2
md5sum u-boot-v2020.07.tar.bz2 u-boot-v2020.07-netgear-ms2110.patch
bc871c34db5dd02a3890930c98877407  u-boot-v2020.07.tar.bz2
1e6ee817c83cbce5f166fcae0bfe57a6  u-boot-v2020.07-netgear-ms2110.patch

tar xf u-boot-v2020.07.tar.bz2
cd u-boot-v2020.07
patch -p 1 < ../u-boot-v2020.07-netgear-ms2110.patch 
make KBUILD_OUTPUT=../build distclean
make KBUILD_OUTPUT=../build netgear_ms2110_defconfig
make KBUILD_OUTPUT=../build oldconfig
time make -j $(nproc) CROSS_COMPILE=arm-linux-gnueabihf- KCFLAGS=-Werror KBUILD_OUTPUT=../build  all
real	0m18,728s
user	0m56,537s
sys	0m6,331s

$ cd ../build && ls -alF u-boot*
-rwxrwxr-x 1 tme tme 4720412 sep.  20 10:11 u-boot*
-rw-rw-r-- 1 tme tme  570251 sep.  20 10:11 u-boot.bin
-rw-rw-r-- 1 tme tme   11633 sep.  20 10:10 u-boot.cfg
-rw-rw-r-- 1 tme tme    5200 sep.  20 10:11 u-boot.cfg.configs
-rw-rw-r-- 1 tme tme   11499 sep.  20 10:11 u-boot.dtb
-rw-rw-r-- 1 tme tme  570251 sep.  20 10:11 u-boot-dtb.bin
-rw-rw-r-- 1 tme tme  570768 sep.  20 10:11 u-boot.kwb
-rw-rw-r-- 1 tme tme    1723 sep.  20 10:10 u-boot.lds
-rw-rw-r-- 1 tme tme  558890 sep.  20 10:11 u-boot.map
-rwxrwxr-x 1 tme tme  558752 sep.  20 10:11 u-boot-nodtb.bin*
-rwxrwxr-x 1 tme tme 1606530 sep.  20 10:11 u-boot.srec*
-rw-rw-r-- 1 tme tme  140638 sep.  20 10:11 u-boot.sym

$

This was a first. If you see any obvious pits I've stumbled into, I'm happy to be warned.

Regards,
Trond Melen
Attachments:
open | download - u-boot-v2020.07-netgear-ms2110.patch (29.5 KB)
open | download - u-boot-v2020.07-netgear-ms2110-build.lst (18.6 KB)
tme
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 23, 2020 01:14PM
Hi bodhi,

I want to test my u-boot-v2020.07 on a Netgear MS2110 Stora. Stock u-boot for Netgear MS2110 Stora is
U-Boot 1.1.4 (Jul 31 2009 - 10:33:00) Marvell version: 3.4.14
but U-Boot on this box was upgraded some years ago with your then current version
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:45:22 -0700)
Netgear-MS2110

To become familiar with 'kwboot' and UART booting, I tried upgrading to 'uboot.2017.07-tld-1':
md5sum ~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
1b09317e896ad928104a1edce459a9f5  /home/tme/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar

tar xvf ~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar 
uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb

kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
Sending boot message. Please reboot the target...|^C

kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
Sending boot message. Please reboot the target.../^C
but the expected output 'Sending boot image...' never appeared. I don't think it's an issue with the USB-to-serial adapter since 'picocom' worked fine both before and after I tried 'kwboot, and I did remember to exit 'pikocom' with Ctrl-A Ctrl-X before trying.

Q1: Does your U-Boot for the Kirkwood boxes support UART booting, or must I restore the original 'mtd0' partition first?

Further, when 'kwboot' is working, I must generate a kwb-file that
Quote
man kwboot
conforms to Marvell's BootROM firmware image format (kwbimage), created using a tool such as mkimage.

Q2: What are the input and options to 'mkimage' to generate such a kwm-file?

Regards,
Trond Melen
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 23, 2020 08:26PM
Trond,


-------------------------------------------------------
> Hi bodhi,
>
> I want to test my u-boot-v2020.07 on a Netgear
> MS2110 Stora. Stock u-boot for Netgear MS2110
> Stora is
>
> U-Boot 1.1.4 (Jul 31 2009 - 10:33:00) Marvell
> version: 3.4.14
>
> but U-Boot on this box was upgraded some years ago
> with your then current version
>
> U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:45:22
> -0700)
> Netgear-MS2110
>
>
> To become familiar with 'kwboot' and UART booting,
> I tried upgrading to 'uboot.2017.07-tld-1':
>
> md5sum
> ~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
> 1b09317e896ad928104a1edce459a9f5 
> /home/tme/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
> 
> tar xvf
> ~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
> 
> uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
> 
> kwboot -t -B 115200 /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
> Sending boot message. Please reboot the
> target...|^C
> 
> kwboot -t -B 115200 /dev/ttyUSB0 -b
> uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
> Sending boot message. Please reboot the
> target.../^C
>
> but the expected output 'Sending boot image...'
> never appeared. I don't think it's an issue with
> the USB-to-serial adapter since 'picocom' worked
> fine both before and after I tried 'kwboot, and I
> did remember to exit 'pikocom' with Ctrl-A Ctrl-X
> before trying.
>
> Q1: Does your U-Boot for the Kirkwood boxes
> support UART booting, or must I restore the
> original 'mtd0' partition first?

U-boot on NAND does not any thing to do with UART booting. UART booting with kwboot works even the NAND is wiped out.

Most Stora boxes have UART booting capabilty, some don't (different BooROM version).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Need help in restoring u-boot for Netgear Stora MS2110
September 24, 2020 03:43AM
Quote
bodhi
U-boot on NAND does not have anything to do with UART booting. UART booting with kwboot works even the NAND is wiped out.

Thanks!

Quote

Most Stora boxes have UART booting capabilty, some don't (different BooROM version).

This might be the reason I have not succeed with UART boot. SoC is Kirkwood 88F6281_A0. BootROM version is 1.11, and 1.12 might be required. I see that people have mixed experiences with UART boot on Netgear MS2110 Stora:

Quote
myself
Q2: What are the input and options to 'mkimage' to generate such a kwm-file?

I found the answer here.

Regards,
Trond Melen
Re: Need help in restoring u-boot for Netgear Stora MS2110
March 20, 2021 06:37PM
I just sent a PM to Stormy about getting a copy of flashware.img . Posting here also, just in case he sees one and not the other...

Also, regarding the size limitation - 1000k vs. 1024k is not a substantial difference. If you run it through gzip, bzip2, or xzip, would that reduce the size sufficiently to allow posting?
Re: Need help in restoring u-boot for Netgear Stora MS2110
March 20, 2021 06:45PM
> Also, regarding the size limitation - 1000k vs.
> 1024k is not a substantial difference. If you run
> it through gzip, bzip2, or xzip, would that reduce
> the size sufficiently to allow posting?

Sure, wrap it in Netgear_Stora-stock-flashware.img.tar.bz2

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Need help in restoring u-boot for Netgear Stora MS2110
March 20, 2021 06:51PM
Any reason tar is needed for a single file?
Either the tar command, or the .tar suffix?

I suspect you wrote that from force of habit?
Anyhow, we’ll see what happens!
Re: Need help in restoring u-boot for Netgear Stora MS2110
March 20, 2021 06:54PM
> I suspect you wrote that from force of habit?

:) The idea is there should be a README file to go with the image. It'll help to have some instruction how to use it. All images I've uploaded has tar.bz2 format even for sigle image, with the intention to add other files in the future.

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



Edited 1 time(s). Last edit at 03/20/2021 06:57PM by bodhi.
Author:

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: