Badly borked uBoot (Netgear Stora MS2110)
March 02, 2021 11:42PM
Greetings. I'll be quite blunt...I got myself into a bit of a fustercluck with my Netgear Stora.

First off, I tried updating uBoot from stock to the latest 2017.07 release, with the intention of attempting to install OMV (or at least something newer than the ancient stock kernel so I can get stable SMB2 support). Unfortunately, since my initial plan was to install OMV, I didn't follow the instructions provided on this forum. Instead, I followed the instructions located at http://chrislamothe.blogspot.com/2014/08/openmediavault-06-kralizec-on-netgear.html (but replaced the tftp filename with the latest version). However, after flashing the new uBoot, I decided instead of going right into installing OMV, I'd first try to get (what was at the time I downloaded it) the latest Bodhi kernel (Debian-5.2.9-kirkwood-tld-1-rootfs).

This is when things went off the rails.

uBoot itself seems to have flashed fine, and I have serial access to it. However, it will not boot from the 5.2.9 kernel USB. It'll make it as far as "Uncompressing Linux... done, booting the kernel.", and then just hang there forever.

I also tried booting it from an older "stora-debian-rootfs_20140114" ext2 flash drive that I've successfully used in the past for recovery purposes (after accidentally nuking the stock /lib directory, oops...), but same thing, it hangs at "booting the kernel". Same when I change the environment variables to boot from the stock kernel in NAND, it hangs. Basically...I'm currently stuck in uBoot, with no way to go any further.

I imagine what's happened is that one or more environment variables got screwed up...and then I made things even worse in my attempts to fix them piecemeal by reading multiple different forum posts. So, I imagine flashing the default environment variables might fix it. However...how do I do this from within uBoot? Is that even possible? The forum post that tells how to flash them only tells how to do it from within a booted Linux, and not from within uBoot itself.

If it helps, here is the uBoot startup log, along with the output of printenv:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A0
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:  3  2  0 
Netgear Stora> printenv
arcNumber=2743
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /uImage; ext2load ide 0:1 0x01100000 /uInitrd; bootm 0x00800000 0x01100000
bootargs=console=ttyS0,115200 root=/dev/sda1
bootcmd=setenv bootargs $(console) root=LABEL=rootfs rootdelay=8; run bootcmd_usb; bootm 0x200000 0x800000
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 bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=usb reset; ext2load usb 0 0x200000 /boot/uImage; ext2load usb 0 0x800000 /boot/uInitrd
bootdelay=3
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
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
fileaddr=800000
filesize=4bbd60
if_netconsole=ping $serverip
ipaddr=192.168.1.169
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
machid=ffffffff
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1m(uboot),4m@1m(kernel),251m@5m(rootfs) rw
partition=nand0,2
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"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.69
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_$devtype; done;
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;  fi
usb_boot=run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000
usb_bootcmd=usb start; run usb_init; run usb_set_bootargs; run usb_boot
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_unitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
usb_ready_retry=15
usb_root=LABEL=rootfs
usb_rootdelay=10
usb_rootfstype=ext2
usb_set_bootargs=setenv bootargs $console root=$(usb_root) rootfstype=$(usb_rootfstype) rootdelay=$(usb_rootdelay)

Environment size: 3798/131068 bytes

Note: Along with the various assorted "desperate attempt to fix this" changes, many of which I can not recall off the top of my head, I also manually changed bootdelay to 3 simply because I didn't like waiting 10 seconds for it to try booting from USB. :p


And here is the boot log of it attempting to boot from the 5.2.9 kernel USB:

Netgear Stora> boot
resetting 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
4963680 bytes read in 852 ms (5.6 MiB/s)
9713936 bytes read in 820 ms (11.3 MiB/s)
## Booting kernel from Legacy Image at 00200000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00800000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 036bc000, end 03fff8d0 ... OK
Using machid 0xffffffff from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

And then it hangs, forever and all eternity.

How can I fix this?

Thank you...



Edited 1 time(s). Last edit at 03/02/2021 11:48PM by torindkflt.
Re: Badly borked uBoot (Netgear Stora MS2110)
March 03, 2021 01:29AM
torindkflt,


Quote

I imagine what's happened is that one or more environment variables got screwed up...and then I made things even worse in my attempts to fix them piecemeal by reading multiple different forum posts. So, I imagine flashing the default environment variables might fix it. However...how do I do this from within uBoot? Is that even possible? The forum post that tells how to flash them only tells how to do it from within a booted Linux, and not from within uBoot itself.

It is not that bad! you just messed up the envs in your attempt to recover.

So let's get you back to a decent boot into Debian-5.2.9-kirkwood-tld-1-rootfs.

With only the USB rootfs attached (remove the HDD if any attched), power up, interrupt serial console and

setenv dtb_file '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

List tthe envs for reference later, and then boot

printenv
boot

And post serial console log here. Successfully booted to Debian or not, it's good to see exactly where you are in case you have more question.

If the boot is successful, then you can proceed to set the modified envs permanently (with fw_setenv).

Or you could reflash the envs image (Step 8 in u-boot installation) so that you will remove all wrong envs and start fresh.

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



Edited 3 time(s). Last edit at 03/03/2021 01:35AM by bodhi.
Re: Badly borked uBoot (Netgear Stora MS2110)
March 03, 2021 01:09PM
All right, that got it booting! Here's the log:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2021.03.03 12:45:04 =~=~=~=~=~=~=~=~=~=~=~=
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A0
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 dtb_file '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
Netgear Stora> setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'
Netgear Stora> printenv
arcNumber=2743
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /uImage; ext2load ide 0:1 0x01100000 /uInitrd; bootm 0x00800000 0x01100000
bootargs=console=ttyS0,115200 root=/dev/sda1
bootcmd=run scan_disk; run set_bootargs; run bootcmd_exec
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 bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=usb reset; ext2load usb 0 0x200000 /boot/uImage; ext2load usb 0 0x800000 /boot/uInitrd
bootdelay=3
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
fileaddr=800000
filesize=4bbd60
if_netconsole=ping $serverip
ipaddr=192.168.1.169
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
machid=ffffffff
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1m(uboot),4m@1m(kernel),251m@5m(rootfs) rw
partition=nand0,2
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"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.69
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial
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_$devtype; done;
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;  fi
usb_boot=run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000
usb_bootcmd=usb start; run usb_init; run usb_set_bootargs; run usb_boot
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_unitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
usb_ready_retry=15
usb_root=LABEL=rootfs
usb_rootdelay=10
usb_rootfstype=ext2
usb_set_bootargs=setenv bootargs $console root=$(usb_root) rootfstype=$(usb_rootfstype) rootdelay=$(usb_rootdelay)

Environment size: 3757/131068 bytes
Netgear Stora> boot
running scan_disk ...
Scan device usb
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
device usb 0:1
1 bytes read in 507 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4963680 bytes read in 852 ms (5.6 MiB/s)
loading uInitrd ...
9713936 bytes read in 820 ms (11.3 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11499 bytes read in 2475 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 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 036bc000, end 03fff8d0 ... OK
   Loading Device Tree to 036b6000, end 036bbcea ... OK
Using machid 0xffffffff from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: NETGEAR MS2000 / MS2110 aka Stora
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1m(uboot),4m@1m(kernel),251m@5m(rootfs) rw earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000][    T0] Memory: 104832K/131072K available (9216K kernel code, 868K rwdata, 3400K rodata, 1024K init, 301K bss, 26240K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x38c/0x928 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000011][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.008606][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.016145][    T0] Console: colour dummy device 80x30
[    0.021417][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.032753][    T0] pid_max: default: 32768 minimum: 301
[    0.038546][    T0] LSM: Security Framework initializing
[    0.044163][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051582][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060445][    T0] *** VALIDATE proc ***
[    0.064786][    T0] *** VALIDATE cgroup1 ***
[    0.069155][    T0] *** VALIDATE cgroup2 ***
[    0.073555][    T0] CPU: Testing write buffer coherency: ok
[    0.081282][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.088543][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.094819][    T1] rcu: Hierarchical SRCU implementation.
[    0.104404][    T1] devtmpfs: initialized
[    0.115306][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.125994][    T1] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.133219][    T1] xor: measuring software checksum speed
[    0.238640][    T1]    arm4regs  :   902.400 MB/sec
[    0.338633][    T1]    8regs     :   542.000 MB/sec
[    0.438634][    T1]    32regs    :   787.600 MB/sec
[    0.443550][    T1] xor: using function: arm4regs (902.400 MB/sec)
[    0.449815][    T1] prandom: seed boundary self test passed
[    0.460491][    T1] prandom: 100 self tests passed
[    0.465313][    T1] pinctrl core: initialized pinctrl subsystem
[    0.473080][    T1] NET: Registered protocol family 16
[    0.479037][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.487624][    T1] audit: initializing netlink subsys (disabled)
[    0.495288][   T14] audit: type=2000 audit(0.480:1): state=initialized audit_enabled=0 res=1
[    0.503951][    T1] cpuidle: using governor ladder
[    0.508932][    T1] cpuidle: using governor menu
[    0.514300][    T1] Feroceon L2: Enabling L2
[    0.518737][    T1] Feroceon L2: Cache support initialised.
[    0.531539][    T1] No ATAGs?
[    2.568614][    C0] random: fast init done
[    7.690073][   T71] alg: No test for lzo-rle (lzo-rle-generic)
[    7.696349][   T73] alg: No test for lzo-rle (lzo-rle-scomp)
[    7.879362][    T1] raid6: int32x8  gen()   106 MB/s
[    8.049029][    T1] raid6: int32x8  xor()    72 MB/s
[    8.218712][    T1] raid6: int32x4  gen()   107 MB/s
[    8.388794][    T1] raid6: int32x4  xor()    69 MB/s
[    8.558819][    T1] raid6: int32x2  gen()   110 MB/s
[    8.728697][    T1] raid6: int32x2  xor()    78 MB/s
[    8.899089][    T1] raid6: int32x1  gen()    83 MB/s
[    9.068757][    T1] raid6: int32x1  xor()    57 MB/s
[    9.073746][    T1] raid6: using algorithm int32x2 gen() 110 MB/s
[    9.079886][    T1] raid6: .... xor() 78 MB/s, rmw enabled
[    9.085395][    T1] raid6: using intx1 recovery algorithm
[    9.091138][    T1] vgaarb: loaded
[    9.095168][    T1] SCSI subsystem initialized
[    9.100273][    T1] usbcore: registered new interface driver usbfs
[    9.106551][    T1] usbcore: registered new interface driver hub
[    9.112748][    T1] usbcore: registered new device driver usb
[    9.118763][    T1] pps_core: LinuxPPS API ver. 1 registered
[    9.124453][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    9.134371][    T1] PTP clock support registered
[    9.140681][    T1] clocksource: Switched to clocksource orion_clocksource
[   10.392856][    T1] VFS: Disk quotas dquot_6.6.0
[   10.397595][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   10.417218][    T1] NET: Registered protocol family 2
[   10.423339][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[   10.431841][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[   10.439551][    T1] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[   10.446709][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[   10.453954][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   10.460532][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   10.467833][    T1] NET: Registered protocol family 1
[   10.473712][    T1] RPC: Registered named UNIX socket transport module.
[   10.480360][    T1] RPC: Registered udp transport module.
[   10.485883][    T1] RPC: Registered tcp transport module.
[   10.491339][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   10.498514][    T1] PCI: CLS 0 bytes, default 32
[   10.503465][    T1] Trying to unpack rootfs image as initramfs...
[   11.528644][    T1] Freeing initrd memory: 9488K
[   11.533655][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[   11.542420][    T1] Initialise system trusted keyrings
[   11.547635][    T1] Key type blacklist registered
[   11.552719][    T1] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[   11.560000][    T1] zbud: loaded
[   11.564661][    T1] NFS: Registering the id_resolver key type
[   11.570464][    T1] Key type id_resolver registered
[   11.575466][    T1] Key type id_legacy registered
[   11.580213][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   11.587680][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   11.595138][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   11.603228][    T1] fuse: init (API version 7.31)
[   11.608426][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   11.615850][    T1] orangefs_init: module version upstream loaded
[   11.622005][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[   11.651587][    T1] async_tx: api initialized (async)
[   11.656679][    T1] Key type asymmetric registered
[   11.661613][    T1] Asymmetric key parser 'x509' registered
[   11.667291][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[   11.677303][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[   11.687780][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[   11.696194][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[   11.702445][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[   11.710052][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[   11.717203][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[   11.724004][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[   11.733080][    T1] PCI: bus0: Fast back to back transfers disabled
[   11.739400][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   11.749686][    T1] PCI: bus1: Fast back to back transfers enabled
[   11.755949][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[   11.763551][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0000000-0xe00007ff pref]
[   11.771543][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[   11.777968][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[   11.841678][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   11.852179][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[   11.921673][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   11.932502][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   11.941199][    T1] printk: console [ttyS0] disabled
[   11.946264][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   11.956094][    T1] printk: console [ttyS0] enabled
[   11.956094][    T1] printk: console [ttyS0] enabled
[   11.965955][    T1] printk: bootconsole [earlycon0] disabled
[   11.965955][    T1] printk: bootconsole [earlycon0] disabled
[   11.986638][    T1] loop: module loaded
[   11.991263][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   12.000233][    T1] scsi host0: sata_mv
[   12.004882][    T1] scsi host1: sata_mv
[   12.009111][    T1] ata1: SATA max UDMA/133 irq 33
[   12.014007][    T1] ata2: SATA max UDMA/133 irq 33
[   12.020052][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
[   12.027243][    T1] nand: Samsung NAND 256MiB 3,3V 8-bit
[   12.032615][    T1] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   12.040957][    T1] Scanning device for bad blocks
[   12.066605][    T1] Bad eraseblock 194 at 0x000001840000
[   12.072024][    T1] Bad eraseblock 195 at 0x000001860000
[   12.078699][    T1] Bad eraseblock 208 at 0x000001a00000
[   12.101139][    T1] Bad eraseblock 368 at 0x000002e00000
[   12.106531][    T1] Bad eraseblock 369 at 0x000002e20000
[   12.138482][    T1] Bad eraseblock 618 at 0x000004d40000
[   12.152577][    T1] Bad eraseblock 700 at 0x000005780000
[   12.191259][    T1] Bad eraseblock 1012 at 0x000007e80000
[   12.226818][    T1] Bad eraseblock 1294 at 0x00000a1c0000
[   12.242876][    T1] Bad eraseblock 1393 at 0x00000ae20000
[   12.253789][    T1] Bad eraseblock 1444 at 0x00000b480000
[   12.280491][    T1] Bad eraseblock 1642 at 0x00000cd40000
[   12.328239][    T1] Bad eraseblock 2036 at 0x00000fe80000
[   12.334914][    T1] 3 cmdlinepart partitions found on MTD device orion_nand
[   12.341964][  T112] ata1: SATA link down (SStatus 0 SControl F300)
[   12.348229][    T1] Creating 3 MTD partitions on "orion_nand":
[   12.354142][    T1] 0x000000000000-0x000000100000 : "uboot"
[   12.361570][    T1] 0x000000100000-0x000000500000 : "kernel"
[   12.368764][    T1] 0x000000500000-0x000010000000 : "rootfs"
[   12.378478][    T1] libphy: Fixed MDIO Bus: probed
[   12.384320][    T1] libphy: orion_mdio_bus: probed
[   12.389162][    T1] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@8: Whitelisted compatible string. Please remove
[   12.417512][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   12.425752][    T1] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[   12.692373][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[   13.151614][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[   13.161278][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.168569][    T1] ehci-pci: EHCI PCI platform driver
[   13.173838][    T1] ehci-orion: EHCI orion driver
[   13.178805][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   13.185106][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   13.193733][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   13.220728][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   13.227795][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[   13.236836][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.244822][    T1] usb usb1: Product: EHCI Host Controller
[   13.250422][    T1] usb usb1: Manufacturer: Linux 5.2.9-kirkwood-tld-1 ehci_hcd
[   13.257796][    T1] usb usb1: SerialNumber: f1050000.ehci
[   13.263988][    T1] hub 1-0:1.0: USB hub found
[   13.268510][    T1] hub 1-0:1.0: 1 port detected
[   13.274069][    T1] usbcore: registered new interface driver usb-storage
[   13.281311][    T1] mousedev: PS/2 mouse device common for all mice
[   13.640731][   T15] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   13.841739][   T15] usb 1-1: New USB device found, idVendor=0781, idProduct=5575, bcdDevice= 1.26
[   13.850705][   T15] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.858608][   T15] usb 1-1: Product: Cruzer Glide
[   13.863454][   T15] usb 1-1: Manufacturer: SanDisk
[   13.868268][   T15] usb 1-1: SerialNumber: 20054255721DFBC0850B
[   13.875086][   T15] usb-storage 1-1:1.0: USB Mass Storage device detected
[   13.882474][   T15] scsi host2: usb-storage 1-1:1.0
[   14.330728][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
[   14.337062][    T1] i2c /dev entries driver
[   14.347007][    T1] rtc rtc0: invalid alarm value: 2021-03-12T34:01:00
[   14.353834][    T1] rtc-pcf8563 0-0051: registered as rtc0
[   14.361240][    T1] device-mapper: uevent: version 1.0.3
[   14.366916][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[   14.376655][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   14.384003][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   14.391406][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   14.398838][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   14.405695][    T1] device-mapper: raid: Loading target version 1.14.0
[   14.414371][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[   14.420955][    T1] drop_monitor: Initializing network drop monitor service
[   14.428336][    T1] NET: Registered protocol family 17
[   14.433853][    T1] Key type dns_resolver registered
[   14.439917][    T1] registered taskstats version 1
[   14.444780][    T1] Loading compiled-in X.509 certificates
[   14.450389][    T1] zswap: loaded using pool lzo/zbud
[   14.567450][    T1] Key type big_key registered
[   14.623070][    T1] Key type encrypted registered
[   14.631671][    T1] rtc-pcf8563 0-0051: setting system clock to 2021-03-03T18:46:47 UTC (1614797207)
[   14.645443][    T1] Freeing unused kernel memory: 1024K
[   14.661441][    T1] Checked W+X mappings: passed, no W+X pages found
[   14.667837][    T1] Run /init as init process
Loading, please wait...
Starting version 241
[   14.891875][   T23] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Glide     1.26 PQ: 0 ANSI: 5
[   14.918430][    T7] sd 2:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[   14.945319][    T7] sd 2:0:0:0: [sda] Write Protect is off
[   14.959065][    T7] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   14.988959][    T7]  sda: sda1
[   15.014308][    T7] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   15.990674][  T171] 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.33.1
fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sda1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

INIT: version 2.93 booting

[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting hotplug events dispatcher: systemd-udevd[ ok .
[....] Synthesizing the initial hotplug events (subsystems)...[ ok done.
[....] Synthesizing the initial hotplug events (devices)...[   34.596367][  T381] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ ok [   34.739707][  T383] systemd-udevd[383]: Using default interface naming scheme 'v240'.
done.
[....] Waiting for /dev to be fully populated...[   34.899483][  T383] systemd-udevd[383]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   35.108358][  T372] lm75 0-0048: hwmon0: sensor 'lm75'
[   35.143574][  T382] watchdog: f1020300.watchdog-timer: driver supplied timeout (4294967295) out of range
[   35.242106][  T382] watchdog: f1020300.watchdog-timer: falling back to default timeout (21)
[   35.366476][  T382] orion_wdt: Initial timeout 21 sec
[   35.422600][    C0] random: crng init done
[   35.536225][  T383] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   35.737155][  T381] marvell-cesa f1030000.crypto: CESA device successfully registered
[   35.875647][  T381] systemd-udevd[381]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[ ok done.
[....] Setting hostname to 'debian'...[ ok done.
[....] Activating swap:[ ok .
[....] Will now check root file system:fsck from util-linux 2.33.1
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sda1 
e2fsck 1.44.5 (15-Dec-2018)
rootfs: clean, 15040/488640 files, 168426/1953792 blocks
[ ok .
[info] Will now check all file systems.
fsck from util-linux 2.33.1
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...[ ok done.
 /tmp[ ok .
[....] Will now mount local filesystems:[ ok .
[....] Will now activate swapfile swap:[ ok done.
[....] Checking minimum space in /tmp...[ ok done.
[....] Cleaning up temporary files...[ ok .
[....] Starting Setting kernel variables: sysctl[ ok .
[....] Initializing random number generator...[ ok done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 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 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ ok done.
[....] Starting RPC port mapper daemon: rpcbind[  104.290188][ T1221] NET: Registered protocol family 10
[  104.297562][ T1221] Segment Routing with IPv6
[ 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...
1357 (syslogd)
[ ok .
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1384 (klogd)
[ ok .
[....] Starting system message bus: dbus[ ok .
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon[ ok .
[....] Starting NFS common utilities: statd idmapd[ ok .
[....] Not starting NFS kernel daemon: no exports. ...[warn (warning).
[....] Starting NTP server: ntpd[ ok .
[....] Starting OpenBSD Secure Shell server: sshd[ ok .
[....] Running local boot scripts (/etc/rc.local)[ ok .


Debian GNU/Linux 10 debian ttyS0

debian login: root

Password: 
Last login: Wed Dec 31 16:02:34 PST 1969 from 192.168.0.100 on pts/0
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~#

Anything else I should do before I go about trying to get it working as a NAS again?
Re: Badly borked uBoot (Netgear Stora MS2110)
March 03, 2021 04:54PM
torindkflt,

Cool!

> Anything else I should do before I go about trying
> to get it working as a NAS again?

As I mentioned above, at this point you would want to either set the envs permanently or reflash the envs image (Step 8).

Verify that the mtd partitions are OK.
cat /proc/mtd
List the envs
fw_printenv

If the info abov looks OK. So can proceed to set the envs permanently (what you did in serial console is transient):

fw_setenv dtb_file '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
fw_setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

And reboot without interruption. It should boot all the way into Debian like before.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Badly borked uBoot (Netgear Stora MS2110)
March 04, 2021 08:28PM
Here's the output of /proc/mtd:

dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00400000 00020000 "kernel"
mtd2: 0fb00000 00020000 "rootfs"

Is this correct?

Something else I've noticed is that the power immediately turns on the instant I plug in the power adapter, whereas on stock uBoot I had to push the power button to turn it on. Is there a way to disable the auto-poweron in the new uBoot? Not a big deal if it isn't possible, I just would prefer if I can to not have it automatically power on like that.

I'll wait to hear back before I do anything else, such as trying to load the rootfs onto the hard drive (or could it maybe be flashed to NAND? If so, that would be nice).



Edited 1 time(s). Last edit at 03/04/2021 08:29PM by torindkflt.
Re: Badly borked uBoot (Netgear Stora MS2110)
March 04, 2021 11:32PM
torindkflt,

> Here's the output of /proc/mtd:
>
>
> dev:    size   erasesize  name
> mtd0: 00100000 00020000 "uboot"
> mtd1: 00400000 00020000 "kernel"
> mtd2: 0fb00000 00020000 "rootfs"
>
>
> Is this correct?

Yes it is correct. And the fact that you can run fw_printenv and see sane output, it is doubly good.


> Something else I've noticed is that the power
> immediately turns on the instant I plug in the
> power adapter, whereas on stock uBoot I had to
> push the power button to turn it on. Is there a
> way to disable the auto-poweron in the new uBoot?

The Power button should behave the same way.

Inside Debian, verify that by: shutdown, and then unplug the cord, plug it back in. The box should not start until you press the Power button.


> Not a big deal if it isn't possible, I just would
> prefer if I can to not have it automatically power
> on like that.

Some people prefer it to start automatically after a power outage. But the default behavior should be like your preference.

> I'll wait to hear back before I do anything else,
> such as trying to load the rootfs onto the hard
> drive (or could it maybe be flashed to NAND? If
> so, that would be nice).

NAND storage in this box is quite small. The Debian rootfs should be on HDD or USB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Badly borked uBoot (Netgear Stora MS2110)
March 05, 2021 01:59AM
All right, I'll install it to the hard drive then.

One more question...is there a way to make the power LED stop blinking while it is turned on? I'd like it to just be lit solid while it is running, because otherwise it is...kind of annoying, lol.
Re: Badly borked uBoot (Netgear Stora MS2110)
March 05, 2021 03:48AM
torindkflt,

> One more question...is there a way to make the
> power LED stop blinking while it is turned on? I'd
> like it to just be lit solid while it is running,
> because otherwise it is...kind of annoying, lol.

It is always blinking rapdidly when booting. Once the kernel has booted the power LED should stay solid.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Badly borked uBoot (Netgear Stora MS2110)
March 05, 2021 12:09PM
bodhi Wrote:
-------------------------------------------------------
> It is always blinking rapdidly when booting. Once
> the kernel has booted the power LED should stay
> solid.


Alas, it is not. Once booted, the power LED is blinking twice rapidly, pausing for a second, blinking twice rapidly, pausing for a second, and so forth. Otherwise it seems to be running normally.

I wonder if this is somehow related to the other issue I'm having where it automatically powers on the instant I plug in the power adapter (it's not supposed to do that).
Re: Badly borked uBoot (Netgear Stora MS2110)
March 05, 2021 04:25PM
> Alas, it is not. Once booted, the power LED is
> blinking twice rapidly, pausing for a second,
> blinking twice rapidly, pausing for a second, and
> so forth. Otherwise it seems to be running
> normally.

Sounds like the heartbeat is set. You can examine it by

cat /sys/class/led/status:blue:power_led/trigger
cat /sys/class/led/status:blue:activity_led/trigger

If either of them show heartbeat (selected trigger is in square brackets [ ]) then turm it on/off in /etc/rc.local.

See the example in /etc/rc.local for other boxes (this Stora came late and I always forgot to udate the released rootfs).

echo none > /sys/class/led/status:blue:activity_led/trigger
or

echo default-on  > /sys/class/led/status:blue:activity_led/trigger

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Badly borked uBoot (Netgear Stora MS2110)
March 05, 2021 06:35PM
Yep, heartbeat was set on /sys/class/led/status:blue:activity_led/trigger. Modified rc.local to echo the default-on statement you gave above, and that fixed it. Now it only blinks while booting. Thanks!

Since we're past the original uBoot issue, this thread can be closed now. If I have any more questions or problems, I'll start a new thread. Thank you.
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: