Welcome! Log In Create A New Profile

Advanced

NETGEAR STORA - Bad Magic Number

Posted by dirkpitt74 
Re: NETGEAR STORA - Bad Magic Number
February 08, 2019 06:07PM
I think it is most likely you will find the chip marking as MLC.

Try in u-boot to see what's the info as seen by u-boot

nand info
mtdparts

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



Edited 1 time(s). Last edit at 02/08/2019 06:39PM by bodhi.
Re: NETGEAR STORA - Bad Magic Number
February 10, 2019 09:27AM
Hi Bodhi,
I've changed the env as you suggested, but the NAND still read only mode.
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
Netgear Stora> setenv mtdparts 'mtdparts=orion_nand:1M(uboot),-(rootfs)'
Netgear Stora> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: not available  Bus 1: OK 
  Device 1: Model: SAMSUNG HD501LJ  Firm: CR100-12 Ser#: S0MUJ1EQ221814
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30029824        2384b32d-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

Partition Map for IDE device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            976766976       28f7eead-01     07
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3821592 bytes read in 837 ms (4.4 MiB/s)
loading uInitrd ...
7245696 bytes read in 831 ms (8.3 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11869 bytes read in 2614 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 03917000, end 03ffff40 ... OK
   Loading Device Tree to 03911000, end 03916e5c ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 207
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: NETGEAR MS2000 / MS2110 aka Stora
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(uboot),-(rootfs)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 109420K/131072K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 21652K reserved, 0K cma-re)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000010] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000052] Switching to timer-based delay loop, resolution 5ns
[    0.000619] Console: colour dummy device 80x30
[    0.000660] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000687] pid_max: default: 32768 minimum: 301
[    0.000924] Security Framework initialized
[    0.001073] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001096] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002132] CPU: Testing write buffer coherency: ok
[    0.003361] Setting up static identity map for 0x100000 - 0x100058
[    0.003687] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.007651] devtmpfs: initialized
[    0.012970] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013004] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.013478] prandom: seed boundary self test passed
[    0.017986] prandom: 100 self tests passed
[    0.018001] pinctrl core: initialized pinctrl subsystem
[    0.019387] NET: Registered protocol family 16
[    0.019948] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.021979] cpuidle: using governor ladder
[    0.022062] cpuidle: using governor menu
[    0.022585] Feroceon L2: Enabling L2
[    0.022642] Feroceon L2: Cache support initialised.
[    0.023075] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.029180] No ATAGs?
[    0.040413] vgaarb: loaded
[    0.040808] SCSI subsystem initialized
[    0.041376] usbcore: registered new interface driver usbfs
[    0.041470] usbcore: registered new interface driver hub
[    0.041575] usbcore: registered new device driver usb
[    0.042927] clocksource: Switched to clocksource orion_clocksource
[    0.150604] VFS: Disk quotas dquot_6.6.0
[    0.150698] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.163480] NET: Registered protocol family 2
[    0.164356] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.164387] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.164412] TCP: Hash tables configured (established 1024 bind 1024)
[    0.164518] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.164547] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.164758] NET: Registered protocol family 1
[    0.165257] RPC: Registered named UNIX socket transport module.
[    0.165272] RPC: Registered udp transport module.
[    0.165281] RPC: Registered tcp transport module.
[    0.165289] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.165570] Unpacking initramfs...
[    0.958606] Freeing initrd memory: 7076K
[    0.958771] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.959923] audit: initializing netlink subsys (disabled)
[    0.960515] Initialise system trusted keyrings
[    0.960573] Key type blacklist registered
[    0.960683] audit: type=2000 audit(0.957:1): state=initialized audit_enabled=0 res=1
[    0.960793] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.960879] zbud: loaded
[    0.962054] NFS: Registering the id_resolver key type
[    0.962090] Key type id_resolver registered
[    0.962100] Key type id_legacy registered
[    0.962122] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.962134] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.962371] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.962606] fuse init (API version 7.26)
[    0.963136] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.963438] orangefs_init: module version upstream loaded
[    0.963452] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.552936] random: fast init done
[    8.015658] Key type asymmetric registered
[    8.015679] Asymmetric key parser 'x509' registered
[    8.015758] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    8.015772] io scheduler noop registered
[    8.015782] io scheduler deadline registered
[    8.015881] io scheduler cfq registered (default)
[    8.017374] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    8.019656] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    8.019682] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    8.019698] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    8.019714] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.020111] PCI: bus0: Fast back to back transfers disabled
[    8.020140] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    8.020333] PCI: bus1: Fast back to back transfers enabled
[    8.020423] pci 0000:00:01.0: PCI bridge to [bus 01]
[    8.021074] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.083980] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    8.084241] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.143845] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    8.144363] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.145947] console [ttyS0] disabled
[    8.146025] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    8.796417] console [ttyS0] enabled
[    8.810204] loop: module loaded
[    8.814124] sata_mv f1080000.sata: slots 32 ports 2
[    8.822375] scsi host0: sata_mv
[    8.826126] scsi host1: sata_mv
[    8.829565] ata1: SATA max UDMA/133 irq 33
[    8.833742] ata2: SATA max UDMA/133 irq 33
[    8.838751] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
[    8.845262] nand: Samsung NAND 256MiB 3,3V 8-bit
[    8.849904] nand: 256 MiB, MLC, erase size: 4096 KiB, page size: 4096, OOB size: 128
[    8.857715] nand: WARNING: f4000000.nand: the ECC used on your system is too weak compared to the one required by the NAND chip
[    8.869267] Scanning device for bad blocks
[    8.877558] 2 cmdlinepart partitions found on MTD device orion_nand
[    8.883884] Creating 2 MTD partitions on "orion_nand":
[    8.889061] 0x000000000000-0x000000100000 : "uboot"
[    8.893989] mtd: partition "uboot" doesn't end on an erase block -- force read-only
[    8.903287] 0x000000100000-0x000010000000 : "rootfs"
[    8.908282] mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
[    8.920044] libphy: Fixed MDIO Bus: probed
[    8.925254] libphy: orion_mdio_bus: probed
[    8.929396] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@8: Whitelisted compatible string. Please remove
[    8.946310] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    9.174428] ata1: SATA link down (SStatus 0 SControl F300)
[    9.692963] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    9.723206] ata2.00: ATA-8: SAMSUNG HD501LJ, CR100-12, max UDMA7
[    9.729247] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.755509] ata2.00: configured for UDMA/133
[    9.783357] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD501LJ  0-12 PQ: 0 ANSI: 5
[    9.792978] sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    9.803007] sd 1:0:0:0: [sda] Write Protect is off
[    9.813058] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.896897]  sda: sda1
[    9.903785] sd 1:0:0:0: [sda] Attached SCSI disk
[   10.121272] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[   10.130209] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.136826] ehci-pci: EHCI PCI platform driver
[   10.141360] ehci-orion: EHCI orion driver
[   10.145694] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.151246] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.159180] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.192970] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.199290] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   10.206153] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.213440] usb usb1: Product: EHCI Host Controller
[   10.218342] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[   10.225097] usb usb1: SerialNumber: f1050000.ehci
[   10.230607] hub 1-0:1.0: USB hub found
[   10.234488] hub 1-0:1.0: 1 port detected
[   10.239176] usbcore: registered new interface driver usb-storage
[   10.245699] mousedev: PS/2 mouse device common for all mice
[   10.592969] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.804564] usb 1-1: New USB device found, idVendor=0781, idProduct=5583
[   10.811319] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.818518] usb 1-1: Product: Ultra Fit
[   10.822393] usb 1-1: Manufacturer: SanDisk
[   10.826534] usb 1-1: SerialNumber: 4C530000041215115005
[   10.832816] usb-storage 1-1:1.0: USB Mass Storage device detected
[   10.839410] scsi host2: usb-storage 1-1:1.0
[   11.282962] rtc-mv f1010300.rtc: internal RTC not ticking
[   11.288593] i2c /dev entries driver
[   11.299259] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[   11.309416] hidraw: raw HID events driver (C) Jiri Kosina
[   11.315382] drop_monitor: Initializing network drop monitor service
[   11.321971] NET: Registered protocol family 17
[   11.326574] Key type dns_resolver registered
[   11.331834] registered taskstats version 1
[   11.336002] Loading compiled-in X.509 certificates
[   11.340889] zswap: loaded using pool lzo/zbud
[   11.357533] Key type big_key registered
[   11.373047] Key type encrypted registered
[   11.380097] rtc-pcf8563 0-0051: setting system clock to 2019-02-10 15:10:25 UTC (1549811425)
[   11.393263] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[   11.927330] usbcore: registered new interface driver uas
[   11.933813] scsi 2:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[   11.952502] sd 2:0:0:0: [sdb] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[   11.967637] sd 2:0:0:0: [sdb] Write Protect is off
[   11.976073] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   12.002288]  sdb: sdb1
[   12.010784] sd 2:0:0:0: [sdb] Attached SCSI removable disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Warning: fsck not present, so skipping root file system
[   22.729561] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...[   25.012460] input: gpio-keys as /devices/platform/gpio-keys/input/input0
done.
[....] Waiting for /dev to be fully populated...[   25.383954] lm75 0-0048: hwmon0: sensor 'lm75'
[   25.513094] marvell-cesa f1030000.crypto: CESA device successfully registered
[   25.545487] orion_wdt: Initial timeout 21 sec
[   25.604579] sd 1:0:0:0: Attached scsi generic sg0 type 0
[   25.633573] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   25.741485] random: crng init done
done.
[....] Activating swap:. ok 
[   27.109860] EXT4-fs (sdb1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sdb1 
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 14455/940240 files, 205045/3753728 blocks
. ok 
[   27.426073] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[....] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.. ok 
[....] Cleaning up temporary files...[....] Cleaning /tmp...done.
 /tmp. ok 
[....] Will now mount local filesystems:. ok 
[....] Will now activate swapfile swap:done.
[....] Checking minimum space in /tmp...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[....] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
[   33.697271] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[   36.922775] NET: Registered protocol family 10
[   36.930573] Segment Routing with IPv6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST of 192.168.2.200 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.2.200 from 192.168.2.50
DHCPACK of 192.168.2.200 from 192.168.2.50
bound to 192.168.2.200 -- renewal in 3064 seconds.
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1326 (syslogd)
. ok 
[....] Starting system message bus: dbus. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting NTP server: ntpd. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1325 (klogd)
. ok 
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Running local boot scripts (/etc/rc.local). ok 

Debian GNU/Linux 9 debian ttyS0
I've attached a photo of the chip and the datasheet.

Here is the requested output

Netgear Stora> nand info

Device 0: nand0, sector size 128 KiB
  Page size       2048 b
  OOB size          64 b
  Erase size    131072 b
  subpagesize      512 b
  options     0x4000101c
  bbt options 0x00008000
Netgear Stora> mtdparts
invalid partition number 2 for device nand0 (orion_nand)
no such partition

device nand0 <orion_nand>, # parts = 2
 #: name                size            offset          mask_flags
 0: uboot               0x00100000      0x00000000      0
 1: rootfs              0x0ff00000      0x00100000      0

active partition: nand0,0 - (uboot) 0x00100000 @ 0x00000000

defaults:
mtdids  : none
mtdparts: none
Netgear Stora>

Thanks
DirkPitt



Edited 1 time(s). Last edit at 02/10/2019 12:17PM by dirkpitt74.
Attachments:
open | download - Samsung-Electro-Mechanics-K9F2G08U0B-PCBO_C11331.pdf (999.1 KB)
open | download - Samsung_nand.jpg (222.3 KB)
Re: NETGEAR STORA - Bad Magic Number
February 10, 2019 01:50PM
Dirk,

Let's see if we can find out detailed info about this chip (google it).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NETGEAR STORA - Bad Magic Number
February 10, 2019 04:47PM
Hi Bodhi,

The chip is a SLC, not a MLC. In this thread I've find a complete bootlog of another Netgear Stora that have a Samsung NAND chip.
The only difference with mine is the linux kernel version. I updated the rootfs to the 4.20.6 and now the chip is correctly recognized.
This is the bootlog with the printenv
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: not available  Bus 1: OK 
  Device 1: Model: SAMSUNG HD501LJ  Firm: CR100-12 Ser#: S0MUJ1EQ221814
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30029824        2384b32d-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

Partition Map for IDE device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            976766976       28f7eead-01     07
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4430168 bytes read in 836 ms (5.1 MiB/s)
loading uInitrd ...
8180887 bytes read in 822 ms (9.5 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11869 bytes read in 2614 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.20.6-kirkwood-tld-1
   Created:      2019-02-10  18:42:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4430104 Bytes = 4.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.20.6-kirkwood-tld-1
   Created:      2019-02-10  18:42:29 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8180823 Bytes = 7.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 03832000, end 03fff457 ... OK
   Loading Device Tree to 0382c000, end 03831e5c ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.20.6-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Thu Jan 31 9
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: NETGEAR MS2000 / MS2110 aka Stora
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x4e8 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(uboot),-(rootfs)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 106396K/131072K available (9216K kernel code, 806K rwdata, 2912K rodata, 1024K init, 290K bss, 24676K reserved, 0K cma-re)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 807 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 291 kB)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000011] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000059] Switching to timer-based delay loop, resolution 5ns
[    0.000999] Console: colour dummy device 80x30
[    0.001063] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001095] pid_max: default: 32768 minimum: 301
[    0.001552] LSM: Security Framework initializing
[    0.001765] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.003121] CPU: Testing write buffer coherency: ok
[    0.005122] Setting up static identity map for 0x100000 - 0x100058
[    0.005470] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.005819] rcu: Hierarchical SRCU implementation.
[    0.009754] devtmpfs: initialized
[    0.017346] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.017384] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.017825] prandom: seed boundary self test passed
[    0.022973] prandom: 100 self tests passed
[    0.022999] pinctrl core: initialized pinctrl subsystem
[    0.024641] NET: Registered protocol family 16
[    0.025246] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026203] audit: initializing netlink subsys (disabled)
[    0.026617] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.027974] cpuidle: using governor ladder
[    0.028071] cpuidle: using governor menu
[    0.028683] Feroceon L2: Enabling L2
[    0.028742] Feroceon L2: Cache support initialised.
[    0.029177] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.035470] No ATAGs?
[    0.046468] vgaarb: loaded
[    0.046897] SCSI subsystem initialized
[    0.047475] usbcore: registered new interface driver usbfs
[    0.047550] usbcore: registered new interface driver hub
[    0.047622] usbcore: registered new device driver usb
[    0.047852] pps_core: LinuxPPS API ver. 1 registered
[    0.047866] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.047899] PTP clock support registered
[    0.049115] clocksource: Switched to clocksource orion_clocksource
[    0.176298] VFS: Disk quotas dquot_6.6.0
[    0.176407] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.188015] NET: Registered protocol family 2
[    0.189024] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.189064] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.189092] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.189214] TCP: Hash tables configured (established 1024 bind 1024)
[    0.189337] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.189368] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.189639] NET: Registered protocol family 1
[    0.190418] RPC: Registered named UNIX socket transport module.
[    0.190435] RPC: Registered udp transport module.
[    0.190445] RPC: Registered tcp transport module.
[    0.190455] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.190760] Unpacking initramfs...
[    1.073222] Freeing initrd memory: 7992K
[    1.073414] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.074865] Initialise system trusted keyrings
[    1.074942] Key type blacklist registered
[    1.075219] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.075335] zbud: loaded
[    1.076637] NFS: Registering the id_resolver key type
[    1.076671] Key type id_resolver registered
[    1.076682] Key type id_legacy registered
[    1.076706] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.076719] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.077075] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.077348] fuse init (API version 7.28)
[    1.077819] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.078045] orangefs_init: module version upstream loaded
[    1.078060] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[    2.559121] random: fast init done
[    8.414137] Key type asymmetric registered
[    8.414159] Asymmetric key parser 'x509' registered
[    8.414245] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    8.414271] io scheduler noop registered
[    8.414283] io scheduler deadline registered
[    8.414425] io scheduler cfq registered (default)
[    8.416093] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    8.418348] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    8.418375] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.418394] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    8.418411] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    8.420450] PCI: bus0: Fast back to back transfers disabled
[    8.420485] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    8.422008] PCI: bus1: Fast back to back transfers enabled
[    8.422284] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0000000-0xe00007ff pref]
[    8.422308] pci 0000:00:01.0: PCI bridge to [bus 01]
[    8.423087] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.480121] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.480422] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.540110] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.540637] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.542158] printk: console [ttyS0] disabled
[    8.542246] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    9.247735] printk: console [ttyS0] enabled
[    9.260824] loop: module loaded
[    9.264650] sata_mv f1080000.sata: slots 32 ports 2
[    9.272873] scsi host0: sata_mv
[    9.276604] scsi host1: sata_mv
[    9.280075] ata1: SATA max UDMA/133 irq 33
[    9.284199] ata2: SATA max UDMA/133 irq 33
[    9.289317] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
[    9.295816] nand: Samsung NAND 256MiB 3,3V 8-bit
[    9.300496] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    9.308117] Scanning device for bad blocks
[    9.375127] Bad eraseblock 581 at 0x0000048a0000
[    9.419624] Bad eraseblock 950 at 0x0000076c0000
[    9.478364] Bad eraseblock 1451 at 0x00000b560000
[    9.547678] 2 cmdlinepart partitions found on MTD device orion_nand
[    9.554023] Creating 2 MTD partitions on "orion_nand":
[    9.559243] 0x000000000000-0x000000100000 : "uboot"
[    9.565641] 0x000000100000-0x000010000000 : "rootfs"
[    9.575539] libphy: Fixed MDIO Bus: probed
[    9.580695] libphy: orion_mdio_bus: probed
[    9.584892] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@8: Whitelisted compatible string. Please remove
[    9.602241] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    9.609798] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[    9.621060] ata1: SATA link down (SStatus 0 SControl F300)
[   10.129309] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   10.138089] ata2.00: ATA-8: SAMSUNG HD501LJ, CR100-12, max UDMA7
[   10.144169] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   10.153516] ata2.00: configured for UDMA/133
[   10.168458] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD501LJ  0-12 PQ: 0 ANSI: 5
[   10.177827] sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[   10.185911] sd 1:0:0:0: [sda] Write Protect is off
[   10.190968] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   10.210769]  sda: sda1
[   10.214804] sd 1:0:0:0: [sda] Attached SCSI disk
[   10.329908] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[   10.338822] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.345503] ehci-pci: EHCI PCI platform driver
[   10.350070] ehci-orion: EHCI orion driver
[   10.354352] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.359953] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.367858] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.399159] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.405530] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.20
[   10.413877] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.421164] usb usb1: Product: EHCI Host Controller
[   10.426075] usb usb1: Manufacturer: Linux 4.20.6-kirkwood-tld-1 ehci_hcd
[   10.432830] usb usb1: SerialNumber: f1050000.ehci
[   10.438277] hub 1-0:1.0: USB hub found
[   10.442169] hub 1-0:1.0: 1 port detected
[   10.446947] usbcore: registered new interface driver usb-storage
[   10.453514] mousedev: PS/2 mouse device common for all mice
[   10.809156] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.020738] usb 1-1: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[   11.028976] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.036191] usb 1-1: Product: Ultra Fit
[   11.040082] usb 1-1: Manufacturer: SanDisk
[   11.044200] usb 1-1: SerialNumber: 4C530000041215115005
[   11.050339] usb-storage 1-1:1.0: USB Mass Storage device detected
[   11.056962] scsi host2: usb-storage 1-1:1.0
[   11.529152] rtc-mv f1010300.rtc: internal RTC not ticking
[   11.534784] i2c /dev entries driver
[   11.545333] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[   11.555502] hidraw: raw HID events driver (C) Jiri Kosina
[   11.561382] drop_monitor: Initializing network drop monitor service
[   11.568044] NET: Registered protocol family 17
[   11.572856] Key type dns_resolver registered
[   11.578113] registered taskstats version 1
[   11.582282] Loading compiled-in X.509 certificates
[   11.587197] zswap: loaded using pool lzo/zbud
[   11.629288] Key type big_key registered
[   11.650500] Key type encrypted registered
[   11.658224] rtc-pcf8563 0-0051: setting system clock to 2019-02-10 20:20:48 UTC (1549830048)
[   11.671489] Freeing unused kernel memory: 1024K
[   11.689866] Checked W+X mappings: passed, no W+X pages found
[   11.695556] Run /init as init process
Loading, please wait...
starting version 232
[   11.821961] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[   11.840201] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[   11.851981] random: udevadm: uninitialized urandom read (16 bytes read)
[   12.090379] scsi 2:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[   12.115977] sd 2:0:0:0: [sdb] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[   12.130949] sd 2:0:0:0: [sdb] Write Protect is off
[   12.139248] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   12.165979]  sdb: sdb1
[   12.177182] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   12.329296] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sdb1] fsck.ext4 -a -C0 /dev/sdb1 
rootfs: clean, 17238/940240 files, 274879/3753728 blocks
done.
[   23.275393] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...[   25.607706] input: gpio-keys as /devices/platform/gpio-keys/input/input0
done.
[....] Waiting for /dev to be fully populated...[   26.059523] lm75 0-0048: hwmon0: sensor 'lm75'
[   26.076002] orion_wdt: Initial timeout 21 sec
[   26.360161] marvell-cesa f1030000.crypto: CESA device successfully registered
[   26.370186] sd 1:0:0:0: Attached scsi generic sg0 type 0
[   26.399471] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   26.479655] random: crng init done
[   26.483097] random: 7 urandom warning(s) missed due to ratelimiting
done.
[....] Activating swap:. ok 
[   28.163995] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[....] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.. ok 
[....] Cleaning up temporary files...[....] Cleaning /tmp...done.
 /tmp. ok 
[....] Will now mount local filesystems:. ok 
[....] Will now activate swapfile swap:done.
[....] Checking minimum space in /tmp...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[....] Initializing random number generator...done.
[   33.988603] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
[   40.709632] NET: Registered protocol family 10
[   40.719551] Segment Routing with IPv6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST of 192.168.2.200 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.2.200 from 192.168.2.50
DHCPACK of 192.168.2.200 from 192.168.2.50
bound to 192.168.2.200 -- renewal in 3075 seconds.
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1332 (syslogd)
. ok 
[....] Starting system message bus: dbus. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting NTP server: ntpd. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1335 (klogd)
. ok 
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Running local boot scripts (/etc/rc.local). ok 

Debian GNU/Linux 9 debian ttyS0

debian login: 

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# fw_printenv
arcNumber=2743
baudrate=115200
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),-(rootfs)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else booti
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-netgear_stora_ms2000.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(uboot),-(rootfs)
nandEcc=1
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
partition=nand0,1
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; fore
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;i
usb_ready_retry=15
root@debian:~#
I think that the kernel 4.12 don't have the correct driver for Samsung NAND chip.
I ask you to check if there are other issues to solve.
Thanks
DirkPitt
Re: NETGEAR STORA - Bad Magic Number
February 10, 2019 04:57PM
Dirk,

> The chip is a SLC, not a MLC. In this
> thread
> I've find a complete bootlog of another Netgear
> Stora that have a Samsung NAND chip.
> The only difference with mine is the linux kernel
> version. I updated the rootfs to the 4.20.6 and
> now the chip is correctly recognized.

Cool!

> I think that the kernel 4.12 don't have the
> correct driver for Samsung NAND chip.

That apparently was the case. I'm glad you've figured out this mystery :)

[    9.547678] 2 cmdlinepart partitions found on MTD device orion_nand
[    9.554023] Creating 2 MTD partitions on "orion_nand":
[    9.559243] 0x000000000000-0x000000100000 : "uboot"
[    9.565641] 0x000000100000-0x000010000000 : "rootfs"

You should verify further to see everything is OK.

cat /proc/mtd
mtdinfo -a
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NETGEAR STORA - Bad Magic Number
March 02, 2019 05:08PM
Hi Bodhi,

This is the log:

root@debian:~# cat /proc/mtd                                                                                                                  
dev:    size   erasesize  name                                                                                                                
mtd0: 00100000 00020000 "uboot"                                                                                                               
mtd1: 0ff00000 00020000 "rootfs"                                                                                                              
root@debian:~# mtdinfo -a                                                                                                                     
Count of MTD devices:           2                                                                                                             
Present MTD devices:            mtd0, mtd1                                                                                                    
Sysfs interface supported:      yes                                                                                                           
                                                                                                                                              
mtd0                                                                                                                                          
Name:                           uboot                                                                                                         
Type:                           nand                                                                                                          
Eraseblock size:                131072 bytes, 128.0 KiB                                                                                       
Amount of eraseblocks:          8 (1048576 bytes, 1024.0 KiB)                                                                                 
Minimum input/output unit size: 2048 bytes                                                                                                    
Sub-page size:                  512 bytes                                                                                                     
OOB size:                       64 bytes                                                                                                      
Character device major/minor:   90:0                                                                                                          
Bad blocks are allowed:         true                                                                                                          
Device is writable:             true                                                                                                          
                                                                                                                                              
mtd1                                                                                                                                          
Name:                           rootfs                                                                                                        
Type:                           nand                                                                                                          
Eraseblock size:                131072 bytes, 128.0 KiB                                                                                       
Amount of eraseblocks:          2040 (267386880 bytes, 255.0 MiB)                                                                             
Minimum input/output unit size: 2048 bytes                                                                                                    
Sub-page size:                  512 bytes                                                                                                     
OOB size:                       64 bytes                                                                                                      
Character device major/minor:   90:2                                                                                                          
Bad blocks are allowed:         true                                                                                                          
Device is writable:             true                                                                                                          
                                                                                                                                              
root@debian:~# fw_printenv                                                                                                                    
arcNumber=2743                                                                                                                                
baudrate=115200                                                                                                                               
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),-(rootfs)                                         
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset                                                            
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi                                                              
bootdelay=10                                                                                                                                  
bootdev=usb                                                                                                                                   
console=console=ttyS0,115200                                                                                                                  
device=0:1                                                                                                                                    
devices=usb ide                                                                                                                               
disks=0 1 2 3                                                                                                                                 
dtb_file=/boot/dts/kirkwood-netgear_stora_ms2000.dtb                                                                                          
ethact=egiga0                                                                                                                                 
ethaddr=52:3b:20:9c:11:51                                                                                                                     
if_netconsole=ping $serverip                                                                                                                  
ipaddr=192.168.0.231                                                                                                                          
led_error=orange blinking                                                                                                                     
led_exit=green off                                                                                                                            
led_init=green blinking                                                                                                                       
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file                                                       
load_dtb_addr=0x1c00000                                                                                                                       
load_initrd_addr=0x1100000                                                                                                                    
load_uimage_addr=0x800000                                                                                                                     
mainlineLinux=yes                                                                                                                             
mtddevname=uboot                                                                                                                              
mtddevnum=0                                                                                                                                   
mtdids=nand0=orion_nand                                                                                                                       
mtdparts=mtdparts=orion_nand:1M(uboot),-(rootfs)                                                                                              
nandEcc=1                                                                                                                                     
nand_erasesize=20000                                                                                                                          
nand_oobsize=40                                                                                                                               
nand_writesize=800                                                                                                                            
partition=nand0,1                                                                                                                             
preboot_nc=run if_netconsole start_netconsole                                                                                                 
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; e
serverip=192.168.0.220                                                                                                                        
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params                                     
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;                    
stderr=serial                                                                                                                                 
stdin=serial                                                                                                                                  
stdout=serial                                                                                                                                 
uenv_addr=0x810000                                                                                                                            
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize                                                                       
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run i;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;      
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi  
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; i
usb_ready_retry=15                                                                                                                            
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd                                                                                          
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage                                                                                            
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi      
root@debian:~#

The NAND is writable and it seems all OK, but ther is some other issue.

Sometimes the USB will be reset with this message
[  232.858901] usb 1-1: reset high-speed USB device number 2 using orion-ehci
After that the system freeze. I can only unplug the power cord and sometimes the system starts again but at other times I have to recreate the rootfs image on the usb stick because it has become inconsistent.

Do you have any suggestions?

Thanks

Dirk
Re: NETGEAR STORA - Bad Magic Number
March 02, 2019 09:44PM
Hi Dirk,

> Sometimes the USB will be reset with this message
>
> [  232.858901] usb 1-1: reset high-speed USB
> device number 2 using orion-ehci                  
>                                                   
>            
>
> After that the system freeze. I can only unplug
> the power cord and sometimes the system starts
> again but at other times I have to recreate the
> rootfs image on the usb stick because it has
> become inconsistent.
>

It sounds like a hardware problem. And I don't have any suggestion for it other than: always use a good brand such as Sandisk for rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: