Welcome! Log In Create A New Profile

Advanced

Netgear Stora MS2110 rootfs Bad Magic Number

Posted by Teddy 
Netgear Stora MS2110 rootfs Bad Magic Number
May 08, 2020 09:43PM
Hello
I need some help installing Debian on Stora MS2110. Not sure what I doing wrong read a few threads. I even bought a new 16Gig SanDisk (following Bodhi recommendation) just to make sure it was not the USB.

root@ubuntu-hp:/media/sdc1# df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                       1.9G     0  1.9G   0% /dev
tmpfs                      386M  1.8M  384M   1% /run
/dev/mapper/vgubuntu-root  457G  5.6G  428G   2% /
tmpfs                      1.9G   82M  1.9G   5% /dev/shm
tmpfs                      5.0M  4.0K  5.0M   1% /run/lock
tmpfs                      1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/loop3                  50M   50M     0 100% /snap/snap-store/433
/dev/loop1                  63M   63M     0 100% /snap/gtk-common-themes/1506
/dev/loop0                 241M  241M     0 100% /snap/gnome-3-34-1804/24
/dev/loop2                  55M   55M     0 100% /snap/core18/1705
/dev/loop4                  55M   55M     0 100% /snap/core18/1754
/dev/loop5                 256M  256M     0 100% /snap/gnome-3-34-1804/33
/dev/loop6                  28M   28M     0 100% /snap/snapd/7264
/dev/sda1                  511M  7.8M  504M   2% /boot/efi
tmpfs                      386M   36K  386M   1% /run/user/1000
/dev/sdc1                   15G   36M   14G   1% /media/sdc1
root@ubuntu-hp:/media/sdc1# tar -xjf /home/teddy/Downloads/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@ubuntu-hp:/media/sdc1# cd boot
root@ubuntu-hp:/media/sdc1/boot# cp -a zImage-5.2.9-kirkwood-tld-1  zImage.fdt
root@ubuntu-hp:/media/sdc1/boot# cat dts/kirkwood-netgear_stora_ms2000.dtb  >> zImage.fdt
root@ubuntu-hp:/media/sdc1/boot# mv uImage uImage.orig
root@ubuntu-hp:/media/sdc1/boot# 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
Image Name:   Linux-5.2.9-kirkwood-tld-1
Created:      Fri May  8 19:08:10 2020
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4975115 Bytes = 4858.51 KiB = 4.74 MiB
Load Address: 00008000
Entry Point:  00008000
root@ubuntu-hp:/media/sdc1/boot# sync
root@ubuntu-hp:/media/sdc1/boot# cd /
root@ubuntu-hp:/# umount /media/sdc1


       __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: RD-88F6281A LE

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: 4f0ecb6e, Calculated CRC: 4f0ecb6e

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
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: RD-88F6281A LE

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: 4f0ecb6e, Calculated CRC: 4f0ecb6e

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
Marvell>> printenv
baudrate=115200
loads_echo=0
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
mainlineLiNux=no
fw_up=disable
ethaddr=00:26:F2:DB:8E:EE
loadaddr=0x02000000
ipaddr=10.0.0.206
serverip=10.0.0.83
arcNumber=2743
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=8
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=LABEL=rootfs rootdelay=10 earlyprintk=serial; run bootcmd_usb; bootm 0x800000 0x2100000; reset
console=console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(uboot),0xff00000@0x100000(root)
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
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
enaAutoRecovery=no
ethact=egiga1

Environment size: 1526/131068 bytes
Marvell>>


Thanks in advance for your help
--Teddy

============
Moderator edit: please use Formatted Code to post log



Edited 1 time(s). Last edit at 05/08/2020 10:12PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 08, 2020 10:19PM
Teddy,

Everyhting looks good here on Ubuntu.

Quote

/dev/sdc1 15G 36M 14G 1% /media/sdc1
root@ubuntu-hp:/media/sdc1# tar -xjf /home/teddy/Downloads/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@ubuntu-hp:/media/sdc1# cd boot
root@ubuntu-hp:/media/sdc1/boot# cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
root@ubuntu-hp:/media/sdc1/boot# cat dts/kirkwood-netgear_stora_ms2000.dtb >> zImage.fdt
root@ubuntu-hp:/media/sdc1/boot# mv uImage uImage.orig
root@ubuntu-hp:/media/sdc1/boot# 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
Image Name: Linux-5.2.9-kirkwood-tld-1
Created: Fri May 8 19:08:10 2020
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4975115 Bytes = 4858.51 KiB = 4.74 MiB
Load Address: 00008000
Entry Point: 00008000
root@ubuntu-hp:/media/sdc1/boot# sync
root@ubuntu-hp:/media/sdc1/boot# cd /
root@ubuntu-hp:/# umount /media/sdc1


But the USB drive itself was not detected by u-boot.

Quote

> Hit any key to stop autoboot: 0
> (Re)start USB...
> USB: scanning bus for devices... 1 USB Device(s)
> found
> scanning bus for storage devices... 0
> Storage Device(s) found

How did you create the partition? was it Ext3?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 09, 2020 11:04AM
yes, I used ext3 below is the command I ran.

root@ubuntu-hp:/# umount /dev/sdc1
root@ubuntu-hp:/# mkfs.ext3 /dev/sdc1 -L rootfs
mke2fs 1.45.5 (07-Jan-2020)
/dev/sdc1 contains a ext3 file system labelled 'rootfs'
last mounted on /media/teddy/rootfs on Fri May 8 18:56:38 2020
Proceed anyway? (y,N) y
Creating filesystem with 3753980 4k blocks and 940240 inodes
Filesystem UUID: 1feddbd3-8159-4e05-9c55-616f06385eee
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

-Teddy
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 09, 2020 11:13AM
Is it MBR or GPT? Old uboot won't take GPT.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 09, 2020 01:08PM
I did the following command : install-mbr /dev/sdc --force
but I still getting the same result.
What should I do before running mkfs.ext3 /dev/sdc1 -L rootfs .
Is there a way to prepare the USB before that I'm missing?

Thanks
-Teddy
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 09, 2020 04:20PM
Teddy,

Use fdisk to erase and recreate partition.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 10, 2020 08:41AM
Hi,
I used fdisk and he did detect the USB and I getting this error now:


__  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: RD-88F6281A LE

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: 4f0ecb6e, Calculated CRC: 4f0ecb6e

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
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
....
.
......
............
.........................
.....
 ** ext2fs_devread() read error - block

** Unable to read "/boot/uImage" from usb 0:1 **


Marvell>> printenv
baudrate=115200
loads_echo=0
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
mainlineLiNux=no
fw_up=disable
ethaddr=00:26:F2:DB:8E:EE
loadaddr=0x02000000
ipaddr=10.0.0.206
serverip=10.0.0.83
arcNumber=2743
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=8
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=LABEL=rootfs rootdelay=10 earlyprintk=serial; run bootcmd_usb; bootm 0x800000 0x2100000; reset
console=console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(uboot),0xff00000@0x100000(root)
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
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
enaAutoRecovery=no
ethact=egiga1

Environment size: 1526/131068 bytes
Marvell>>


Thanks

--Teddy



Edited 1 time(s). Last edit at 05/10/2020 04:43PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 10, 2020 04:42PM
Teddy,

Next time you post the log, use code tag to make it readable. When you are editing the post, select the text and click on the button "Formatted code" (rightmost above the text box, the leftmost is B, for bold text).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 10, 2020 04:51PM
Teddy,

Your USB drive still has problem.
scanning bus for storage devices... 1 Storage Device(s) found
....
.
......
............
.........................
.....
 ** ext2fs_devread() read error - block

** Unable to read "/boot/uImage" from usb 0:1 **

Now the drive partition was recognized by u-boot as a storage drive. But the file system on it is bad. Post
fdisk /dev/sdc1

Or you could try using a different thumb drive and recreate the rootfs again. I'd prefer Sandisk brand (most reliable for booting).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
May 10, 2020 11:59PM
Try to destroy the old gpt or MBR completely by

dd if=/dev/zero of=/dev/sdc bs=1m count=1

Then fdisk and mkfs again.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 12, 2020 07:13AM
I am a Linux and u-boot novice trying to re-life my Netgear Stora MS2110 by loading Debian. Some time ago I tried the 2.6.3 install which went OK but was confounded by the lack of a mirror site so abandoned the exercise. Corona virus lock down has presented the opportunity to try again with the latest approach starting with 25 August 2019 Debian busterKirkwood rootfs install. I - like many others - have struggled to get my Stora to recognise any USB pen drive for this install. I have tried tftp loading every which way and was getting nowhere. Sadly - in desperation in the early hours of the morning - I innocently thought that my u-boot environments might be invalid and so I 'resetenv' thinking this would give me a clean base - but no - my Stora looks very sad. 'printenv' produces a long report of unprintable stuff. 'rcvr' seems to be able to find a tftp server on my network so I've loaded the uImage file from Debian_4.4.0-kirkwood install compilation, but this load just loops with errors.

Is my box bricked or can I somehow reload the kernel to start again? My firmware level is 1.11 so it would appear that the UART (serial) load of kwboot is not an option (needs 1.12). Any help would be very welcome.
Attachments:
open | download - TTY001.txt (11.7 KB)
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 12, 2020 05:30PM
pdc78,

The u-boot commands resetenv and saveenv must be avoided until you are really sure it is OK to use them.

Quote

> Is my box bricked or can I somehow reload the
> kernel to start again? My firmware level is 1.11
> so it would appear that the UART (serial) load of
> kwboot is not an option (needs 1.12). Any help
> would be very welcome.


It is far from bricked! When you can boot to the u-boot prompt like this, it can be fixed:
Marvell>> version
U-Boot 1.1.4 (Sep  4 2009 - 09:36:11) Marvell version: 3.4.14
Marvell>>


Quote

My firmware level is 1.11 so it would appear that the UART (serial) load of kwboot is not an option (needs 1.12). Any help would be very welcome.

The BootROM version is really not a reliable indicator whether kwboot can be used (in some Kirkwood boxes such as NSA325, the BootROM version does not show at all, but it works). You should try it to see how the box will respond.

To fix the envs problem:

1. Find the set of good stock envs somewhere. If you have an old boot log and did use printenv to capture it, or somewhere in this forum there should be such envs listing.

2. At the u-boot prompt, enter some envs using that list. Using setenv, for example to set an env named test1:

setenv test1 'This is a test'
You could post that list here and I'll suggest which envs to enter first.


3. Do printenv again to see they are listed OK. When you set some envs, u-boot will repopulate the list inmemory, hopefully it will heal the envs area in RAM that way.

Depending what happened in 3, you might need to:

4. printenv did successfully list the envs you've just entered. Then from now you can re-enter all stock envs, printenv again. And then double check a few things before you can proceed to the next step of saving ens permanently to NAND. When you get to this point, I'll show you how to do that.

5. printenv did not successfully list the envs you've just entered. In this case I need to see the behavior u-boot showing while you doing the setenv.

6. Last resort when all attempts to fix the envs have failed: You need to find a backup of NAND mtd0 that someone has saved. This backup was created using nanddump command in Linux.

====

But try UART booting with kwboot first, it might work.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/12/2020 05:33PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 12, 2020 06:19PM
Dear Bodhi

Thanks for responding with encouraging news. I have tried running the kwboot (from within u-boot-tools - the exe in the .tar appears to be a 32 bit version). I got the expected prompt from my Linux shell 'Sending boot message. Please reboot the target...|', but resetting or cold starting the Stora made no change. Back to 'environment overflow' and 'Bad Magic Number' :

MAC: 00:01:64:1B:82:B7, IP: 10.27.130.183
## 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


I've also tried to setenv, but am stuck with environment overflow. I guess this is because there is 1 byte too much "Environment size: 131069/131068 bytes" Is there a way to wipe the environment and reload from stock?

Marvell>> setenv test1 'This is a test'
## Error: environment overflow, "test1" deleted

Would the envs from Teddy's initial posting in this topic be suitable? "baudrate=115200
loads_echo=0
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
mainlineLiNux=no
fw_up=disable
ethaddr=00:26:F2:DB:8E:EE
loadaddr=0x02000000
ipaddr=10.0.0.206
serverip=10.0.0.83
arcNumber=2743
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=8
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=LABEL=rootfs rootdelay=10 earlyprintk=serial; run bootcmd_usb; bootm 0x800000 0x2100000; reset
console=console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(uboot),0xff00000@0x100000(root)
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
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
enaAutoRecovery=no
ethact=egiga1"

====
moderator edit: use code tag to post log.



Edited 1 time(s). Last edit at 06/13/2020 04:12PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 12, 2020 08:04PM
pdc78,

> 32 bit version). I got the expected prompt from
> my Linux shell 'Sending boot message. Please
> reboot the target...|',

Usually at this point, you should Control-C, and recall the command and execute it again immediately. Do this as many times as you can bear to do it.

And also try different timing sequences:

- Execute kwboot, then power up. Repeat the commands multiple times.
- Prepare kwboot command, but not executing yet. Power up, and quickly execute kwboot command simultaneously or a fraction of a second after.
- Prepare kwboot command, but not executing yet. Power up, and quickly execute kwboot command after 1 second.

You got the idea. Sometime the handshake occurs slow or quick. But always within some window (nobody knows how long this time interval is for some BootROM versions).


> Back to
> 'environment overflow' and 'Bad Magic Number' :

> environment overflow. I guess this is because
> there is 1 byte too much "Environment size:
> 131069/131068 bytes"
>
> Marvell>> setenv test1 'This is a test'
> ## Error: environment overflow, "test1" deleted

This is not good. It has eliminated a lot of options.


> Would the envs from Teddy's initial posting in
> this topic be suitable?

That looks good enough.

> Is there a way to wipe the
> environment and reload from stock?

The problem is: wiping NAND envs requires a few good envs in memory to determine the NAND layout! it is kind of chicken and egg dilema.

Now without being able to run kwboot to load new u-boot image, anything we try from this point has some risk of bricking the box for good. And then JTAG is the only way to unbrick after that.

We cannot risk running any command that could erroneously wipe the u-boot image on mtd0. Without kwboot, it is too risky to run anything that try to write to NAND, while the envs are not defined properly.

So the various methods will need to be tried without brute force (there is a last resort approach, but we will avoid it for now).

======

Let's get some info. Power up, interrupt serial console and

help
ver

If you see some commands in the help output like: usb, ide, scsi, then try

usb reset
ide reset
scsi reset

PLease post the entire serial console log here everything on the terminal from after you power up. The first line should be the u-boot banner.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 02:47AM
Thanks Bodhi. I'll keep trying over the weekend. Tried kwboot every which way with no success. I assume that if it 'fires' then the console display should pick up in my linux shell? Here is the console log you requested:


__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: RD-88F6281A LE

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: 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
## Error: environment overflow, "enaDCPref" deleted
## Error: environment overflow, "sata_dma_mode" deleted
## Error: environment overflow, "MALLOC_len" deleted
## Error: environment overflow, "ethprime" deleted
## Error: environment overflow, "netbsd_en" deleted
## Error: environment overflow, "vxworks_en" deleted
## Error: environment overflow, "bootargs_root" deleted
## Error: environment overflow, "bootargs_end" deleted
## Error: environment overflow, "image_name" deleted
## Error: environment overflow, "bootcmd" deleted
## Error: environment overflow, "standalone" deleted
## Error: environment overflow, "bootdelay" deleted
## Error: environment overflow, "disaMvPnp" deleted
## Error: environment overflow, "disaMvPnp" deleted
## Error: environment overflow, "ethaddr" deleted
## Error: environment overflow, "ethmtu" deleted
## Error: environment overflow, "eth1addr" deleted
## Error: environment overflow, "eth1mtu" deleted
## Error: environment overflow, "mvPhoneConfig" deleted
## Error: environment overflow, "mvNetConfig" deleted
## Error: environment overflow, "usb0Mode" deleted
## Error: environment overflow, "yuk_ethaddr" deleted
## Error: environment overflow, "nandEcc" deleted
## Error: environment overflow, "hddPowerCtrl" deleted
## Error: environment overflow, "netretry" deleted
## Error: environment overflow, "rcvrip" deleted
## Error: environment overflow, "loadaddr" deleted
## Error: environment overflow, "autoload" deleted
## Error: environment overflow, "enaAutoRecovery" deleted

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

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

** Unable to read "/flashware.img" from usb 0:1 **
Couldn't load recovery image from USB flash drive, Trying network interface
Aquiring an IP address using DHCP...
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
Failed to retreive an IP address assuming default (<NULL>)!
Starting the Recovery process to retreive the file...
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
Failed
Power Button is pressed!
MPP Sel: 00000530, Data IN Enable: 00020058, Data In Polarity: 00000040, Data In: 00000011
Power Button is released!
MAC: 00:01:0F:BC:44:27, IP: 10.188.68.39
## 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>> ver

U-Boot 1.1.4 (Sep 4 2009 - 09:36:11) Marvell version: 3.4.14
Marvell>> usb reset
(Re)start USB...
USB: scanning bus for devices... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
Marvell>> ide reset

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found

Marvell>> scsi reset
Unknown command 'scsi' - try 'help'
Marvell>>

[/color=blue]
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 11:56AM
Hi Bodhi

Please can I clarify the kwboot approach? I have one TTL serial converter (Arduino Uno) connected to the Stora 4-pin header. Ihave been using this with a Putty window since starting tinkering with the Stora some time ago. It appears that the kwboot UART booting is using this same serial connection - i.e. sending a stream to the same channel? My Minicom Terminal monitor gets quite excited (glows red) when the kwboot command is active. See log:
Quote

Unknown command 'DUfw»"3DUfw»»»»Ufw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"' - try 'help'
Marvell>> reset

__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: RD-88F6281A LE

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: 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
ment overflow, "enaDCPref" deleted
## Error: environment overflow, "sata_dma_mode" deleted
## Error: environment overflow, "MALLOC_len" deleted
thprime" deleted
## Error: environment overflow, "netbsd_en" deleted
## Error: environment overflow, "vxworks_en" deleted
environment overflow, "bootargs_root" deleted
## Error: environment overflow, "bootargs_end" deleted
## Error: environment overflow, "image_name" deleted
## Error: environment overflow, "bootcmd" deleted
## Error: environment overflow, "standalone" deleted
## Error: environment overflow, "bootdelay" deleted
eted
## Error: environment overflow, "disaMvPnp" deleted
## Error: environment overflow, "ethaddr" deleted
overflow, "ethmtu" deleted
## Error: environment overflow, "eth1addr" deleted
## Error: environment overflow, "eth1mtu" deleted
## Error: environment overflow, "mvPhoneConfig" deleted
## Error: environment overflow, "mvNetConfig" deleted
## Error: environment overflow, "usb0Mode" deleted
## Error: environment overflow, "yuk_ethaddr" deleted
## Error: environment overflow, "nandEcc" deleted
## Error: environment overflow, "hddPowerCtrl" deleted
## Error: environment overflow, "netretry" deleted
## Error: environment overflow, "rcvrip" deleted
## Error: environment overflow, "loadaddr" deleted
## Error: environment overflow, "autoload" deleted
## Error: environment overflow, "enaAutoRecovery" deleted

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

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... 1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
Aquiring an IP address using DHCP...
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
Failed to retreive an IStarting the Recovery process to retreive the file...
## Error: environment overflow, "ethact" deleted
*** ERROR: `ethaddr' not set
## Error: environment overflow, "ethact" deleted
egiga1 no link
## Error: environment overflow, "ethact" deleted
Failed
Power Button is pressed!
MPP Sel: 00000530, Data IN Enable: 00020058, Data In Polarity: 00000040, Data In: 00000011
Power Button is released!
MAC: 00:01:01:E3:6D:52, IP: 10.227.109.82
## 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>> DUfw»"3DUfw»»»U»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DU
Unknown command 'DUfw»"3DUfw»»»U»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DUfw»"3DU' - try 'help'
Marvell>> ver

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

None-the-less I have persisted the experiment countless times - sometimes I can recover the Marvel prompt when <ctrl>C the kwboot - sometimes I have to pull the plug on the Stora and cold start again.

What next? Regards, Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 03:50PM
pdc78,

Yes, kwboot has a terminal mode when you execute it (option -t). So when it failed to handshake, sometime the BootROM timed out and execute u-boot image in NAND. The stream of 3DUfw is normal when kwboot still trying to handshake and NAND u-boot is already running.

Please post the log how you run kwboot, and with which u-boot image. Did it look like this?

kwboot  -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb  -p

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 04:06PM
Here is a big hint.

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 

** Unable to read "/flashware.img" from usb 0:1 ** 
Couldn't load recovery image from USB flash drive, Trying network interface 
Aquiring an IP address using DHCP... 
## Error: environment overflow, "ethact" deleted

That flash.img is the stock recovery image. Looks like this u-boot tried to look for the image to repopulate NAND. And it has initialized the USB drive successfully, and it expects to find an Ext2 partition on the USB drive. That flashware.img file is at the root folder (/flashware.img").

=================

OK. So at this point if kwboot refuse to work, there are 2 way to recover. The 1st method is very safe, and non-destructive. The 2nd has some risk.

1. Find the recovery image /flashware.img from Netgear website, or ask other users in this forum to upload it here if they have it.

2. Go ahead with the brute force approach (if flashware.img cannot be found). Basically we will erase the envs area in NAND, and thus forcing u-boot to ignore it. And then repopulate the envs correctly by entering some envs to fix it checksum.

Method 2 require us to find out where the stock envs area is in NAND. This can be found in stock serial boot log, or from some users who can log into stock OS.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/13/2020 04:08PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 05:19PM
Dear Teddy

Bodhi has been helping me with my distressed Netgear Stora which has corrupted environments / Bad magic Number. He advises that I need a friendly Stora owner to send me the recovery image /flashware.img. Do you have it please? Please could you share it with me?

Thanks, Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 05:44PM
Hi Bodhi

This is how I have been running kwboot:
Quote

kwboot -t -B 115200 /dev/ttyACM0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p

I have been attempting to monitor the same port through a Minicom VT102 terminal emulator. It sounds as if this is not necessary if the kwboot program functions as terminal if it connects.

I've asked recently active Stora owners if they can help with the /flashware.img file.

Thanks and regards

Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 06:17PM
Paul,

Try this quick test. At u-boot prompt:

setenv ethaddr
setenv ipaddr
setenv serverip
printenv

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/13/2020 06:18PM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 06:28PM
Paul, you might want to PM them. Some people only visit the forum only once in a while. So they will see the email notification for PM.

Or you can list their posts here, I'll send them PM in one group.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 06:32PM
Hi Bodhi

Here is the log (no change)
Quote

Marvell>> setenv ethaddr
Marvell>> setenv ipaddr
Marvell>> setenv serverip
Marvell>> printenv
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒[[ . . .very long ..>]▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

Environment size: 131069/131068 bytes
Marvell>>

Regards

Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 06:34PM
Yep - I realised my mistake and have already PM'd them - thanks - I'm a newbie - Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 07:01PM
Paul,

I think you might find the Firmware at Netgear website.

https://community.netgear.com/t5/Stora-Legacy/bd-p/stora

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 07:42PM
Hi Bodhi

I've been searching the Netgear website and have no luck in find the flashware.img file to download. Did you find it somewhere?

Regards

Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 13, 2020 09:33PM
Paul,

No I did not. But seeing users mentioned about downloading FW Zip file for other boxes, I thought there might be others who did for the Stora.

Too bad NAS Central was defunct. There must be some posts or Wiki pages there that can point you to a Zip file location to download. I am wondering if you can find it in The Way Back Machine.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 14, 2020 08:46AM
Bodhi - thanks for your suggestions. Waybackmachine did not provide a solution and, despite many hours of searching, I've drawn blanks on any net sources for the flashware.img file. I just hope that Erik, Teddy or Martin can come up trumps. I suppose I should wait for a few days.

I'll keep trying the kwboot routine, but no 'strikes' yet.

Regards, Paul
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 14, 2020 05:20PM
Paul,

Here is the mtd0 backup (attached to Erik's post): u-boot_mtd0.gz

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

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/15/2020 04:59AM by bodhi.
Re: Netgear Stora MS2110 rootfs Bad Magic Number
June 14, 2020 05:35PM
Paul,

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



Edited 2 time(s). Last edit at 06/15/2020 04:59AM 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: