Welcome! Log In Create A New Profile

Advanced

NSA325v2 stuck on starting kernel

Posted by LostFile 
NSA325v2 stuck on starting kernel
February 19, 2022 06:22PM
Hi,

I am trying to install the latest debian build on the Zyxel NS325v2 using the instructions on this website, however the boot seems to be stuck on launching kernel.

I have access to serial. This is what the env looks like

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 

NSA325> printenv
printenv
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=28:28:5D:13:EE:E1
if_netconsole=ping $serverip
ipaddr=192.168.1.65
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=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
nc_ready=1
ncip=192.168.1.245
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.245
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=nc
stdin=nc
stdout=nc
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: 3017/131068 bytes



NSA325> boot
boot
Booting Linux...
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
5449902 bytes read in 1050 ms (4.9 MiB/s)
9671091 bytes read in 995 ms (9.3 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2022-02-19  23:32:51 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5449838 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK


Starting kernel ...


Boot sequence gets stuck on the last part. Could somebody point me in the correct direction getting debian to launch?
Re: NSA325v2 stuck on starting kernel
February 19, 2022 06:35PM
LostFile,

You've either misread this part of the installation, or did not complete it.

Quote


8. Flashing default u-boot envs image
.......

f. Adjust the DTB name to boot with a rootfs that has FDT kernel 3.17+ (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

For this box, it is kirkwood-nsa325.dtb

So reboot, interrupt netconsole and

setenv dtb_file '/boot/dts/kirkwood-nsa325.dtb'

and
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 19, 2022 06:51PM
Thanks for the super quick reply! Aha that seems very embarrassing that I seem to have missed that line. However, with the correct dts file it is still not loading into debian. Is there a way to boot verbosely?

NSA325> setenv dtb_file '/boot/dts/kirkwood-nsa325.dtb'    
setenv dtb_file '/boot/dts/kirkwood-nsa325.dtb'
NSA325> printenv dtb_file
printenv dtb_file
dtb_file=/boot/dts/kirkwood-nsa325.dtb
Re: NSA325v2 stuck on starting kernel
February 19, 2022 07:12PM
LostFile,

Not with netconsole. With serial console it will be easier to see the error.

However, now I looked at your boot log closely. It seems your envs are messed up.

So reboot, interrupt netconsole, and

setenv dtb_file '/boot/dts/kirkwood-nsa325.dtb' 
printenv
boot


And post the entire boot log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 19, 2022 08:13PM
In the serial output the kernel seems to panic at

[    8.827919][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
Re: NSA325v2 stuck on starting kernel
February 19, 2022 08:32PM
Actually I think the transfer borked some files. I am in debian now. Thanks for the help!

edit: do i need to use uEnv.txt to correct the wrong dbs file or can i reflash the nand?



Edited 1 time(s). Last edit at 02/19/2022 08:35PM by LostFile.
Re: NSA325v2 stuck on starting kernel
February 19, 2022 09:01PM
If you have fw_setenv command available you can use it to set the dbt file.

# fw_setenv dtb_file '/boot/dts/kirkwood-nsa325.dtb'

If you don't have fw_setenv available you're likely using Debian Bullseye and will need to install the correct package:

# apt install libubootenv-tool

Ray
Re: NSA325v2 stuck on starting kernel
February 19, 2022 09:07PM
LostFile,

> Actually I think the transfer borked some files. I
> am in debian now. Thanks for the help!
>
> edit: do i need to use uEnv.txt to correct the
> wrong dbs file or can i reflash the nand?

Your envs were messed up, there are more wrong settings than just the dtb_file. As I said, post the boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 19, 2022 10:10PM
Hi thanks for the help. I have attached the logs

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Using egiga0 device
host 192.168.1.245 is alive
Using egiga0 device
host 192.168.1.245 is alive
Using egiga0 device
host 192.168.1.245 is alive
Using egiga0 device
host 192.168.1.245 is alive
Using egiga0 device
host 192.168.1.245 is alive
Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    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: ZyXEL NSA325
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 490944K/524288K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 33344K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    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] 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.000050][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000760][    T0] Console: colour dummy device 80x30
[    0.000824][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000860][    T0] pid_max: default: 32768 minimum: 301
[    0.001194][    T0] LSM: Security Framework initializing
[    0.001342][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001381][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002578][    T0] CPU: Testing write buffer coherency: ok
[    0.004615][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.004888][    T1] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005173][    T1] rcu: Hierarchical SRCU implementation.
[    0.006385][    T1] devtmpfs: initialized
[    0.012424][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012472][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.040485][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.040522][    T1] prandom: seed boundary self test passed
[    0.043665][    T1] prandom: 100 self tests passed
[    0.043680][    T1] pinctrl core: initialized pinctrl subsystem
[    0.045063][    T1] NET: Registered protocol family 16
[    0.045718][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.046507][    T1] audit: initializing netlink subsys (disabled)
[    0.047689][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.048011][   T16] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.048165][    T1] cpuidle: using governor ladder
[    0.048250][    T1] cpuidle: using governor menu
[    0.048715][    T1] Feroceon L2: Enabling L2
[    0.048756][    T1] Feroceon L2: Cache support initialised.
[    0.057108][    T1] No ATAGs?
[    2.560054][    C0] random: fast init done
[    3.683229][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.701937][   T59] wait_for_initramfs() called before rootfs_initcalls
[    3.890262][    T1] raid6: int32x8  gen()   151 MB/s
[    4.060115][    T1] raid6: int32x8  xor()    93 MB/s
[    4.230185][    T1] raid6: int32x4  gen()   153 MB/s
[    4.400174][    T1] raid6: int32x4  xor()    98 MB/s
[    4.570095][    T1] raid6: int32x2  gen()   198 MB/s
[    4.740127][    T1] raid6: int32x2  xor()   120 MB/s
[    4.910136][    T1] raid6: int32x1  gen()   152 MB/s
[    5.080120][    T1] raid6: int32x1  xor()    86 MB/s
[    5.080132][    T1] raid6: using algorithm int32x2 gen() 198 MB/s
[    5.080143][    T1] raid6: .... xor() 120 MB/s, rmw enabled
[    5.080152][    T1] raid6: using intx1 recovery algorithm
[    5.080364][    T1] vgaarb: loaded
[    5.080811][    T1] SCSI subsystem initialized
[    5.081217][    T1] usbcore: registered new interface driver usbfs
[    5.081272][    T1] usbcore: registered new interface driver hub
[    5.081315][    T1] usbcore: registered new device driver usb
[    5.081477][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.081489][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.081515][    T1] PTP clock support registered
[    5.082984][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.163503][    T1] VFS: Disk quotas dquot_6.6.0
[    5.163595][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.171457][    T1] NET: Registered protocol family 2
[    5.171622][    T1] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    5.172651][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.172701][    T1] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.172770][    T1] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.172827][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    5.173058][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.173126][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.173159][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.173352][    T1] NET: Registered protocol family 1
[    5.183468][    T1] RPC: Registered named UNIX socket transport module.
[    5.183487][    T1] RPC: Registered udp transport module.
[    5.183497][    T1] RPC: Registered tcp transport module.
[    5.183506][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.183520][    T1] PCI: CLS 0 bytes, default 32
[    5.183808][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    5.185124][   T58] Trying to unpack rootfs image as initramfs...
[    6.457526][   T58] Freeing initrd memory: 9448K
[    6.926632][    T1] Initialise system trusted keyrings
[    6.926692][    T1] Key type blacklist registered
[    6.926912][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    6.927010][    T1] zbud: loaded
[    6.928154][    T1] NFS: Registering the id_resolver key type
[    6.928194][    T1] Key type id_resolver registered
[    6.928205][    T1] Key type id_legacy registered
[    6.928239][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.928259][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    6.928271][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.928488][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  <0xc2><0xa9> 2001-2006 Red Hat, Inc.
[    6.928867][    T1] fuse: init (API version 7.34)
[    6.929206][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.929368][    T1] orangefs_init: module version upstream loaded
[    6.929383][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    7.007018][    T1] xor: measuring software checksum speed
[    7.013763][    T1]    arm4regs        :  1479 MB/sec
[    7.024814][    T1]    8regs           :   895 MB/sec
[    7.032377][    T1]    32regs          :  1302 MB/sec
[    7.032387][    T1] xor: using function: arm4regs (1479 MB/sec)
[    7.032405][    T1] async_tx: api initialized (async)
[    7.032420][    T1] Key type asymmetric registered
[    7.032430][    T1] Asymmetric key parser 'x509' registered
[    7.032479][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.032546][    T1] io scheduler bfq registered
[    7.181442][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.182927][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    7.183034][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    7.183072][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[    7.183105][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[    7.183138][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    7.183169][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    7.183200][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    7.183224][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    7.183483][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    7.183502][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.183521][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    7.183539][    T1] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[    7.183556][    T1] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[    7.183572][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    7.183587][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    7.183701][    T1] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    7.183734][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    7.184889][    T1] PCI: bus0: Fast back to back transfers disabled
[    7.184918][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.185096][    T1] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    7.185134][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    7.185284][    T1] pci 0000:01:00.0: PME# supported from D0 D3hot
[    7.185360][    T1] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    7.213993][    T1] PCI: bus1: Fast back to back transfers disabled
[    7.214019][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    7.214182][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    7.214205][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    7.214226][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    7.214253][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    7.214270][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    7.214369][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    7.214446][    T1] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    7.214925][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.273827][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.275822][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.333823][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.336062][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.337201][    T1] printk: console [ttyS0] disabled
[    7.337281][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    8.459580][    T1] printk: console [ttyS0] enabled
[    8.471120][    T1] loop: module loaded
[    8.475713][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    8.484266][    T1] scsi host0: sata_mv
[    8.488624][    T1] scsi host1: sata_mv
[    8.492665][    T1] ata1: SATA max UDMA/133 irq 32
[    8.497531][    T1] ata2: SATA max UDMA/133 irq 32
[    8.503149][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    8.510271][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[    8.515626][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.524162][    T1] Scanning device for bad blocks
[    8.557480][    T1] Bad eraseblock 275 at 0x000002260000
[    8.621188][    T1] Bad eraseblock 840 at 0x000006900000
[    8.645518][    T1] 9 fixed-partitions partitions found on MTD device orion_nand
[    8.652949][    T1] Creating 9 MTD partitions on "orion_nand":
[    8.658827][    T1] 0x000000000000-0x000000100000 : "uboot"
[    8.665680][    T1] 0x000000100000-0x000000180000 : "uboot_env"
[    8.672733][    T1] 0x000000180000-0x000000200000 : "key_store"
[    8.679832][    T1] 0x000000200000-0x000000280000 : "info"
[    8.686467][    T1] 0x000000280000-0x000000c80000 : "etc"
[    8.693061][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.700081][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    8.707146][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    8.714198][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[    8.721634][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    8.730279][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.741553][    T1] libphy: Fixed MDIO Bus: probed
[    8.747559][    T1] libphy: orion_mdio_bus: probed
[    8.765261][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.774411][    T1] mv643xx_eth: Set the PHY to fix link down
[    8.774963][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 28:28:5d:13:ee:e1
[    8.790384][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.797743][    T1] ehci-pci: EHCI PCI platform driver
[    8.803031][    T1] ehci-orion: EHCI orion driver
[    8.807911][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.814203][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.822763][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.834543][   T94] ata1: SATA link down (SStatus 0 SControl F300)
[    8.853005][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.859985][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.869018][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.876989][    T1] usb usb1: Product: EHCI Host Controller
[    8.882591][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    8.890033][    T1] usb usb1: SerialNumber: f1050000.ehci
[    8.896004][    T1] hub 1-0:1.0: USB hub found
[    8.900513][    T1] hub 1-0:1.0: 1 port detected
[    8.905896][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.911862][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    8.920324][    T1] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    8.930576][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.939699][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.947677][    T1] usb usb2: Product: xHCI Host Controller
[    8.953288][    T1] usb usb2: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    8.960722][    T1] usb usb2: SerialNumber: 0000:01:00.0
[    8.966575][    T1] hub 2-0:1.0: USB hub found
[    8.971091][    T1] hub 2-0:1.0: 2 ports detected
[    8.976395][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.982359][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    8.990550][    T1] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    8.997643][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    9.006749][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
[    9.015772][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.023746][    T1] usb usb3: Product: xHCI Host Controller
[    9.029348][    T1] usb usb3: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    9.036791][    T1] usb usb3: SerialNumber: 0000:01:00.0
[    9.042624][    T1] hub 3-0:1.0: USB hub found
[    9.047263][    T1] hub 3-0:1.0: 2 ports detected
[    9.052719][    T1] usbcore: registered new interface driver usb-storage
[    9.059875][    T1] mousedev: PS/2 mouse device common for all mice
[    9.066467][    T1] i2c /dev entries driver
[    9.077163][    T1] rtc-pcf8563 0-0051: registered as rtc0
[    9.083936][    T1] rtc-pcf8563 0-0051: setting system clock to 2022-02-20T04:09:45 UTC (1645330185)
[    9.094688][    T1] device-mapper: uevent: version 1.0.3
[    9.100289][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[    9.109866][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    9.117186][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    9.124649][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    9.132071][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    9.138921][    T1] device-mapper: raid: Loading target version 1.15.1
[    9.147555][    T1] hid: raw HID events driver (C) Jiri Kosina
[    9.153959][    T1] drop_monitor: Initializing network drop monitor service
[    9.161347][    T1] NET: Registered protocol family 10
[    9.167607][    T1] Segment Routing with IPv6
[    9.172057][    T1] RPL Segment Routing with IPv6
[    9.176887][    T1] NET: Registered protocol family 17
[    9.182081][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[    9.188509][    T1] Key type dns_resolver registered
[    9.193556][   T17] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.201603][    T1] registered taskstats version 1
[    9.206525][    T1] Loading compiled-in X.509 certificates
[    9.212409][    T1] zswap: loaded using pool lzo/zbud
[    9.217824][    T1] Key type ._fscrypt registered
[    9.222557][    T1] Key type .fscrypt registered
[    9.227264][    T1] Key type fscrypt-provisioning registered
[    9.234486][    T1] Key type big_key registered
[    9.262480][    T1] Key type encrypted registered
[    9.273566][    T1] Freeing unused kernel memory: 1024K
[    9.293706][    T1] Checked W+X mappings: passed, no W+X pages found
[    9.300106][    T1] Run /init as init process
Loading, please wait...
[    9.404913][   T17] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.32
Starting version 247.3-6
[    9.420902][   T17] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    9.453082][   T17] usb 1-1: Product: USB2.0 Hub
[    9.465515][   T17] hub 1-1:1.0: USB hub found
[    9.484728][   T17] hub 1-1:1.0: 4 ports detected
[    9.803069][   T17] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[    9.970546][   T17] usb 1-1.3: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.01
[    9.993119][   T17] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.001190][   T17] usb 1-1.3: Product: Mass Storage
[   10.027948][   T17] usb 1-1.3: Manufacturer: Generic
[   10.032953][   T17] usb 1-1.3: SerialNumber: 0FA78BEC
[   10.095383][  T145] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   10.103128][   T17] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   10.122510][   T17] scsi host2: usb-storage 1-1.3:1.0
[   10.572220][  T145] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[   11.205227][    T7] scsi 2:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
[   11.219572][   T58] sd 2:0:0:0: [sda] 7987200 512-byte logical blocks: (4.09 GB/3.81 GiB)
[   11.232184][   T58] sd 2:0:0:0: [sda] Write Protect is off
[   11.238669][   T58] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   11.292508][   T58]  sda: sda1
[   11.306438][   T58] sd 2:0:0:0: [sda] Attached SCSI removable disk
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.36.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1 
rootfs: clean, 17623/249488 files, 289741/997888 blocks
done.
[   20.931968][  T169] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   21.151491][  T169] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.96 booting
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...[   27.068480][    C0] random: crng init done
[   27.573601][  T362] orion_wdt: Initial timeout 21 sec
[   27.826585][  T357] marvell-cesa f1030000.crypto: CESA device successfully registered
[   28.346047][  T359] sd 2:0:0:0: Attached scsi generic sg0 type 0
done.
Activating swap:.
[   29.320331][  T508] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro. 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...done.
Starting RPC port mapper daemon: rpcbind.
[   32.018361][  T912] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   35.027502][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   35.045037][  T105] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting NFS common utilities: statd idmapd.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1056 (syslogd)
.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... <0x1b>[33m(warning).<0x1b>[39;49m
Starting NTP server: ntpd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1085 (klogd)
.
Starting OpenBSD Secure Shell server: sshd.
Running local boot scripts (/etc/rc.local)
<break>
.

Debian GNU/Linux 11 debian ttyS0

debian login: 
Re: NSA325v2 stuck on starting kernel
February 20, 2022 03:44PM
LostFile,

> SoC: Kirkwood 88F6282_A1
> DRAM: 512 MiB
> WARNING: Caches not enabled
> NAND: 128 MiB
> In: serial
> Out: serial
> Err: serial
> Net: egiga0
> MV88E1318 PHY initialized on egiga0
> Using egiga0 device
> host 192.168.1.245 is alive
> Using egiga0 device
> host 192.168.1.245 is alive

When you boot with serial console there are a lot more output, but in this case you also have netconsole enabled, so it stops here.

So to see all output do either:

1. Change the IP address 192.168.1.245 to something else. Then the output will be only going out to this serial console.
or
2. Use 2 terminals, one for serial console (you already running serial console on one termimal). Run netconsole on the other terminal, and you will see output going out to the 2nd terminal, and the u-boot countdown will appear on it. You can interrrupt u-boot count down and get the envs listing

printenv

And then boot all the way into Debian
boot

You will see netconsole stops outputing, now the 1st terminal will resume like you saw above, starting here.

[    0.000000][    T0] Booting Linux on physical CPU 0x0


There is an env that needs to be adjusted: mtdparts. However, there seems to be more envs that are not quite correct. So after you post the output of printenv at u-boot console, I'll will explain what need to be fixed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 24, 2022 11:33AM
Hi Bohdi,

I have attached the boot sequence by using your proposed method 1). I have omitted the kernel boot as this goes correctly now and the info on mdparts is in the inital part. I have not changed the mdparts per instruction on uboot particular for the zyxal nsa325(v2), was this wrong?


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.2 is not alive
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.2 is not alive
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.2 is not alive
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.2 is not alive
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.2 is not alive
Hit any key to stop autoboot: 10 <0x08><0x08><0x08> 9 <0x08><0x08><0x08> 8 <0x08><0x08><0x08> 7 <0x08><0x08><0x08> 6 <0x08><0x08><0x08> 5 <0x08><0x08><0x08> 4 <0x08><0x08><0x08> 3 <0x08><0x08><0x08> 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage fevices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed
Unknown command 'mmc' - try 'help'

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

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000800	0x0079d7ff	"rootfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
	type:	linux
	guid:	da29896b-485d-432b-97cf-346455d99929

## 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 ...
137 bytes read in 790 ms (0 Bytes/s)

no IDE devices available
Unknown command 'mmc' - try 'help'
importing envs ...
running scan_disk ...
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
device mmc 4:1-
** Bad device mmc 4 **
device mmc 5:1
** Bad device mmc 5 **
device mmc 6:1
** Bad device mmc 6 **
device mmc 7:1
** Bad device mmc 7 **
Scan device usb
device usb 0:1
1 bytes read in 760 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1094 ms (4.7 MiB/s)
loading uInitrd ...
9671091 bytes read in 1096 ms (8.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
14014 bytes read in 1683 ms (7.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02c00000
   Booting using the fdt blob at 0x2c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1f1d4000, end 1fb0d173 ... OK
   Loading Device Tree to 1f1cd000, end 1f1d36bd ... OK

Starting kernel ...

printenv yields

rroot@debian:~# printenv
SHELL=/bin/bash
PWD=/root
LOGNAME=root
MOTD_SHOWN=pam
HOME=/root
LANG=C
SSH_CONNECTION=192.168.1.245 57354 192.168.1.65 22
TERM=vt100
USER=root
SHLVL=1
SSH_CLIENT=192.168.1.245 57354 22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SSH_TTY=/dev/pts/0
_=/usr/bin/printenv



Edited 1 time(s). Last edit at 02/24/2022 11:34AM by LostFile.
Re: NSA325v2 stuck on starting kernel
February 24, 2022 11:47AM
Just to clarify, this is all the info I see using my FTDI connection. Your prior comment seems to indicate that I should see more. I still have the original config settings prior to flashing uboot 2017. I can post these too if needed.
Re: NSA325v2 stuck on starting kernel
February 24, 2022 04:30PM
LostFile, you skipped the part where bodhi said to interrupt u-boot and then type 'printenv'. printenv from within Linux is very different than printenv from u-boot.
Re: NSA325v2 stuck on starting kernel
February 24, 2022 06:45PM
> LostFile, you skipped the part where bodhi said to
> interrupt u-boot and then type 'printenv'.
> printenv from within Linux is very different than
> printenv from u-boot.

Right!

@LostFile,

Hit any key to stop autoboot: 10
Do a printenv here, after you've interrupted the countdown.

And because the envs are not correct, you cannot see u-boot envs in Debian yet.

Quote

Just to clarify, this is all the info I see using my FTDI connection. Your prior comment seems to indicate that I should see more. I still have the original config settings prior to flashing uboot 2017. I can post these too if needed.

Sounds like some envs must be adjusted in serial console (temporarily) and then once you booted into Debian, you can set them permanently.

But first thing first, please post envs listing in serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 25, 2022 02:00AM
Ah gotcha. Here is the correct printenv



U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
NSA325> printenv
printenv
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=28:28:5D:13:EE:E1
if_netconsole=ping $serverip
ipaddr=192.168.1.65
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=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
nc_ready=1
ncip=192.168.1.245
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.245
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=nc
stdin=nc
stdout=nc
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: 3015/131068 bytes
Re: NSA325v2 stuck on starting kernel
February 25, 2022 04:21PM
LostFile,

Boot up again, interrupt serial/net console and,

setenv mtdparts 'mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
And then

boot

Log into Debian. And,

dmesg
cat /proc/mtd
fw_printenv

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



Edited 1 time(s). Last edit at 02/25/2022 04:22PM by bodhi.
Re: NSA325v2 stuck on starting kernel
February 26, 2022 08:48AM
Thanks again for all the help and time. The requested outputs are listed below after setting the mtdparts.


`dmesg`

root@debian:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) init=/bin/systemd
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 490944K/524288K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 33344K reserved, 0K cma-reserved)
[    0.000000] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000049] Switching to timer-based delay loop, resolution 5ns
[    0.000763] Console: colour dummy device 80x30
[    0.000826] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000860] pid_max: default: 32768 minimum: 301
[    0.001191] LSM: Security Framework initializing
[    0.001339] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001379] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002562] CPU: Testing write buffer coherency: ok
[    0.004608] Setting up static identity map for 0x100000 - 0x100058
[    0.004878] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005169] rcu: Hierarchical SRCU implementation.
[    0.006369] devtmpfs: initialized
[    0.012374] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012421] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.040433] prandom32: self test passed (less than 6 bits correlated)
[    0.040472] prandom: seed boundary self test passed
[    0.043612] prandom: 100 self tests passed
[    0.043628] pinctrl core: initialized pinctrl subsystem
[    0.045023] NET: Registered protocol family 16
[    0.045663] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.046445] audit: initializing netlink subsys (disabled)
[    0.047624] thermal_sys: Registered thermal governor 'step_wise'
[    0.047948] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.048105] cpuidle: using governor ladder
[    0.048189] cpuidle: using governor menu
[    0.048634] Feroceon L2: Enabling L2
[    0.048678] Feroceon L2: Cache support initialised.
[    0.057381] No ATAGs?
[    2.560055] random: fast init done
[    3.684679] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.704232] wait_for_initramfs() called before rootfs_initcalls
[    3.890204] raid6: int32x8  gen()   151 MB/s
[    4.060145] raid6: int32x8  xor()    92 MB/s
[    4.230220] raid6: int32x4  gen()   146 MB/s
[    4.400056] raid6: int32x4  xor()    96 MB/s
[    4.570105] raid6: int32x2  gen()   185 MB/s
[    4.740102] raid6: int32x2  xor()   114 MB/s
[    4.910100] raid6: int32x1  gen()   131 MB/s
[    5.080201] raid6: int32x1  xor()    79 MB/s
[    5.080215] raid6: using algorithm int32x2 gen() 185 MB/s
[    5.080226] raid6: .... xor() 114 MB/s, rmw enabled
[    5.080235] raid6: using intx1 recovery algorithm
[    5.080461] vgaarb: loaded
[    5.080926] SCSI subsystem initialized
[    5.081139] libata version 3.00 loaded.
[    5.081365] usbcore: registered new interface driver usbfs
[    5.081425] usbcore: registered new interface driver hub
[    5.081470] usbcore: registered new device driver usb
[    5.081645] pps_core: LinuxPPS API ver. 1 registered
[    5.081657] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.081685] PTP clock support registered
[    5.083189] clocksource: Switched to clocksource orion_clocksource
[    5.163740] VFS: Disk quotas dquot_6.6.0
[    5.163834] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.176920] NET: Registered protocol family 2
[    5.177089] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    5.178134] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.178185] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178255] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    5.178314] TCP: Hash tables configured (established 4096 bind 4096)
[    5.178512] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.178578] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178612] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.178817] NET: Registered protocol family 1
[    5.183700] RPC: Registered named UNIX socket transport module.
[    5.183719] RPC: Registered udp transport module.
[    5.183729] RPC: Registered tcp transport module.
[    5.183738] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.183753] PCI: CLS 0 bytes, default 32
[    5.183915] NetWinder Floating Point Emulator V0.97 (double precision)
[    5.184391] Trying to unpack rootfs image as initramfs...
[    6.505742] Freeing initrd memory: 9448K
[    6.951960] Initialise system trusted keyrings
[    6.952021] Key type blacklist registered
[    6.952256] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    6.952359] zbud: loaded
[    6.953631] NFS: Registering the id_resolver key type
[    6.953668] Key type id_resolver registered
[    6.953680] Key type id_legacy registered
[    6.953719] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    6.953740] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    6.953753] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    6.953985] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    6.954374] fuse: init (API version 7.34)
[    6.954732] orangefs_debugfs_init: called with debug mask: :none: :0:
[    6.954900] orangefs_init: module version upstream loaded
[    6.954915] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    7.034580] xor: measuring software checksum speed
[    7.041204]    arm4regs        :  1493 MB/sec
[    7.052254]    8regs           :   895 MB/sec
[    7.059908]    32regs          :  1289 MB/sec
[    7.059921] xor: using function: arm4regs (1493 MB/sec)
[    7.059940] async_tx: api initialized (async)
[    7.059957] Key type asymmetric registered
[    7.059968] Asymmetric key parser 'x509' registered
[    7.060020] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.060089] io scheduler bfq registered
[    7.209154] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.210717] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    7.210758] mvebu-pcie mbus@f1000000:pcie@82000000: Parsing ranges property...
[    7.210788] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    7.210824] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[    7.210859] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[    7.210892] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    7.210924] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    7.210956] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    7.210981] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    7.211243] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    7.211262] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.211282] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    7.211300] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[    7.211318] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[    7.211334] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    7.211349] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    7.211365] pci_bus 0000:00: scanning bus
[    7.211466] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    7.211499] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    7.212679] pci_bus 0000:00: fixups for bus
[    7.212695] PCI: bus0: Fast back to back transfers disabled
[    7.212713] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    7.212725] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.212745] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    7.212862] pci_bus 0000:01: scanning bus
[    7.212911] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    7.212951] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    7.213103] pci 0000:01:00.0: PME# supported from D0 D3hot
[    7.213124] pci 0000:01:00.0: PME# disabled
[    7.213181] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    7.244211] pci_bus 0000:01: fixups for bus
[    7.244229] PCI: bus1: Fast back to back transfers disabled
[    7.244244] pci_bus 0000:01: bus scan returning with max=01
[    7.244255] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    7.244275] pci_bus 0000:00: bus scan returning with max=01
[    7.244437] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    7.244462] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    7.244484] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    7.244512] pci 0000:00:01.0: PCI bridge to [bus 01]
[    7.244529] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    7.244615] pcieport 0000:00:01.0: assign IRQ: got 0
[    7.244634] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    7.244662] pcieport 0000:00:01.0: enabling bus mastering
[    7.244705] pci 0000:00:01.0: enabling bus mastering
[    7.244719] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    7.245201] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.304025] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.306030] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.364038] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.366298] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.367481] printk: console [ttyS0] disabled
[    7.367562] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    8.503006] printk: console [ttyS0] enabled
[    8.514903] loop: module loaded
[    8.519054] sata_mv f1080000.sata: version 1.28
[    8.519472] sata_mv f1080000.sata: slots 32 ports 2
[    8.528202] scsi host0: sata_mv
[    8.532593] scsi host1: sata_mv
[    8.536698] ata1: SATA max UDMA/133 irq 32
[    8.541517] ata2: SATA max UDMA/133 irq 32
[    8.547153] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    8.554306] nand: Samsung NAND 128MiB 3,3V 8-bit
[    8.559644] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.568184] Scanning device for bad blocks
[    8.601513] Bad eraseblock 275 at 0x000002260000
[    8.665268] Bad eraseblock 840 at 0x000006900000
[    8.689573] 9 cmdlinepart partitions found on MTD device orion_nand
[    8.696581] Creating 9 MTD partitions on "orion_nand":
[    8.702446] 0x000000000000-0x000000100000 : "uboot"
[    8.709305] 0x000000100000-0x000000180000 : "uboot_env"
[    8.716406] 0x000000180000-0x000000200000 : "key_store"
[    8.723504] 0x000000200000-0x000000280000 : "info"
[    8.730101] 0x000000280000-0x000000c80000 : "etc"
[    8.736713] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.743773] 0x000001680000-0x000004640000 : "rootfs1"
[    8.750815] 0x000004640000-0x000005040000 : "kernel_2"
[    8.757854] 0x000005040000-0x000008000000 : "rootfs2"
[    8.765374] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    8.774020] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.785331] libphy: Fixed MDIO Bus: probed
[    8.791376] libphy: orion_mdio_bus: probed
[    8.809819] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.818956] mv643xx_eth: Set the PHY to fix link down
[    8.819512] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 28:28:5d:13:ee:e1
[    8.834998] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.842317] ehci-pci: EHCI PCI platform driver
[    8.847644] ehci-orion: EHCI orion driver
[    8.852539] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.858842] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.867440] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.884282] ata1: SATA link down (SStatus 0 SControl F300)
[    8.903213] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.910229] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.919264] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.927234] usb usb1: Product: EHCI Host Controller
[    8.932835] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    8.940278] usb usb1: SerialNumber: f1050000.ehci
[    8.946277] hub 1-0:1.0: USB hub found
[    8.950789] hub 1-0:1.0: 1 port detected
[    8.956101] xhci_hcd 0000:01:00.0: assign IRQ: got 36
[    8.956177] xhci_hcd 0000:01:00.0: enabling bus mastering
[    8.956192] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    8.962160] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    8.970644] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    8.980473] xhci_hcd 0000:01:00.0: enabling Mem-Wr-Inval
[    8.980933] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    8.990067] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.998046] usb usb2: Product: xHCI Host Controller
[    9.003666] usb usb2: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    9.011097] usb usb2: SerialNumber: 0000:01:00.0
[    9.016972] hub 2-0:1.0: USB hub found
[    9.021495] hub 2-0:1.0: 2 ports detected
[    9.026828] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    9.032795] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    9.040990] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    9.048097] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    9.057227] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
[    9.066255] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.074228] usb usb3: Product: xHCI Host Controller
[    9.079828] usb usb3: Manufacturer: Linux 5.13.6-kirkwood-tld-1 xhci-hcd
[    9.087272] usb usb3: SerialNumber: 0000:01:00.0
[    9.093127] hub 3-0:1.0: USB hub found
[    9.097786] hub 3-0:1.0: 2 ports detected
[    9.103355] usbcore: registered new interface driver usb-storage
[    9.110466] mousedev: PS/2 mouse device common for all mice
[    9.117094] i2c /dev entries driver
[    9.121950] i2c i2c-0: Not using recovery: no suitable method provided
[    9.127825] rtc-pcf8563 0-0051: registered as rtc0
[    9.134632] rtc-pcf8563 0-0051: setting system clock to 2022-02-26T14:45:00 UTC (1645886700)
[    9.145442] device-mapper: uevent: version 1.0.3
[    9.151073] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[    9.160685] device-mapper: multipath round-robin: version 1.2.0 loaded
[    9.168013] device-mapper: multipath queue-length: version 0.2.0 loaded
[    9.175486] device-mapper: multipath service-time: version 0.3.0 loaded
[    9.182908] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    9.189762] device-mapper: raid: Loading target version 1.15.1
[    9.198535] hid: raw HID events driver (C) Jiri Kosina
[    9.204961] drop_monitor: Initializing network drop monitor service
[    9.212359] NET: Registered protocol family 10
[    9.218684] Segment Routing with IPv6
[    9.223144] RPL Segment Routing with IPv6
[    9.227974] NET: Registered protocol family 17
[    9.233175] ata2: SATA link down (SStatus 0 SControl F300)
[    9.239640] Key type dns_resolver registered
[    9.244699] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.252651] registered taskstats version 1
[    9.257589] Loading compiled-in X.509 certificates
[    9.263570] zswap: loaded using pool lzo/zbud
[    9.268940] Key type ._fscrypt registered
[    9.273775] Key type .fscrypt registered
[    9.278416] Key type fscrypt-provisioning registered
[    9.285681] Key type big_key registered
[    9.314505] Key type encrypted registered
[    9.325677] Freeing unused kernel memory: 1024K
[    9.344024] Checked W+X mappings: passed, no W+X pages found
[    9.350433] Run /init as init process
[    9.354851]   with arguments:
[    9.354861]     /init
[    9.354867]   with environment:
[    9.354873]     HOME=/
[    9.354878]     TERM=linux
[    9.465230] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.32
[    9.501067] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    9.513299] usb 1-1: Product: USB2.0 Hub
[    9.530229] hub 1-1:1.0: USB hub found
[    9.545855] hub 1-1:1.0: 4 ports detected
[    9.873276] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   10.045085] usb 1-1.2: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[   10.063300] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.071355] usb 1-1.2: Product:  SanDisk 3.2Gen1
[   10.097121] usb 1-1.2: Manufacturer:  USB
[   10.101866] usb 1-1.2: SerialNumber: 010195469ad7eab96b9b999ccb0402c920976f2d01d754711cd206ddfd5efaacdeee00000000000000000000142d0f5a008f01008355810787ab5425
[   10.128653] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   10.158796] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   10.193392] scsi host2: usb-storage 1-1.2:1.0
[   10.663943] usbcore: registered new interface driver uas
[   11.204656] scsi 2:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[   11.218251] sd 2:0:0:0: [sda] 120127488 512-byte logical blocks: (61.5 GB/57.3 GiB)
[   11.232489] sd 2:0:0:0: [sda] Write Protect is off
[   11.238100] sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
[   11.238850] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   11.256201]  sda: sda1
[   11.266239] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   21.084026] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   21.092907] ttyS ttyS0: 1 input overrun(s)
[   21.317648] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[   22.166826] systemd[1]: Inserted module 'autofs4'
[   22.258485] systemd[1]: systemd 247.3-6 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[   22.282519] systemd[1]: Detected architecture arm.
[   22.335597] systemd[1]: Set hostname to <debian>.
[   24.509932] systemd[1]: Queued start job for default target Graphical Interface.
[   24.521124] random: systemd: uninitialized urandom read (16 bytes read)
[   24.531501] systemd[1]: system-getty.slice: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[   24.545039] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[   24.556794] systemd[1]: Created slice system-getty.slice.
[   24.593622] random: systemd: uninitialized urandom read (16 bytes read)
[   24.602411] systemd[1]: Created slice system-modprobe.slice.
[   24.643575] random: systemd: uninitialized urandom read (16 bytes read)
[   24.652406] systemd[1]: Created slice system-postfix.slice.
[   24.694982] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   24.734415] systemd[1]: Created slice User and Session Slice.
[   24.774379] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   24.813988] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   24.854755] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   24.893728] systemd[1]: Reached target Local Encrypted Volumes.
[   24.934187] systemd[1]: Reached target Slices.
[   24.973654] systemd[1]: Reached target Swap.
[   25.005176] systemd[1]: Listening on RPCbind Server Activation Socket.
[   25.044133] systemd[1]: Listening on fsck to fsckd communication Socket.
[   25.083877] systemd[1]: Listening on initctl Compatibility Named Pipe.
[   25.124743] systemd[1]: Listening on Journal Audit Socket.
[   25.164326] systemd[1]: Listening on Journal Socket (/dev/log).
[   25.204356] systemd[1]: Listening on Journal Socket.
[   25.244458] systemd[1]: Listening on udev Control Socket.
[   25.284363] systemd[1]: Listening on udev Kernel Socket.
[   25.324242] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[   25.337691] systemd[1]: Mounting POSIX Message Queue File System...
[   25.386700] systemd[1]: Mounting NFSD configuration filesystem...
[   25.436894] systemd[1]: Mounting RPC Pipe File System...
[   25.487478] systemd[1]: Mounting Kernel Debug File System...
[   25.537397] systemd[1]: Mounting Kernel Trace File System...
[   25.583854] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[   25.599224] systemd[1]: Starting Create list of static device nodes for the current kernel...
[   25.647826] systemd[1]: Starting Load Kernel Module configfs...
[   25.697663] systemd[1]: Starting Load Kernel Module drm...
[   25.717496] random: crng init done
[   25.722227] random: 7 urandom warning(s) missed due to ratelimiting
[   25.757856] systemd[1]: Starting Load Kernel Module fuse...
[   25.815053] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[   25.825379] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[   25.839539] systemd[1]: Starting Journal Service...
[   25.894328] systemd[1]: Starting Load Kernel Modules...
[   25.927402] systemd[1]: Starting Remount Root and Kernel File Systems...
[   25.977565] systemd[1]: Starting Coldplug All udev Devices...
[   26.096585] systemd[1]: Mounted POSIX Message Queue File System.
[   26.164237] systemd[1]: Mounted NFSD configuration filesystem.
[   26.234579] systemd[1]: Mounted RPC Pipe File System.
[   26.253391] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
[   26.309907] systemd[1]: Mounted Kernel Debug File System.
[   26.374195] systemd[1]: Mounted Kernel Trace File System.
[   26.415388] systemd[1]: Finished Create list of static device nodes for the current kernel.
[   26.465495] systemd[1]: modprobe@configfs.service: Succeeded.
[   26.482156] systemd[1]: Finished Load Kernel Module configfs.
[   26.524253] systemd[1]: Started Journal Service.
[   27.130970] systemd-journald[210]: Received client request to flush runtime journal.
[   29.949887] orion_wdt: Initial timeout 21 sec
[   31.060764] marvell-cesa f1030000.crypto: CESA device successfully registered
[   31.132146] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   32.919706] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   36.223637] NFSD: Using UMH upcall client tracking operations.
[   36.237370] NFSD: starting 90-second grace period (net f000001c)
[   37.475008] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   37.485804] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@debian:~#


`cat /proc/mtd` output:
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

`fw_printenv`
root@debian:~# fw_printenv
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=28:28:5D:13:EE:E1
if_netconsole=ping $serverip
ipaddr=192.168.1.65
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=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.245
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
Re: NSA325v2 stuck on starting kernel
February 26, 2022 04:44PM
LostFile,

Cool! so everything checked out.

Now you can turn off netconsole, since you have serial console (In the furture, when you don't have serial console connect anymore, you can switch back to neconsole)

fw_setenv preboot

And now when you reboot with serial console connected, you will see all u-boot and kernel booting log going out to the console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 26, 2022 07:14PM
Also, you need to set the mtdparts env permanently in Debian

fw_setenv mtdparts 'mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325v2 stuck on starting kernel
February 27, 2022 07:56AM
Hi Bodhi,

I committed the mtdparts to fw_env. Thanks for all the help. As a last request can you shed some light on what that line actually does? I reckon it has something to do with the boot sequence read from the NAND memory?
Re: NSA325v2 stuck on starting kernel
February 27, 2022 03:38PM
LostFile,

It is the NAND mtds layout. We only use the first mtd (mtd0). It is where u-boot image and u-boot envs are stored. So when you have the correct definition, you are able to list and change the envs inside Debian.

The rest of the mtds are stock definition. Those are untouched by the new u-boot and u-boot envs flashing procedure (in case someone would like to flash back the old u-boot and boot back to stock OS).

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