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.
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: