Welcome! Log In Create A New Profile

Advanced

Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent

Posted by SimonMcS 
Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 17, 2024 12:40PM
Hello

I have a Netgear Stora MS2000 I've recycled from work.
I've tried to install Debian on it using the OpenStora installation articles, before finding this forum, where I tried booting Linux via TFTP but without luck, which in return bricked the device from the stock OS.

Long story short, I have serial access to the box. I've made a mistake by using the resetenv command on the stock uboot (without knowledge that the command is bugged on the stock uboot), and now I have a stock uboot without any env values, and I don't have a backup of the env values, nor can I find a flashware.img file to restore the values. I'd be happy to try that out, if I could source the file.

I'm able to kwboot using uboot.2017.07-tld-1.netgear_ms2110.bodhi.kwb, where I'm able to get some luck with trying to boot into Linux, but I'm having a very hard time getting the box to detect USB devices consistently in general.

I've tried creating a Debian rootfs on the following devices using an ext4 filesystem, created using mkfs.ext4:
  • 32 GB USB 3.0 flash drive
  • 4 GB USB 2.0 flash drive
  • 120 GB SATA SSD via SATA to USB adapter
  • 60 GB External USB-C SSD using a USB type C to type A adapter

Most of the time, I'm stuck after initializing autoboot or running usb reset, like this prompt:

simon@X220:~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi$ sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
kwboot version 2024.01
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (500964 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [................................................................      ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


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
*** Warning - bad CRC, using default environment

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> printenv
arcNumber=2743
baudrate=115200
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 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
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
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
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.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_$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_ready_retry=15

Environment size: 2905/131068 bytes
Netgear Stora> setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> printenv
arcNumber=2743
baudrate=115200
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 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
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
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.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_$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_ready_retry=15

Environment size: 2909/131068 bytes
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...

I'm having the most luck booting from the flash drives without a drive connected to the NAS, interrupting autoboot, plugging the USB in, executing usb reset, and after succesfully detecting the drive, changing the dtb file to include the file extention and running the boot command.

All the drives are detected on a different Linux machine without issues.
I've tried creating and loading from ext2 and ext3 filesystems instead of ext4.
I've tried reconnecting the USB header cable from the daughterboard.

All in all, I can't seem to get the NAS to detect the USB drives consistently.

I've never been able to boot into a Debian prompt. There has always been a kernel panic, a freeze/crash when scanning the drive, or an EHCI timeout with a "bad device usb 0" error, and most of the time, the NAS restarts and boots into stock uboot.

I've only had luck booting the Linux kernel twice, but it booted into initramfs first, and hung on scanning /dev/sda the second time

Ideally, I want the 60 GB external USB-C SSD is going to be the boot drive for this system.

I hope anyone can chime in with any inputs on how to fix this as I'm out of ideas. Any help would be greatly appreciated.
Thanks!



Edited 1 time(s). Last edit at 09/17/2024 04:41PM by SimonMcS.
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 18, 2024 06:55PM
SimonMcS,

> I've never been able to boot into a Debian prompt.
> There has always been a kernel panic,

This has nothing to do with u-boot.

The kernel panic has something to do with your USB rootfs. For example, you did not label the partition as rootfs, or not being root user when extracting the tarball.

> freeze/crash when scanning the drive, or an EHCI
> timeout with a "bad device usb 0" error, and most
> of the time, the NAS restarts and boots into stock
> uboot.

Unfortunately, the Stora seems to have this EHCI issue more often than other NAS. The new u-boot helps, but does not eliminate the problem in all cases.

- Try using a different USB thumb drive. Sandisk is one of the best USB brands for booting and rootfs.

>
> I've only had luck booting the Linux kernel twice,
> but it booted into initramfs first, and hung on
> scanning /dev/sda the second time

After u-boot starts booting the kernel, any error occurs during kernel booting is likely due to the rootfs not created properly.

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



Edited 1 time(s). Last edit at 09/18/2024 06:56PM by bodhi.
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 19, 2024 04:50PM
Hello Bodhi, thanks for getting back to me!

I'm not sure how I could mess up creating the rootfs, since I’ve simply been following the guide closely.
But if the NAS is known to be buggy, I suppose there’s not much point in spending time trying to get it working...

I've tested everything again on a 32 GB SanDisk Cruzer Blade USB 2.0 flash drive, both with ext4 and ext3 filesystems, but it doesn't get detected as a storage device in uboot. Here are the steps I’ve taken, for documentation purposes:


Use fdisk to format the drive and create a new primary partition:
root@node-01:~# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p):

Using default response p.
Partition number (1-4, default 1):
First sector (2048-60538880, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-60538880, default 60538880):

Created a new partition 1 of type 'Linux' and of size 28.9 GiB.
Partition #1 contains a ext3 signature.

Do you want to remove the signature? [Y]es/[N]o: y

The signature will be removed by a write command.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Make an EXT4 filesystem:
root@node-01:~# mkfs.ext4 /dev/sdb1
mke2fs 1.47.0 (5-Feb-2023)
Creating filesystem with 7567104 4k blocks and 1892352 inodes
Filesystem UUID: 9c964fa3-5a78-4ad9-b002-47eacb9522ad
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

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

I've mounted the drive on /media/sdb1, and scp'ed the Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 tarball from my main machine to the box. Made sure the hash was correct:
root@node-01:/media/sdb1# sha256sum Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2
04a2dba61dc3284fbbfb5ac9b439655f2fc44293cd228dce2b774d37b4512fd3  Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2

Unpack the tarball and adjust fstab:
root@node-01:/media/sdb1# tar xjf Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@node-01:/media/sdb1# ls
bin  boot  Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@node-01:/media/sdb1# cat ./etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
root@node-01:/media/sdb1# nano /media/sdb1/etc/fstab
root@node-01:/media/sdb1# cat ./etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext4    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
root@node-01:/media/sdb1# cd ~
root@node-01:~# umount /media/sdb1

And this is my first attempt at kwbooting, while the SanDisk drive is plugged in:
simon@X220:~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi$ sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
kwboot version 2024.01
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (500964 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [................................................................      ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


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
*** Warning - bad CRC, using default environment

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>printenv
arcNumber=2743
baudrate=115200
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 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
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
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
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.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_$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_ready_retry=15

Environment size: 2905/131068 bytes
Netgear Stora> usb reset
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found


However, a Kingston Traveller USB 3.0 flash drive, which was created with the same method like all of the above, is able to get detected as a storage device (sometimes), but freezes and resets into stock uboot when trying to start the kernel:
simon@X220:~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi$ sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
kwboot version 2024.01
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (500964 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [................................................................      ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


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
*** Warning - bad CRC, using default environment

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> printenv
arcNumber=2743
baudrate=115200
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 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
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
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
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.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_$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_ready_retry=15

Environment size: 2905/131068 bytes
Netgear Stora> usb reset
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
Netgear Stora> setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> boot

Reset IDE: ide_preinit failed

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60536833  	e50dcb51-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 **

no IDE devices available
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 ...
6223944 bytes read in 882 ms (6.7 MiB/s)
loading uInitrd ...
5791271 bytes read in 778 ms (7.1 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11715 bytes read in 2906 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6223880 Bytes = 5.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes = 5.5 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 03a7a000, end 03fffde7 ... OK
   Loading Device Tree to 03a74000, end 03a79dc2 ... OK

Starting kernel ...


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

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

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE60

Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size  64MB 
DRAM CS[1] base 0x04000000   size  64MB 
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB

On the second attempt, it hung when scanning for USB storage devices after running usb reset.
Third attempt was identical to the first - hung at "Starting kernel".

Best regards,
-Simon



Edited 1 time(s). Last edit at 09/19/2024 04:59PM by SimonMcS.
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 19, 2024 08:08PM
SimonMcS Wrote:
-------------------------------------------------------
> Make an EXT4 filesystem:
> root@node-01:~# mkfs.ext4 /dev/sdb1
> mke2fs 1.47.0 (5-Feb-2023)
> Creating filesystem with 7567104 4k blocks and
> 1892352 inodes
> Filesystem UUID:
> 9c964fa3-5a78-4ad9-b002-47eacb9522ad
> Superblock backups stored on blocks:
>         32768, 98304, 163840, 229376, 294912,
> 819200, 884736, 1605632, 2654208,
>         4096000
> 
> Allocating group tables: done
> Writing inode tables: done
> Creating journal (32768 blocks): done
> Writing superblocks and filesystem accounting
> information: done

One thing that's easy to miss is that when formatting EXT4 is that it has to be "finalized", per the following text (and the link) on the rootfs page:

Quote
But be aware that Ext4 file system format needs to be "finalized" before it can be used for booting.

That links to text that says:

Quote
Disable the lazy option while formatting it:
mkfs.ext4 -E lazy_itable_init=0


The motto: Don't be lazy! ;-)
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 19, 2024 11:48PM
SimonMcS,

Please use Kingston Traveller USB 3.0 flash drive while testing.

Make sure you do the EXT4 file system finalization (see dhargens reminder above). But as I saw you mentioned that you've tried Ext3 unsuccessfully too. Also, you've did not label the partition as rootfs (this is reason for kernel panics).

Here is the correct format command for Ext3 and Ext4 rootfs.
mkfs.ext3 -L rootfs /dev/sdb1
and for Ext4 rootfs
mkfs.ext4  -L rootfs -E lazy_itable_init=0 /dev/sdb1

===========

Now if for whatever reason it still got stuck at "Starting kernel ..." then

Plug in the USB rootfs, power up, interrupt u-boot countdown and
setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
setenv custom_params 'earlyprintk=serial'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 20, 2024 09:25AM
@dhargens
Thanks for the tip, it's hard to keep track of everything when you have 15 tabs of different forum posts open at the same time :)

@bodhi
Thanks for the input!

I've formatted and recreated an ext4 filesystem on the Kingston flash drive, using the finalized option, and labelled it "rootfs"
root@node-01:~# mkfs.ext4  -L rootfs -E lazy_itable_init=0 /dev/sdb1
mke2fs 1.47.0 (5-Feb-2023)
Creating filesystem with 7567104 4k blocks and 1892352 inodes
Filesystem UUID: 7a4183bd-8d84-4bf7-951d-a7312419fcde
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

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


However, even with the custom_params env variable it still wouldn't go past Starting kernel:
simon@X220:~/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi$ sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
kwboot version 2024.01
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (500964 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [................................................................      ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


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
*** Warning - bad CRC, using default environment

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> printenv
arcNumber=2743
baudrate=115200
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 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
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
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
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.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_$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_ready_retry=15

Environment size: 2905/131068 bytes
Netgear Stora> usb reset
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
Netgear Stora> setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> setenv custom_params 'earlyprintk=serial'
Netgear Stora> boot

Reset IDE: ide_preinit failed

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60536833  	e50dcb51-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 **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 691 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
6223944 bytes read in 882 ms (6.7 MiB/s)
loading uInitrd ...
5791271 bytes read in 777 ms (7.1 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11715 bytes read in 2906 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6223880 Bytes = 5.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes = 5.5 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 03a7a000, end 03fffde7 ... OK
   Loading Device Tree to 03a74000, end 03a79dc2 ... OK

Starting kernel ...


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

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

I've given it a few attempts (was able to detect the drive 3 times out of 15 kwboots) and was only able to get this far:
Netgear Stora> usb reset
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
Netgear Stora> setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> setenv custom_params 'earlyprintk=serial'
Netgear Stora> printenv
arcNumber=2743
baudrate=115200
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 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
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
custom_params=earlyprintk=serial
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
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.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_$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_ready_retry=15

Environment size: 2944/131068 bytes
Netgear Stora> boot

Reset IDE: ide_preinit failed

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60536833  	e50dcb51-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 **

no IDE devices available
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 ...
6223944 bytes read in 882 ms (6.7 MiB/s)
loading uInitrd ...
5791271 bytes read in 777 ms (7.1 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11715 bytes read in 2906 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6223880 Bytes = 5.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes = 5.5 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 03a7a000, end 03fffde7 ... OK
   Loading Device Tree to 03a74000, end 03a79dc2 ... OK

Starting kernel ...

[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 6.5.7-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 PREEMPT Wed Oct 18 21:14:11 PDT 2023
[    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] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    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, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 102520K/131072K available (12288K kernel code, 1755K rwdata, 5416K rodata, 1024K init, 301K bss, 28552K reserved, 0K cma-reserved)
[    0.000000][    T0] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of 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] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.008626][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.016003][    T0] Console: colour dummy device 80x30
[    0.021326][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.032692][    T0] CPU: Testing write buffer coherency: ok
[    0.038481][    T0] pid_max: default: 32768 minimum: 301
[    0.054463][    T0] LSM: initializing lsm=capability,integrity
[    0.063318][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.071470][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.095425][    T1] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.103785][    T1] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.112814][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.120257][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.126731][    T1] rcu: Hierarchical SRCU implementation.
[    0.132385][    T1] rcu: 	Max phase no-delay instances is 1000.
[    0.142035][    T1] devtmpfs: initialized
[    0.158917][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.169664][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.180711][    T1] prandom: seed boundary self test passed
[    0.191505][    T1] prandom: 100 self tests passed
[    0.196352][    T1] pinctrl core: initialized pinctrl subsystem
[    0.207108][    T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.215850][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230114][    T1] audit: initializing netlink subsys (disabled)
[    0.239080][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.239291][   T19] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.254623][    T1] cpuidle: using governor ladder
[    0.259614][    T1] cpuidle: using governor menu
[    0.265137][    T1] Feroceon L2: Enabling L2
[    0.269600][    T1] Feroceon L2: Cache support initialised.
[    0.288204][    T1] No ATAGs?
[    0.658646][    T1] raid6: int32x8  gen()    91 MB/s
[    0.998640][    T1] raid6: int32x4  gen()    88 MB/s
[    1.338679][    T1] raid6: int32x2  gen()   113 MB/s
[    1.678641][    T1] raid6: int32x1  gen()    82 MB/s
[    1.683646][    T1] raid6: using algorithm int32x2 gen() 113 MB/s
[    2.038646][    T1] raid6: .... xor() 72 MB/s, rmw enabled
[    2.044175][    T1] raid6: using intx1 recovery algorithm
[    2.060715][    T1] SCSI subsystem initialized
[    2.079330][    T1] usbcore: registered new interface driver usbfs
[    2.085673][    T1] usbcore: registered new interface driver hub
[    2.098730][    T1] usbcore: registered new device driver usb
[    2.104943][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.128644][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.138574][    T1] PTP clock support registered
[    2.162038][    T1] vgaarb: loaded
[    2.166515][    T1] clocksource: Switched to clocksource orion_clocksource
[    2.207677][    T1] VFS: Disk quotas dquot_6.6.0
[    2.212880][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.264333][    T1] NET: Registered PF_INET protocol family
[    2.276909][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    2.298021][    T1] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    2.316822][    T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    2.325350][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    2.356567][    T1] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    2.364390][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    2.387443][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    2.395705][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    2.416573][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    2.425353][    T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.447861][    T1] RPC: Registered named UNIX socket transport module.
[    2.454529][    T1] RPC: Registered udp transport module.
[    2.476541][    T1] RPC: Registered tcp transport module.
[    2.481980][    T1] RPC: Registered tcp-with-tls transport module.
[    2.496538][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.503739][    T1] PCI: CLS 0 bytes, default 32
[    2.527129][   T10] Trying to unpack rootfs image as initramfs...

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

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

Which is positive! But the result is also similar to the other times I was able to attempt to boot the kernel.

So it seems like the USB controller is bugged in some way, like you said.
Is booting from the SATA backplane an option? I'd like to avoid flashing and booting from NAND, but if that's an option, I wouldn't mind trying it out.

I appreciate your help, thanks!



Edited 2 time(s). Last edit at 09/20/2024 09:30AM by SimonMcS.
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 20, 2024 02:02PM
SimonMcS,

> So it seems like the USB controller is bugged in
> some way, like you said.
> Is booting from the SATA backplane an option? I'd
> like to avoid flashing and booting from NAND, but
> if that's an option, I wouldn't mind trying it
> out.

Yes, it's best to move on to booting with SATA rootfs. Also avoiding booting from NAND too, it's the last resort.

Now you can create the rootfs on the HDD exactly the same way you did for USB. And kwboot it. The new u-boot will automatically find the kernel files on this rootfs and boot it.

To save time and keystrokes during kwboot testing, when you create the SATA rootfs, also add the uEnv.txt file on the rootfs /boot directory.

Assuming it is mounted at /media/sdb1
cd /media/sdb1/boot
echo "dtb_file=/boot/dts/kirkwood-netgear_stora_ms2000.dtb" > uEnv.txt
sync

So now when you kwboot, you can let it boot without interruption. Later, after you've installed the new u-boot on NAND and boot normally, this tweak will no longer be necessary.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 23, 2024 03:33PM
All right, good news... (hopefully useful for anyone else having the same problem)

I've done all of my previous testing without a power supply plugged in to the box, and just handing power directly off of the USB to TTL serial cable while kwbooting.

I initially installed a 2.5" SATA SSD (because I didn't have a spare harddrive to power up and install the rootfs directly onto), installed the rootfs doing all of the above, and uboot couldn't detect the SSD at all.

Then I thought it might've been power related, so I attempted a kwboot (prompting it for a reboot), plugged in a 12V power supply, cancelled and reran kwboot, and it detected the SSD immediately and booted succesfully into Debian.

I tried out the Kingston USB as mentioned before, and that worked out aswell!
I've also tried out the external SSD (which was supposed to be the boot drive with the rootfs), and that worked too!

simon@X220:~$ sudo kwboot -t -B 115200 /dev/ttyUSB0 -b /home/simon/Downloads/uboot.2017.07-tld-1.netgear_ms2110.bodhi/uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb -p
kwboot version 2024.01
Detected kwbimage v0 with NAND boot signature
Patching image boot signature to UART
Sending boot message. Please reboot the target...-
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (500964 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [................................................................      ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


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
*** Warning - bad CRC, using default environment

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> 
Netgear Stora> 
Netgear Stora> setenv dtb_file  '/boot/dts/kirkwood-netgear_stora_ms2000.dtb'
Netgear Stora> usb reset
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
Netgear Stora> 
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
Netgear Stora> boot

Reset IDE: ide_preinit failed

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	60536833  	e50dcb51-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 **

no IDE devices available
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 ...
6223944 bytes read in 882 ms (6.7 MiB/s)
loading uInitrd ...
5791271 bytes read in 777 ms (7.1 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_stora_ms2000.dtb ...
11715 bytes read in 2906 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6223880 Bytes = 5.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes = 5.5 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 03a7a000, end 03fffde7 ... OK
   Loading Device Tree to 03a74000, end 03a79dc2 ... OK

Starting kernel ...

[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 6.5.7-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 PREEMPT Wed Oct 18 21:14:11 PDT 2023
[    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] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    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
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 102520K/131072K available (12288K kernel code, 1755K rwdata, 5416K rodata, 1024K init, 301K bss, 28552K reserved, 0K cma-reserved)
[    0.000000][    T0] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of 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] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000059][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000793][    T0] Console: colour dummy device 80x30
[    0.000881][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000920][    T0] CPU: Testing write buffer coherency: ok
[    0.001086][    T0] pid_max: default: 32768 minimum: 301
[    0.011724][    T0] LSM: initializing lsm=capability,integrity
[    0.014629][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.014676][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.030204][    T1] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.030680][    T1] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.031300][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.031715][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.032335][    T1] rcu: Hierarchical SRCU implementation.
[    0.032357][    T1] rcu: 	Max phase no-delay instances is 1000.
[    0.036000][    T1] devtmpfs: initialized
[    0.048559][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.048616][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.052171][    T1] prandom: seed boundary self test passed
[    0.057294][    T1] prandom: 100 self tests passed
[    0.057313][    T1] pinctrl core: initialized pinctrl subsystem
[    0.062914][    T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.064091][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.070681][    T1] audit: initializing netlink subsys (disabled)
[    0.073452][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.073662][   T19] audit: type=2000 audit(0.070:1): state=initialized audit_enabled=0 res=1
[    0.073728][    T1] cpuidle: using governor ladder
[    0.073831][    T1] cpuidle: using governor menu
[    0.074651][    T1] Feroceon L2: Enabling L2
[    0.074698][    T1] Feroceon L2: Cache support initialised.
[    0.087694][    T1] No ATAGs?
[    0.450079][    T1] raid6: int32x8  gen()    91 MB/s
[    0.790075][    T1] raid6: int32x4  gen()    88 MB/s
[    1.130114][    T1] raid6: int32x2  gen()   113 MB/s
[    1.470075][    T1] raid6: int32x1  gen()    81 MB/s
[    1.470092][    T1] raid6: using algorithm int32x2 gen() 113 MB/s
[    1.810078][    T1] raid6: .... xor() 72 MB/s, rmw enabled
[    1.810095][    T1] raid6: using intx1 recovery algorithm
[    1.812176][    T1] SCSI subsystem initialized
[    1.813161][    T1] usbcore: registered new interface driver usbfs
[    1.813295][    T1] usbcore: registered new interface driver hub
[    1.813421][    T1] usbcore: registered new device driver usb
[    1.813854][    T1] pps_core: LinuxPPS API ver. 1 registered
[    1.813866][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.813906][    T1] PTP clock support registered
[    1.817327][    T1] vgaarb: loaded
[    1.818359][    T1] clocksource: Switched to clocksource orion_clocksource
[    1.837999][    T1] VFS: Disk quotas dquot_6.6.0
[    1.848590][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.879735][    T1] NET: Registered PF_INET protocol family
[    1.880107][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    1.889894][    T1] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.890191][    T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    1.890228][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.890269][    T1] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    1.890309][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    1.891163][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.891462][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.891506][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.892574][    T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    1.894025][    T1] RPC: Registered named UNIX socket transport module.
[    1.894042][    T1] RPC: Registered udp transport module.
[    1.894051][    T1] RPC: Registered tcp transport module.
[    1.894058][    T1] RPC: Registered tcp-with-tls transport module.
[    1.894066][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.894093][    T1] PCI: CLS 0 bytes, default 32
[    1.897729][   T32] Trying to unpack rootfs image as initramfs...
[    3.093236][   T32] Freeing initrd memory: 5656K
[    4.300051][    T1] Initialise system trusted keyrings
[    4.300167][    T1] Key type blacklist registered
[    4.301929][    T1] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    4.302155][    T1] zbud: loaded
[    4.325324][    T1] NFS: Registering the id_resolver key type
[    4.325388][    T1] Key type id_resolver registered
[    4.325401][    T1] Key type id_legacy registered
[    4.325637][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    4.325665][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    4.327584][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    4.328787][    T1] fuse: init (API version 7.38)
[    4.330542][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    4.331001][    T1] orangefs_init: module version upstream loaded
[    4.331476][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    4.586057][    T1] xor: measuring software checksum speed
[    4.596730][    T1]    arm4regs        :   927 MB/sec
[    4.614456][    T1]    8regs           :   556 MB/sec
[    4.626946][    T1]    32regs          :   789 MB/sec
[    4.626958][    T1] xor: using function: arm4regs (927 MB/sec)
[    4.626977][    T1] async_tx: api initialized (async)
[    4.626997][    T1] Key type asymmetric registered
[    4.627008][    T1] Asymmetric key parser 'x509' registered
[    4.691081][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    4.691627][    T1] io scheduler bfq registered
[    4.919986][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.922239][    T1] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    4.923984][    T1] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    4.925240][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    4.925341][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    4.925396][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    4.925431][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    4.926517][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    4.926542][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.926566][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    4.926587][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.926605][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    4.926746][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    4.929077][    T1] PCI: bus0: Fast back to back transfers disabled
[    4.929115][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.929540][    T1] PCI: bus1: Fast back to back transfers enabled
[    4.929568][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.929620][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.930909][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.991583][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.997409][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    5.061588][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    5.067814][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.071310][    T1] printk: console [ttyS0] disabled
[    5.072139][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 28, base_baud = 12500000) is a 16550A
[    5.072224][    T1] printk: console [ttyS0] enabled
[    6.074786][    T1] loop: module loaded
[    6.080076][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    6.091836][    T1] scsi host0: sata_mv
[    6.097697][    T1] scsi host1: sata_mv
[    6.102245][    T1] ata1: SATA max UDMA/133 irq 29
[    6.107081][    T1] ata2: SATA max UDMA/133 irq 29
[    6.113739][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
[    6.120896][    T1] nand: Samsung NAND 256MiB 3,3V 8-bit
[    6.126246][    T1] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    6.134616][    T1] Scanning device for bad blocks
[    6.220375][    T1] Bad eraseblock 750 at 0x000005dc0000
[    6.230646][    T1] Bad eraseblock 796 at 0x000006380000
[    6.250761][    T1] Bad eraseblock 933 at 0x0000074a0000
[    6.315780][    T1] Bad eraseblock 1487 at 0x00000b9e0000
[    6.348982][    T1] Bad eraseblock 1744 at 0x00000da00000
[    6.387186][    T1] 3 cmdlinepart partitions found on MTD device orion_nand
[    6.394243][    T1] Creating 3 MTD partitions on "orion_nand":
[    6.400169][    T1] 0x000000000000-0x000000100000 : "uboot"
[    6.406874][    T1] 0x000000100000-0x000000500000 : "kernel"
[    6.413575][    T1] 0x000000500000-0x000010000000 : "rootfs"
[    6.422727][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    6.431405][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    6.441788][   T53] ata1: SATA link down (SStatus 0 SControl F300)
[    6.453796][    T1] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@8: Whitelisted compatible string. Please remove
[    6.493831][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.800115][   T55] ata2: SATA link down (SStatus 0 SControl F300)
[    7.260030][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    7.270375][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.276648][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.285414][    T1] orion-ehci f1050000.ehci: irq 32, io mem 0xf1050000
[    7.318399][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.325635][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    7.334695][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.342687][    T1] usb usb1: Product: EHCI Host Controller
[    7.348304][    T1] usb usb1: Manufacturer: Linux 6.5.7-kirkwood-tld-1 ehci_hcd
[    7.355679][    T1] usb usb1: SerialNumber: f1050000.ehci
[    7.362419][    T1] hub 1-0:1.0: USB hub found
[    7.366961][    T1] hub 1-0:1.0: 1 port detected
[    7.372984][    T1] usbcore: registered new interface driver usb-storage
[    7.380533][    T1] mousedev: PS/2 mouse device common for all mice
[    7.658409][   T50] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    7.862920][   T50] usb 1-1: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 2.00
[    7.871910][   T50] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[    7.879841][   T50] usb 1-1: Product: DataTraveler 3.0
[    7.885021][   T50] usb 1-1: Manufacturer: Kingston
[    7.889959][   T50] usb 1-1: SerialNumber: E0D55EA5742A1691D87D07A6
[    7.897604][   T50] usb-storage 1-1:1.0: USB Mass Storage device detected
[    7.905695][   T50] scsi host2: usb-storage 1-1:1.0
[    8.408412][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
[    8.414954][    T1] i2c_dev: i2c /dev entries driver
[    8.424627][    T1] rtc-pcf8563 0-0051: registered as rtc0
[    8.431538][    T1] rtc-pcf8563 0-0051: setting system clock to 2024-09-23T19:14:04 UTC (1727118844)
[    8.443481][    T1] device-mapper: uevent: version 1.0.3
[    8.449661][    T1] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[    8.459708][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    8.466988][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    8.474438][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    8.481931][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    8.492449][    T1] ledtrig-cpu: registered to indicate activity on CPUs
[    8.499507][    T1] hid: raw HID events driver (C) Jiri Kosina
[    8.505961][    T1] drop_monitor: Initializing network drop monitor service
[    8.514942][    T1] NET: Registered PF_INET6 protocol family
[    8.523350][    T1] Segment Routing with IPv6
[    8.527754][    T1] RPL Segment Routing with IPv6
[    8.532717][    T1] In-situ OAM (IOAM) with IPv6
[    8.537591][    T1] NET: Registered PF_PACKET protocol family
[    8.543873][    T1] Key type dns_resolver registered
[    8.572429][    T1] registered taskstats version 1
[    8.577565][    T1] Loading compiled-in X.509 certificates
[    8.610163][    T1] Key type .fscrypt registered
[    8.614844][    T1] Key type fscrypt-provisioning registered
[    8.628776][    T1] Key type big_key registered
[    8.690389][    T1] Key type encrypted registered
[    8.827541][  T107] "cryptomgr_test" (107) uses obsolete ecb(arc4) skcipher
[    8.969775][   T18] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 3.0 0000 PQ: 0 ANSI: 4
[    8.990975][   T32] sd 2:0:0:0: [sda] 60538881 512-byte logical blocks: (31.0 GB/28.9 GiB)
[    9.008965][   T32] sd 2:0:0:0: [sda] Write Protect is off
[    9.018427][   T32] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    9.056851][   T32]  sda: sda1
[    9.069137][   T32] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   11.640406][    T1] clk: Disabling unused clocks
[   11.649722][    T1] Freeing unused kernel image (initmem) memory: 1024K
[   11.669442][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.675866][    T1] Run /init as init process
Loading, please wait...
Starting systemd-udevd version 252.17-1~deb12u1
[   13.436319][  T150] 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.38.1
fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/sda1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[   29.340396][  T177] EXT4-fs (sda1): mounted filesystem 7a4183bd-8d84-4bf7-951d-a7312419fcde r/w with ordered data mode. Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 3.06 booting
INIT: No inittab.d directory found
Using makefile-style concurrent boot in runlevel S.
Setting hostname to 'debian'...done.
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...[   33.015313][  T356] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[   33.412975][  T356] lm75 0-0048: supply vs not found, using dummy regulator
[   33.549798][  T356] hwmon hwmon0: temp1_input not attached to any thermal zone
[   33.565334][  T368] orion_wdt: Initial timeout 21 sec
[   33.666481][  T356] lm75 0-0048: hwmon0: sensor 'lm75'
[   34.368497][    C0] random: crng init done
[   34.410404][  T358] marvell-cesa f1030000.crypto: CESA device successfully registered
[   34.518709][  T356] sd 2:0:0:0: Attached scsi generic sg0 type 0
done.
Activating swap:.
[   36.896184][  T513] EXT4-fs (sda1): re-mounted 7a4183bd-8d84-4bf7-951d-a7312419fcde ro. Quota mode: none.
Will now check root file system:[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -y -C0 /dev/sda1 
e2fsck 1.47.0 (5-Feb-2023)
rootfs: clean, 20038/1892352 files, 407779/7567104 blocks
.
[   37.298927][  T520] EXT4-fs (sda1): re-mounted 7a4183bd-8d84-4bf7-951d-a7312419fcde r/w. Quota mode: none.
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Initializing random number generator...done.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 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 3
[   43.669933][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER of 10.1.1.227 from 10.1.1.1
DHCPREQUEST for 10.1.1.227 on eth0 to 255.255.255.255 port 67
DHCPACK of 10.1.1.227 from 10.1.1.1
bound to 10.1.1.227 -- renewal in 3544 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Not starting NFS kernel daemon: no exports ... (warning).
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1029 (syslogd)
.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting NTP server: ntpd2024-09-23T12:14:44 ntpd[1062]: INIT: ntpd ntpsec-1.2.2: Starting
2024-09-23T12:14:44 ntpd[1062]: INIT: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:106
.
Starting NTP server: ntpd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1038 (klogd)
.
Starting OpenBSD Secure Shell server: sshdsshd: no hostkeys available -- exiting.
 failed!
Running local boot scripts (/etc/rc.local)
ssh-keygen: generating new host keys: RSA 
ECDSA 
ED25519 

Starting OpenBSD Secure Shell server: sshd
.
.

Debian GNU/Linux 12 debian ttyS0

debian login:

So it might've been an oversight by me by not giving the box enough power, but I was unable to get a stable kwboot previously, which made me skip trying to use the power supply in the first place.

I've went through the uboot flashing process in the meantime, and everything seems to be working, also after a reboot.
Time to check off another box saved from the e-waste bin!

Thanks a lot for the help and for the ressources!
Re: Netgear Stora MS2000 - Detecting USB drives via latest uboot is inconsistent
September 23, 2024 04:40PM
> So it might've been an oversight by me by not
> giving the box enough power, but I was unable to
> get a stable kwboot previously, which made me skip
> trying to use the power supply in the first
> place.

The moral of the story is that old hardware tend to have bad power supply! when all remedies fail, check it.

>
> I've went through the uboot flashing process in
> the meantime, and everything seems to be working,
> also after a reboot.
> Time to check off another box saved from the
> e-waste bin!
>

Cool!

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