Welcome! Log In Create A New Profile

Advanced

NSA310 with bad blocks in NAND

Posted by Hilsen 
NSA310 with bad blocks in NAND
January 07, 2022 10:22AM
Hello,

I have an NSA310 which has not had alot of use due to the lack support for SMB1 problem.

It has uboot 1.1.4 and Zyxel 4.7 firmware.

Was pleased to discover options available here, but after activating the telnet backdoor and checking the NAND chip as recommended, I see there are bad erase blocks:

/ # dmesg | grep -i 'bad'
Scanning device for bad blocks
Bad eraseblock 2 at 0x000000040000
Bad eraseblock 3 at 0x000000060000
Bad eraseblock 294 at 0x0000024c0000
Bad eraseblock 968 at 0x000007900000


I read in one of the posts that there is a "workaround" for this situation, though I couldn't see exactly what that was. Perhaps secondary booting the system off a usb flash drive from the stock uboot

That brings me to the second stumbling block, having trouble accessing anything on a flash drive inserted into the front panel socket. Generally getting status as follows in the boot log.... (eg from attaching a hub with 2 different fat32 4gb flash drives plugged in attempting to mount to sdb1 and sdc1 during boot)... Subsequently I an LS of the /mnt/sdb1 and /mnt/sdc1 paths just shows an empty directory (though there are files on the disks).

scsi 2:0:0:0: Direct-Access     General  UDISK            5.00 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdb] 7866368 512-byte logical blocks: (4.02 GB/3.75 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Attached SCSI removable disk
scsi 3:0:0:0: Direct-Access     Easy     Disk             1100 PQ: 0 ANSI: 0 CCS
sd 3:0:0:0: [sdc] 7928832 512-byte logical blocks: (4.05 GB/3.78 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Assuming drive cache: write through
sd 3:0:0:0: [sdc] Assuming drive cache: write through
 sdc:
sd 3:0:0:0: Attached scsi generic sg2 type 0
 sdc1
sd 3:0:0:0: [sdc] Assuming drive cache: write through
sd 3:0:0:0: [sdc] Attached SCSI removable disk
sda
sdb
sdc
checking sda
Trying to mount /dev/sda1
mount: /dev/sda1 already mounted or /mnt/parnerkey busy
mount: according to mtab, /dev/sda1 is mounted on /zyxel/mnt/sysdisk
Fail to mount /dev/sda1
checking sdb
Trying to mount /dev/sdb1
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
checking sdc
Trying to mount /dev/sdc1
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Press ENTER to continue...


I have tried a few drives with and without an intermediate hub.

I should say I am somewhat rusty on linux, though used to do a fair amount of embedded development 20 years ago.

Any advice on either of these issues would be appreciated.
Re: NSA310 with bad blocks in NAND
January 07, 2022 04:22PM
Hilsen,

> Was pleased to discover options available here,
> but after activating the telnet backdoor and
> checking the NAND chip as recommended, I see there
> are bad erase blocks:
>
>
> / # dmesg | grep -i 'bad'
> Scanning device for bad blocks
> Bad eraseblock 2 at 0x000000040000
> Bad eraseblock 3 at 0x000000060000
> Bad eraseblock 294 at 0x0000024c0000
> Bad eraseblock 968 at 0x000007900000
>

> I read in one of the posts that there is a
> "workaround" for this situation, though I couldn't
> see exactly what that was.

You have bad blocks in mtd0, where u-boot image is. So you should only flash the new u-boot with lots of precaution. In some instance it is not possible to install new u-boot. That what I meant by "work-around", I need to explain what you should do before flashing.

1. Try booting wtih UART. This requires you to connect serial console. Example:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

Use the nsa310 u-boot image (uboot.2017.07-tld-1.nsa310.mtd0.kwb) from the u-boot release thread to run kwboot.

Once you have successfully load the new u-boot over UART and it runs OK, then you have a recovery path (the box almost unbrickable when you can do this).

2. If UART booting works, then create a new rootfs on USB using Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2. See the kernel release thread.


3. Boot with the new Debian rootfs. So plug in the USB rootfs, and then run kwboot to load and execute the new u-boot. It should boot straight from this new u-boot into Debian.


4. Come back and I will check a few things on your box as it is running new kernel and rootfs. And then I will recommend what to do next.


====

Regarding the HDD/USB problem.

Check if the disks were mounted (I am sure they were not mounted):

mount

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



Edited 1 time(s). Last edit at 01/07/2022 04:25PM by bodhi.
Re: NSA310 with bad blocks in NAND
January 09, 2022 12:50PM
Hello Bodhi,
Many thanks for the reply.

I succesfully connected a serial port and downloaded the recommended uboot version (initially omitted the -p patch option in kwboot args which had me perplexed for a little while... (renamed file to uboot.kwb for convenience).


root@M4A88:/home/tim/Downloads/kwboot-tool# kwboot -b uboot.kwb /dev/ttyUSB0 -t -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
 . 
 .
 .
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
NSA310> version

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 

gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA310>

I also found a USB flash drive which appears to work...

NSA310> usb reset
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
NSA310> fatinfo usb 0
Interface:  USB
  Device 0: Vendor: General  Rev: 5.00 Prod: UDISK           
            Type: Removable Hard Disk
            Capacity: 3841.0 MB = 3.7 GB (7866368 x 512)
Filesystem: FAT16 "           "
NSA310> ls usb 0
        5   fileonfat 
            system volume information/
        5   fileonfat (copy) 

2 file(s), 1 dir(s)

NSA310>

There is a short test file "fileonfat" showing on the fat flash drive.

What would you recommend the next steps to proceed from here?

Many thanks,
Hilsen
Re: NSA310 with bad blocks in NAND
January 09, 2022 04:50PM
Hilsen,

Cool! You can go ahead with number 3.

Quote

3. Boot with the new Debian rootfs. So plug in the USB rootfs, and then run kwboot to load and execute the new u-boot. It should boot straight from this new u-boot into Debian.

Create the rootfs using the tarball Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2, as described in the release thread

Scroll down to section (26 Sept 2021)

Quote

Updated 26 Sept 2021:

Basic Debian bullseye Kirkwood rootfs for most Kirwood plugs:

- tarball size: 234M
- install size: 668M
- The init system used in this rootfs is sysvinit . To boot with systemd, see Notes below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls examples in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

And attach the rootfs ot the box, run kwboot like you did, and this time it should boot into Debian on USB. The default envs in this u-boot should be OK to boot without any modification.

=========

And then for number 4

Quote

4. Come back and I will check a few things on your box as it is running new kernel and rootfs. And then I will recommend what to do next.

If all goes well, come back and post the entire serial boot log. I will double check a few things before you should attempt to install u-boot.

The settings such the following will need to be correct, and the bad blocks location as recognized by the Debian kernel.

cat /proc/mtd
cat /etc/fw_env.config
dmesg | grep -i bad
And also might be other info in dmesg (serial boot log already includes dmesg).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 10, 2022 01:11PM
Hi Bodhi,

Apologies for stalling before step 3,4 earlier...

Did manage to create usb drive with rootfs and boot via KWBOOT and the updated uboot.

Debian kernel loaded and started but stopped shortly after 11s with a Kernel Panic as shown below.

I see there is an error before kernel execution
** File not found /boot/uEnv.txt **
does that mean there are missing env settings?

This also maybe significant...
[ 11.044129][ T1] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 11.052362][ T1] Please append a correct "root=" boot option; here are the available partitions:

Any ideas?

Note:

I used the plain NSA310 file though it's possible I have the lmsensor-redusbled version but I don't think that would be a dealbreaker here. I can see an LM96000 temp monitor on the motherboard.

Did not modify fstab for ext2 (from default ext3) - though I formatted the drive as ext2 on another windows pc using a partition manager tool as I had a couple of fails with ext3, ext4 creations of the drive on using my default linux mint 20.2 box. On my mint machine it now identifies as an ext4 partition anyway, which is weird.

Again, many thanks, very much appreciate you helping me get this far.

Hilsen



(kwboot loading)
97 % [......................................................................]
99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
starting 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

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD20EARX-00PASB0 Firm: 51.0AB51 Ser#:  WD-WCAZAC605752
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	8064      	15241344  	a3d3eead-01	83 Boot

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

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

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	1028097   	00000000-01	08
  2	1028160   	3905995905	00000000-02	09
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 784 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5448160 bytes read in 1129 ms (4.6 MiB/s)
loading uInitrd ...
EHCI timed out on TD - token=0x90008d80
9671091 bytes read in 6633 ms (1.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310.dtb ...
12580 bytes read in 954 ms (12.7 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2022-01-10  18:05:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5448096 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 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1d4000, end 0fb0d173 ... OK
   Loading Device Tree to 0f1cd000, end 0f1d3123 ... OK

Starting kernel ...

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 NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 240500K/262144K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 21644K 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.000061][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000925][    T0] Console: colour dummy device 80x30
[    0.001001][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001042][    T0] pid_max: default: 32768 minimum: 301
[    0.001443][    T0] LSM: Security Framework initializing
[    0.001625][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001673][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003126][    T0] CPU: Testing write buffer coherency: ok
[    0.005514][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005844][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006181][    T1] rcu: Hierarchical SRCU implementation.
[    0.007591][    T1] devtmpfs: initialized
[    0.013985][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014041][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.051357][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.051401][    T1] prandom: seed boundary self test passed
[    0.055587][    T1] prandom: 100 self tests passed
[    0.055606][    T1] pinctrl core: initialized pinctrl subsystem
[    0.057222][    T1] NET: Registered protocol family 16
[    0.057893][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.058892][    T1] audit: initializing netlink subsys (disabled)
[    0.060418][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.060795][   T16] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.060957][    T1] cpuidle: using governor ladder
[    0.061055][    T1] cpuidle: using governor menu
[    0.061472][    T1] Feroceon L2: Enabling L2
[    0.061527][    T1] Feroceon L2: Cache support initialised.
[    0.071723][    T1] No ATAGs?
[    2.560068][    C0] random: fast init done
[    4.933049][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    4.958752][   T59] wait_for_initramfs() called before rootfs_initcalls
[    5.150158][    T1] raid6: int32x8  gen()   109 MB/s
[    5.320233][    T1] raid6: int32x8  xor()    69 MB/s
[    5.490277][    T1] raid6: int32x4  gen()   109 MB/s
[    5.660202][    T1] raid6: int32x4  xor()    72 MB/s
[    5.830134][    T1] raid6: int32x2  gen()   140 MB/s
[    6.000107][    T1] raid6: int32x2  xor()    85 MB/s
[    6.170110][    T1] raid6: int32x1  gen()    99 MB/s
[    6.340198][    T1] raid6: int32x1  xor()    58 MB/s
[    6.340217][    T1] raid6: using algorithm int32x2 gen() 140 MB/s
[    6.340232][    T1] raid6: .... xor() 85 MB/s, rmw enabled
[    6.340244][    T1] raid6: using intx1 recovery algorithm
[    6.340540][    T1] vgaarb: loaded
[    6.341131][    T1] SCSI subsystem initialized
[    6.341667][    T1] usbcore: registered new interface driver usbfs
[    6.341756][    T1] usbcore: registered new interface driver hub
[    6.341816][    T1] usbcore: registered new device driver usb
[    6.342028][    T1] pps_core: LinuxPPS API ver. 1 registered
[    6.342046][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.342081][    T1] PTP clock support registered
[    6.343887][    T1] clocksource: Switched to clocksource orion_clocksource
[    6.444564][    T1] VFS: Disk quotas dquot_6.6.0
[    6.444678][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    6.461216][    T1] NET: Registered protocol family 2
[    6.461405][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    6.474336][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    6.474394][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474444][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474485][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    6.474730][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    6.474812][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.474852][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.475095][    T1] NET: Registered protocol family 1
[    6.475868][    T1] RPC: Registered named UNIX socket transport module.
[    6.475891][    T1] RPC: Registered udp transport module.
[    6.475904][    T1] RPC: Registered tcp transport module.
[    6.475916][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.475934][    T1] PCI: CLS 0 bytes, default 32
[    6.476022][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.955291][    T1] Initialise system trusted keyrings
[    7.955371][    T1] Key type blacklist registered
[    7.955646][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    7.955773][    T1] zbud: loaded
[    7.957323][    T1] NFS: Registering the id_resolver key type
[    7.957368][    T1] Key type id_resolver registered
[    7.957384][    T1] Key type id_legacy registered
[    7.957431][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.957457][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    7.957473][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    7.957752][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.958252][    T1] fuse: init (API version 7.34)
[    7.958678][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    7.958903][    T1] orangefs_init: module version upstream loaded
[    7.958924][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    8.060777][    T1] xor: measuring software checksum speed
[    8.069698][    T1]    arm4regs        :  1119 MB/sec
[    8.084455][    T1]    8regs           :   671 MB/sec
[    8.094597][    T1]    32regs          :   976 MB/sec
[    8.094615][    T1] xor: using function: arm4regs (1119 MB/sec)
[    8.094639][    T1] async_tx: api initialized (async)
[    8.094660][    T1] Key type asymmetric registered
[    8.094674][    T1] Asymmetric key parser 'x509' registered
[    8.094740][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    8.094841][    T1] io scheduler bfq registered
[    8.293457][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    8.295523][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    8.295618][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    8.295666][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    8.295701][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    8.296014][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    8.296040][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.296065][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    8.296088][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    8.296108][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    8.296247][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    8.296288][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    8.297709][    T1] PCI: bus0: Fast back to back transfers disabled
[    8.297746][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    8.297986][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    8.298024][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    8.298061][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    8.298092][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    8.298119][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    8.298236][    T1] pci 0000:01:00.0: supports D1 D2
[    8.298256][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    8.325104][    T1] PCI: bus1: Fast back to back transfers disabled
[    8.325139][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    8.325363][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    8.325393][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    8.325416][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    8.325447][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    8.325472][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    8.325505][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    8.325537][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    8.325562][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    8.325582][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    8.325604][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    8.325735][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    8.326325][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.385012][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.387664][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.444996][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.447897][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.449389][    T1] printk: console [ttyS0] disabled
[    8.449492][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    9.534882][    T1] printk: console [ttyS0] enabled
[    9.548792][    T1] loop: module loaded
[    9.553502][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    9.562957][    T1] scsi host0: sata_mv
[    9.567564][    T1] scsi host1: sata_mv
[    9.571693][    T1] ata1: SATA max UDMA/133 irq 32
[    9.576578][    T1] ata2: SATA max UDMA/133 irq 32
[    9.582365][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    9.589532][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[    9.594895][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    9.603501][    T1] Scanning device for bad blocks
[    9.608628][    T1] Bad eraseblock 2 at 0x000000040000
[    9.613852][    T1] Bad eraseblock 3 at 0x000000060000
[    9.650107][    T1] Bad eraseblock 294 at 0x0000024c0000
[    9.727484][    T1] Bad eraseblock 968 at 0x000007900000
[    9.738797][    T1] 9 fixed-partitions partitions found on MTD device orion_nand
[    9.746258][    T1] Creating 9 MTD partitions on "orion_nand":
[    9.752126][    T1] 0x000000000000-0x000000100000 : "uboot"
[    9.759332][    T1] 0x000000100000-0x000000180000 : "uboot_env"
[    9.766856][    T1] 0x000000180000-0x000000200000 : "key_store"
[    9.774356][    T1] 0x000000200000-0x000000280000 : "info"
[    9.781399][    T1] 0x000000280000-0x000000c80000 : "etc"
[    9.788411][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    9.795850][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    9.803319][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    9.810829][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[    9.818880][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    9.827538][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    9.839155][    T1] libphy: Fixed MDIO Bus: probed
[    9.845078][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.852411][    T1] ehci-pci: EHCI PCI platform driver
[    9.857691][    T1] ehci-orion: EHCI orion driver
[    9.862650][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    9.868960][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    9.877599][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    9.913938][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    9.921100][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    9.930146][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.938132][    T1] usb usb1: Product: EHCI Host Controller
[    9.943736][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    9.951194][    T1] usb usb1: SerialNumber: f1050000.ehci
[    9.957356][    T1] hub 1-0:1.0: USB hub found
[    9.961881][    T1] hub 1-0:1.0: 1 port detected
[    9.967425][    T1] usbcore: registered new interface driver usb-storage
[    9.974636][    T1] mousedev: PS/2 mouse device common for all mice
[    9.982002][    T1] rtc-mv f1010300.rtc: registered as rtc0
[    9.987717][    T1] rtc-mv f1010300.rtc: setting system clock to 2000-01-05T02:04:48 UTC (947037888)
[    9.997244][    T1] i2c /dev entries driver
[   10.003307][    T1] device-mapper: uevent: version 1.0.3
[   10.009026][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   10.018715][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   10.026050][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   10.033405][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   10.040849][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.047700][    T1] device-mapper: raid: Loading target version 1.15.1
[   10.056891][    T1] hid: raw HID events driver (C) Jiri Kosina
[   10.063381][    T1] drop_monitor: Initializing network drop monitor service
[   10.070902][    T1] NET: Registered protocol family 10
[   10.077341][    T1] Segment Routing with IPv6
[   10.081729][    T1] RPL Segment Routing with IPv6
[   10.086567][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   10.093842][    T1] NET: Registered protocol family 17
[   10.099419][    T1] Key type dns_resolver registered
[   10.105096][    T1] registered taskstats version 1
[   10.109927][    T1] Loading compiled-in X.509 certificates
[   10.115924][    T1] zswap: loaded using pool lzo/zbud
[   10.121371][    T1] Key type ._fscrypt registered
[   10.126455][    T1] Key type .fscrypt registered
[   10.131241][    T1] Key type fscrypt-provisioning registered
[   10.139014][    T1] Key type big_key registered
[   10.147820][    T1] Key type encrypted registered
[   10.253917][  T103] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.455731][  T103] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   10.464820][  T103] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   10.472727][  T103] usb 1-1: Product: USB2.0 Hub
[   10.478310][  T103] hub 1-1:1.0: USB hub found
[   10.483108][  T103] hub 1-1:1.0: 4 ports detected
[   10.553993][   T94] ata1.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[   10.561444][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   10.626267][   T94] ata1.00: configured for UDMA/133
[   10.641798][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EARX-00P AB51 PQ: 0 ANSI: 5
[   10.651969][   T58] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   10.660984][   T58] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   10.667121][   T58] sd 0:0:0:0: [sda] Write Protect is off
[   10.672781][   T58] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   10.701279][   T58]  sda: sda1 sda2
[   10.707009][   T58] sd 0:0:0:0: [sda] Attached SCSI disk
[   10.803918][  T102] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   10.961993][  T102] usb 1-1.2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   10.971164][  T102] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.979259][  T102] usb 1-1.2: Product: DataTraveler 2.0
[   10.984646][  T102] usb 1-1.2: Manufacturer: Kingston
[   10.989758][  T102] usb 1-1.2: SerialNumber: C86000BDB983B0B02A2213A7
[   10.996282][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[   11.003463][  T102] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   11.011111][  T102] scsi host2: usb-storage 1-1.2:1.0
[   11.016267][    T1] md: Waiting for all devices to be available before autodetect
[   11.023810][    T1] md: If you don't use raid, use raid=noautodetect
[   11.030899][    T1] md: Autodetecting RAID arrays.
[   11.035752][    T1] md: autorun ...
[   11.039263][    T1] md: ... autorun DONE.
[   11.044129][    T1] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   11.052362][    T1] Please append a correct "root=" boot option; here are the available partitions:
[   11.061540][    T1] 1f00            1024 mtdblock0 
[   11.061552][    T1]  (driver?)
[   11.069612][    T1] 1f01             512 mtdblock1 
[   11.069623][    T1]  (driver?)
[   11.077655][    T1] 1f02             512 mtdblock2 
[   11.077666][    T1]  (driver?)
[   11.085674][    T1] 1f03             512 mtdblock3 
[   11.085684][    T1]  (driver?)
[   11.093655][    T1] 1f04           10240 mtdblock4 
[   11.093664][    T1]  (driver?)
[   11.101681][    T1] 1f05           10240 mtdblock5 
[   11.101692][    T1]  (driver?)
[   11.109708][    T1] 1f06           48896 mtdblock6 
[   11.109719][    T1]  (driver?)
[   11.117724][    T1] 1f07           10240 mtdblock7 
[   11.117734][    T1]  (driver?)
[   11.125848][    T1] 1f08           48896 mtdblock8 
[   11.125861][    T1]  (driver?)
[   11.133828][    T1] 0800      1953514584 sda 
[   11.133838][    T1]  driver: sd
[   11.141398][    T1]   0801          514048 sda1 00000000-01
[   11.141408][    T1] 
[   11.149218][    T1]   0802      1952997952 sda2 00000000-02
[   11.149229][    T1] 
[   11.157054][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   11.166063][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.13.6-kirkwood-tld-1 #1.0
[   11.174021][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   11.181024][    T1] [<8010e0a4>] (unwind_backtrace) from [<8010a8ac>] (show_stack+0x10/0x14)
[   11.189528][    T1] [<8010a8ac>] (show_stack) from [<80afddf4>] (panic+0xfc/0x328)
[   11.197159][    T1] [<80afddf4>] (panic) from [<81101ad0>] (mount_block_root+0x1e0/0x26c)
[   11.205398][    T1] [<81101ad0>] (mount_block_root) from [<81101c4c>] (mount_root+0xf0/0x120)
[   11.213978][    T1] [<81101c4c>] (mount_root) from [<81101dc0>] (prepare_namespace+0x144/0x180)
[   11.222732][    T1] [<81101dc0>] (prepare_namespace) from [<811015e4>] (kernel_init_freeable+0x1d0/0x234)
[   11.232360][    T1] [<811015e4>] (kernel_init_freeable) from [<80b091cc>] (kernel_init+0x8/0x118)
[   11.241298][    T1] [<80b091cc>] (kernel_init) from [<80100148>] (ret_from_fork+0x14/0x2c)
[   11.249616][    T1] Exception stack(0x8149ffb0 to 0x8149fff8)
[   11.255392][    T1] ffa0:                                     00000000 00000000 00000000 00000000
[   11.264314][    T1] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   11.273233][    T1] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   11.280594][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
Re: NSA310 with bad blocks in NAND
January 10, 2022 04:09PM
Hilsen,

Cool! you're almost there.

The reason for the kernel panic is that you should not do Step 4 while creating the rootfs.

https://forum.doozan.com/read.php?2,12096

Quote

4. (Stock u-boot only) Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time, or running kwboot with latest u-boot image).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.13.6-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.13.6-kirkwood-tld-1 -d zImage.fdt uImage
sync

You're booting with the new u-boot using kwboot. The uImage must be the original, so reverse Step 4 (mount the rootfs on another Linux box at /media/sdb1).

cd /media/sdb1/boot
cp -a uImage.orig uImage
sync

And boot the NSA310 again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 10, 2022 05:22PM
Thanks Bodhi, switched to the original uImage :)

That corrected the boot through to the debian shell and root login, though not everything is quite clear in my head at the moment!

I notice the network has not come up, not sure why that is? Eth led light but goes out about 13s into kernel boot.

Startup dump and dmesg output are below...

What would you recommend now?

Cheers,
Hilsen

99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
starting 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

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD20EARX-00PASB0 Firm: 51.0AB51 Ser#:  WD-WCAZAC605752
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

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

Part	Start Sector	Num Sectors	UUID		Type
  1	8064      	15241344  	a3d3eead-01	83 Boot

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

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

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

Part	Start Sector	Num Sectors	UUID		Type
  1	63        	1028097   	00000000-01	08
  2	1028160   	3905995905	00000000-02	09
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 784 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1129 ms (4.6 MiB/s)
loading uInitrd ...
EHCI timed out on TD - token=0x90008d80
9671091 bytes read in 6633 ms (1.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310.dtb ...
12580 bytes read in 953 ms (12.7 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 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1d4000, end 0fb0d173 ... OK
   Loading Device Tree to 0f1cd000, end 0f1d3123 ... OK

Starting kernel ...

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 NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 231044K/262144K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 31100K 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.000059][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000927][    T0] Console: colour dummy device 80x30
[    0.001003][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001045][    T0] pid_max: default: 32768 minimum: 301
[    0.001448][    T0] LSM: Security Framework initializing
[    0.001631][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001679][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003110][    T0] CPU: Testing write buffer coherency: ok
[    0.005498][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005830][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006171][    T1] rcu: Hierarchical SRCU implementation.
[    0.007592][    T1] devtmpfs: initialized
[    0.014369][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014425][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.051742][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.051787][    T1] prandom: seed boundary self test passed
[    0.055972][    T1] prandom: 100 self tests passed
[    0.055990][    T1] pinctrl core: initialized pinctrl subsystem
[    0.057627][    T1] NET: Registered protocol family 16
[    0.058422][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.059367][    T1] audit: initializing netlink subsys (disabled)
[    0.060878][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.061262][   T16] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.061446][    T1] cpuidle: using governor ladder
[    0.061547][    T1] cpuidle: using governor menu
[    0.062077][    T1] Feroceon L2: Enabling L2
[    0.062131][    T1] Feroceon L2: Cache support initialised.
[    0.072609][    T1] No ATAGs?
[    2.560067][    C0] random: fast init done
[    4.934119][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    4.959783][   T59] wait_for_initramfs() called before rootfs_initcalls
[    5.150151][    T1] raid6: int32x8  gen()   109 MB/s
[    5.320225][    T1] raid6: int32x8  xor()    69 MB/s
[    5.490277][    T1] raid6: int32x4  gen()   109 MB/s
[    5.660106][    T1] raid6: int32x4  xor()    72 MB/s
[    5.830198][    T1] raid6: int32x2  gen()   138 MB/s
[    6.000144][    T1] raid6: int32x2  xor()    85 MB/s
[    6.170071][    T1] raid6: int32x1  gen()    99 MB/s
[    6.340262][    T1] raid6: int32x1  xor()    59 MB/s
[    6.340281][    T1] raid6: using algorithm int32x2 gen() 138 MB/s
[    6.340295][    T1] raid6: .... xor() 85 MB/s, rmw enabled
[    6.340308][    T1] raid6: using intx1 recovery algorithm
[    6.340587][    T1] vgaarb: loaded
[    6.341173][    T1] SCSI subsystem initialized
[    6.341731][    T1] usbcore: registered new interface driver usbfs
[    6.341808][    T1] usbcore: registered new interface driver hub
[    6.341867][    T1] usbcore: registered new device driver usb
[    6.342093][    T1] pps_core: LinuxPPS API ver. 1 registered
[    6.342111][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.342147][    T1] PTP clock support registered
[    6.344019][    T1] clocksource: Switched to clocksource orion_clocksource
[    6.444700][    T1] VFS: Disk quotas dquot_6.6.0
[    6.444814][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    6.461121][    T1] NET: Registered protocol family 2
[    6.461314][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    6.474477][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    6.474535][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474585][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474626][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    6.474872][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    6.474953][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.474994][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.475235][    T1] NET: Registered protocol family 1
[    6.476007][    T1] RPC: Registered named UNIX socket transport module.
[    6.476031][    T1] RPC: Registered udp transport module.
[    6.476044][    T1] RPC: Registered tcp transport module.
[    6.476056][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.476075][    T1] PCI: CLS 0 bytes, default 32
[    6.476260][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.476866][   T58] Trying to unpack rootfs image as initramfs...
[    8.192808][   T58] Freeing initrd memory: 9448K
[    8.820359][    T1] Initialise system trusted keyrings
[    8.820431][    T1] Key type blacklist registered
[    8.820703][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    8.820833][    T1] zbud: loaded
[    8.822353][    T1] NFS: Registering the id_resolver key type
[    8.822400][    T1] Key type id_resolver registered
[    8.822416][    T1] Key type id_legacy registered
[    8.822463][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    8.822489][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    8.822505][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    8.822787][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    8.823280][    T1] fuse: init (API version 7.34)
[    8.823723][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    8.823947][    T1] orangefs_init: module version upstream loaded
[    8.823969][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    8.925690][    T1] xor: measuring software checksum speed
[    8.934592][    T1]    arm4regs        :  1119 MB/sec
[    8.949333][    T1]    8regs           :   671 MB/sec
[    8.959475][    T1]    32regs          :   976 MB/sec
[    8.959495][    T1] xor: using function: arm4regs (1119 MB/sec)
[    8.959518][    T1] async_tx: api initialized (async)
[    8.959539][    T1] Key type asymmetric registered
[    8.959553][    T1] Asymmetric key parser 'x509' registered
[    8.959617][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    8.959699][    T1] io scheduler bfq registered
[    9.158413][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.160408][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    9.160500][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    9.160548][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.160583][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.160906][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    9.160931][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.160956][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    9.160979][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.160999][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    9.161141][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    9.161182][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    9.162633][    T1] PCI: bus0: Fast back to back transfers disabled
[    9.162671][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.162901][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    9.162939][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    9.162977][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    9.163009][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    9.163036][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    9.163153][    T1] pci 0000:01:00.0: supports D1 D2
[    9.163173][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    9.185272][    T1] PCI: bus1: Fast back to back transfers disabled
[    9.185308][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    9.185534][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.185564][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    9.185587][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    9.185617][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    9.185642][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    9.185675][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    9.185707][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    9.185733][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.185753][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    9.185776][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.185908][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    9.186485][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    9.245156][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.247797][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    9.305126][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.307986][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    9.309494][    T1] printk: console [ttyS0] disabled
[    9.309597][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   10.424581][    T1] printk: console [ttyS0] enabled
[   10.438474][    T1] loop: module loaded
[   10.443186][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   10.452673][    T1] scsi host0: sata_mv
[   10.457281][    T1] scsi host1: sata_mv
[   10.461423][    T1] ata1: SATA max UDMA/133 irq 32
[   10.466310][    T1] ata2: SATA max UDMA/133 irq 32
[   10.472087][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   10.479255][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[   10.484619][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.493239][    T1] Scanning device for bad blocks
[   10.498370][    T1] Bad eraseblock 2 at 0x000000040000
[   10.503592][    T1] Bad eraseblock 3 at 0x000000060000
[   10.539868][    T1] Bad eraseblock 294 at 0x0000024c0000
[   10.617242][    T1] Bad eraseblock 968 at 0x000007900000
[   10.628510][    T1] 9 cmdlinepart partitions found on MTD device orion_nand
[   10.635535][    T1] Creating 9 MTD partitions on "orion_nand":
[   10.641405][    T1] 0x000000000000-0x000000100000 : "uboot"
[   10.648589][    T1] 0x000000100000-0x000000180000 : "stock_uboot_env"
[   10.656551][    T1] 0x000000180000-0x000000200000 : "key_store"
[   10.663956][    T1] 0x000000200000-0x000000280000 : "info"
[   10.670967][    T1] 0x000000280000-0x000000c80000 : "etc"
[   10.677928][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[   10.685318][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[   10.692720][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[   10.700175][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[   10.708182][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   10.716834][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   10.728443][    T1] libphy: Fixed MDIO Bus: probed
[   10.734386][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.741731][    T1] ehci-pci: EHCI PCI platform driver
[   10.747015][    T1] ehci-orion: EHCI orion driver
[   10.751973][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.758283][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.766920][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.794051][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.801167][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   10.810292][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.818284][    T1] usb usb1: Product: EHCI Host Controller
[   10.823894][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   10.831351][    T1] usb usb1: SerialNumber: f1050000.ehci
[   10.837506][    T1] hub 1-0:1.0: USB hub found
[   10.842032][    T1] hub 1-0:1.0: 1 port detected
[   10.847537][    T1] usbcore: registered new interface driver usb-storage
[   10.854782][    T1] mousedev: PS/2 mouse device common for all mice
[   10.862125][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   10.867840][    T1] rtc-mv f1010300.rtc: setting system clock to 2000-01-05T06:02:50 UTC (947052170)
[   10.877371][    T1] i2c /dev entries driver
[   10.883458][    T1] device-mapper: uevent: version 1.0.3
[   10.889176][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   10.898833][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   10.906162][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   10.913509][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   10.920954][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.927804][    T1] device-mapper: raid: Loading target version 1.15.1
[   10.937244][    T1] hid: raw HID events driver (C) Jiri Kosina
[   10.943496][    T1] drop_monitor: Initializing network drop monitor service
[   10.951066][    T1] NET: Registered protocol family 10
[   10.957487][    T1] Segment Routing with IPv6
[   10.961878][    T1] RPL Segment Routing with IPv6
[   10.966779][    T1] NET: Registered protocol family 17
[   10.972166][    T1] Key type dns_resolver registered
[   10.977233][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   10.985047][    T1] registered taskstats version 1
[   10.989898][    T1] Loading compiled-in X.509 certificates
[   10.996058][    T1] zswap: loaded using pool lzo/zbud
[   11.001661][    T1] Key type ._fscrypt registered
[   11.006476][    T1] Key type .fscrypt registered
[   11.011119][    T1] Key type fscrypt-provisioning registered
[   11.018875][    T1] Key type big_key registered
[   11.056888][    T1] Key type encrypted registered
[   11.134051][  T102] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.335804][  T102] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   11.344761][  T102] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   11.352664][  T102] usb 1-1: Product: USB2.0 Hub
[   11.358277][  T102] hub 1-1:1.0: USB hub found
[   11.363307][  T102] hub 1-1:1.0: 4 ports detected
[   11.474127][   T94] ata1.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[   11.481573][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   11.546396][   T94] ata1.00: configured for UDMA/133
[   11.561946][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EARX-00P AB51 PQ: 0 ANSI: 5
[   11.572075][   T81] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   11.581112][   T81] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   11.587239][   T81] sd 0:0:0:0: [sda] Write Protect is off
[   11.592921][   T81] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   11.622666][   T81]  sda: sda1 sda2
[   11.628228][   T81] sd 0:0:0:0: [sda] Attached SCSI disk
[   11.694060][   T17] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   11.852192][   T17] usb 1-1.2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   11.861357][   T17] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.869454][   T17] usb 1-1.2: Product: DataTraveler 2.0
[   11.874841][   T17] usb 1-1.2: Manufacturer: Kingston
[   11.879951][   T17] usb 1-1.2: SerialNumber: C86000BDB983B0B02A2213A7
[   11.887264][   T17] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   11.894963][   T17] scsi host2: usb-storage 1-1.2:1.0
[   11.915339][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[   11.934667][    T1] Freeing unused kernel memory: 1024K
[   11.940785][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.947223][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   12.851317][  T145] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   12.967551][   T58] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[   12.985996][   T81] sd 2:0:0:0: [sdb] 15249408 512-byte logical blocks: (7.81 GB/7.27 GiB)
[   13.001618][   T81] sd 2:0:0:0: [sdb] Write Protect is off
[   13.013743][   T81] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   13.039736][   T81]  sdb: sdb1
[   13.049108][   T81] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   13.076077][  T145] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   13.161402][  T145] libphy: r8169: probed
[   13.173393][  T145] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 38
[   13.215912][  T146] usbcore: registered new interface driver uas
[   13.222072][  T145] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[   13.743502][  T139] r8169 0000:01:00.0 enp1s0: renamed from eth0
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.36.1
[/sbin/fsck.ext3 (1) -- /dev/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: ignoring check interval, broken_system_clock set
rootfs: clean, 15634/953440 files, 237490/1905168 blocks
done.
[   24.336044][  T168] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   24.515772][  T168] EXT4-fs (sdb1): 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.852356][  T354] orion_wdt: Initial timeout 21 sec
[   27.885655][    C0] random: crng init done
[   27.971113][  T356] hwmon_vid: Unknown VRM version of your CPU
[   28.037547][  T356] adt7475 0-002e: ADT7476 device, revision 1
[   28.089800][  T356] adt7475 0-002e: Optional features: in0 in4 pwm2 vid
[   28.133699][  T358] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   28.210990][  T356] adt7475 0-002e: Bypassing attenuators on: in0 in1 in3 in4
[   28.264754][  T358] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   28.420298][  T360] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   29.721535][  T508] EXT4-fs (sdb1): 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....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
ifup: failed to bring up eth0
failed.
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.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1036 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshdsshd: no hostkeys available -- exiting.
 failed!
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1066 (klogd)
.
Running local boot scripts (/etc/rc.local)
ssh-keygen: generating new host keys: RSA 
DSA 
ECDSA 
ED25519 

Starting OpenBSD Secure Shell server: sshd
.
.

Debian GNU/Linux 11 debian ttyS0

debian login: root
Password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Sep 25 19:53:59 PDT 2021 from 192.168.0.100 on pts/0
debian
ZyXEL NSA310
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
Debian 11.0
Tue Jan 4 22:03:39 PST 2000 up 0 minutes



root@debian:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=115520k,nr_inodes=28880,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24152k,mode=755)
/dev/sdb1 on / type ext3 (rw,noatime,errors=remount-ro)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=48300k)
tmpfs on /tmp type tmpfs (rw,relatime)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)



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 NSA310
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    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: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 231044K/262144K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 31100K 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.000060] Switching to timer-based delay loop, resolution 5ns
[    0.000926] Console: colour dummy device 80x30
[    0.001002] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001044] pid_max: default: 32768 minimum: 301
[    0.001447] LSM: Security Framework initializing
[    0.001630] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001678] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003111] CPU: Testing write buffer coherency: ok
[    0.005497] Setting up static identity map for 0x100000 - 0x100058
[    0.005829] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006171] rcu: Hierarchical SRCU implementation.
[    0.007599] devtmpfs: initialized
[    0.014371] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014426] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.051739] prandom32: self test passed (less than 6 bits correlated)
[    0.051784] prandom: seed boundary self test passed
[    0.055971] prandom: 100 self tests passed
[    0.055991] pinctrl core: initialized pinctrl subsystem
[    0.057619] NET: Registered protocol family 16
[    0.058413] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.059356] audit: initializing netlink subsys (disabled)
[    0.060867] thermal_sys: Registered thermal governor 'step_wise'
[    0.061256] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.061439] cpuidle: using governor ladder
[    0.061539] cpuidle: using governor menu
[    0.062069] Feroceon L2: Enabling L2
[    0.062123] Feroceon L2: Cache support initialised.
[    0.072596] No ATAGs?
[    2.560066] random: fast init done
[    4.934114] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    4.959790] wait_for_initramfs() called before rootfs_initcalls
[    5.150144] raid6: int32x8  gen()   109 MB/s
[    5.320155] raid6: int32x8  xor()    69 MB/s
[    5.490206] raid6: int32x4  gen()   109 MB/s
[    5.660147] raid6: int32x4  xor()    72 MB/s
[    5.830202] raid6: int32x2  gen()   144 MB/s
[    6.000171] raid6: int32x2  xor()    85 MB/s
[    6.170181] raid6: int32x1  gen()   100 MB/s
[    6.340128] raid6: int32x1  xor()    60 MB/s
[    6.340147] raid6: using algorithm int32x2 gen() 144 MB/s
[    6.340161] raid6: .... xor() 85 MB/s, rmw enabled
[    6.340173] raid6: using intx1 recovery algorithm
[    6.340452] vgaarb: loaded
[    6.341041] SCSI subsystem initialized
[    6.341313] libata version 3.00 loaded.
[    6.341598] usbcore: registered new interface driver usbfs
[    6.341675] usbcore: registered new interface driver hub
[    6.341734] usbcore: registered new device driver usb
[    6.341961] pps_core: LinuxPPS API ver. 1 registered
[    6.341979] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.342015] PTP clock support registered
[    6.343899] clocksource: Switched to clocksource orion_clocksource
[    6.444585] VFS: Disk quotas dquot_6.6.0
[    6.444697] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    6.461117] NET: Registered protocol family 2
[    6.461309] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    6.474357] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    6.474415] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474465] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474505] TCP: Hash tables configured (established 2048 bind 2048)
[    6.474753] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    6.474832] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.474873] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.475114] NET: Registered protocol family 1
[    6.475883] RPC: Registered named UNIX socket transport module.
[    6.475908] RPC: Registered udp transport module.
[    6.475922] RPC: Registered tcp transport module.
[    6.475933] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.475952] PCI: CLS 0 bytes, default 32
[    6.476137] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.476741] Trying to unpack rootfs image as initramfs...
[    8.192474] Freeing initrd memory: 9448K
[    8.820194] Initialise system trusted keyrings
[    8.820278] Key type blacklist registered
[    8.820557] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    8.820686] zbud: loaded
[    8.822209] NFS: Registering the id_resolver key type
[    8.822252] Key type id_resolver registered
[    8.822268] Key type id_legacy registered
[    8.822314] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    8.822340] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    8.822357] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    8.822643] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    8.823137] fuse: init (API version 7.34)
[    8.823573] orangefs_debugfs_init: called with debug mask: :none: :0:
[    8.823799] orangefs_init: module version upstream loaded
[    8.823819] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    8.923949] xor: measuring software checksum speed
[    8.932779]    arm4regs        :  1119 MB/sec
[    8.947530]    8regs           :   671 MB/sec
[    8.957689]    32regs          :   976 MB/sec
[    8.957709] xor: using function: arm4regs (1119 MB/sec)
[    8.957732] async_tx: api initialized (async)
[    8.957753] Key type asymmetric registered
[    8.957767] Asymmetric key parser 'x509' registered
[    8.957832] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    8.957913] io scheduler bfq registered
[    9.156665] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.158660] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    9.158713] mvebu-pcie mbus@f1000000:pcie@82000000: Parsing ranges property...
[    9.158752] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    9.158800] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.158835] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.159156] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    9.159182] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.159207] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    9.159229] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.159250] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    9.159270] pci_bus 0000:00: scanning bus
[    9.159393] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    9.159434] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    9.160867] pci_bus 0000:00: fixups for bus
[    9.160888] PCI: bus0: Fast back to back transfers disabled
[    9.160911] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    9.160926] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.160951] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    9.161102] pci_bus 0000:01: scanning bus
[    9.161154] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    9.161192] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    9.161230] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    9.161262] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    9.161289] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    9.161405] pci 0000:01:00.0: supports D1 D2
[    9.161425] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    9.161449] pci 0000:01:00.0: PME# disabled
[    9.185135] pci_bus 0000:01: fixups for bus
[    9.185154] PCI: bus1: Fast back to back transfers disabled
[    9.185175] pci_bus 0000:01: bus scan returning with max=01
[    9.185189] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    9.185217] pci_bus 0000:00: bus scan returning with max=01
[    9.185415] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.185444] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    9.185468] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    9.185498] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    9.185523] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    9.185556] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    9.185588] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    9.185614] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.185633] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    9.185656] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.185763] pcieport 0000:00:01.0: assign IRQ: got 0
[    9.185787] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    9.185824] pcieport 0000:00:01.0: enabling bus mastering
[    9.186364] mv_xor f1060800.xor: Marvell shared XOR driver
[    9.245037] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.247683] mv_xor f1060900.xor: Marvell shared XOR driver
[    9.305013] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.307882] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    9.309392] printk: console [ttyS0] disabled
[    9.309494] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   10.424422] printk: console [ttyS0] enabled
[   10.438285] loop: module loaded
[   10.442475] sata_mv f1080000.sata: version 1.28
[   10.442989] sata_mv f1080000.sata: slots 32 ports 2
[   10.452465] scsi host0: sata_mv
[   10.457059] scsi host1: sata_mv
[   10.461195] ata1: SATA max UDMA/133 irq 32
[   10.466082] ata2: SATA max UDMA/133 irq 32
[   10.471850] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   10.479018] nand: Samsung NAND 128MiB 3,3V 8-bit
[   10.484381] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.493005] Scanning device for bad blocks
[   10.498133] Bad eraseblock 2 at 0x000000040000
[   10.503355] Bad eraseblock 3 at 0x000000060000
[   10.539618] Bad eraseblock 294 at 0x0000024c0000
[   10.617019] Bad eraseblock 968 at 0x000007900000
[   10.628279] 9 cmdlinepart partitions found on MTD device orion_nand
[   10.635298] Creating 9 MTD partitions on "orion_nand":
[   10.641168] 0x000000000000-0x000000100000 : "uboot"
[   10.648360] 0x000000100000-0x000000180000 : "stock_uboot_env"
[   10.656324] 0x000000180000-0x000000200000 : "key_store"
[   10.663717] 0x000000200000-0x000000280000 : "info"
[   10.670719] 0x000000280000-0x000000c80000 : "etc"
[   10.677703] 0x000000c80000-0x000001680000 : "kernel_1"
[   10.685101] 0x000001680000-0x000004640000 : "rootfs1"
[   10.692497] 0x000004640000-0x000005040000 : "kernel_2"
[   10.699975] 0x000005040000-0x000008000000 : "rootfs2"
[   10.707985] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   10.716643] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   10.728242] libphy: Fixed MDIO Bus: probed
[   10.734198] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.741539] ehci-pci: EHCI PCI platform driver
[   10.746820] ehci-orion: EHCI orion driver
[   10.751778] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.758082] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.766718] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.793931] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.801044] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   10.810167] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.818152] usb usb1: Product: EHCI Host Controller
[   10.823762] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   10.831220] usb usb1: SerialNumber: f1050000.ehci
[   10.837378] hub 1-0:1.0: USB hub found
[   10.841900] hub 1-0:1.0: 1 port detected
[   10.847411] usbcore: registered new interface driver usb-storage
[   10.854656] mousedev: PS/2 mouse device common for all mice
[   10.862007] rtc-mv f1010300.rtc: registered as rtc0
[   10.867725] rtc-mv f1010300.rtc: setting system clock to 2000-01-05T06:31:51 UTC (947053911)
[   10.877258] i2c /dev entries driver
[   10.882240] i2c i2c-0: Not using recovery: no suitable method provided
[   10.883349] device-mapper: uevent: version 1.0.3
[   10.889064] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   10.898731] device-mapper: multipath round-robin: version 1.2.0 loaded
[   10.906065] device-mapper: multipath queue-length: version 0.2.0 loaded
[   10.913413] device-mapper: multipath service-time: version 0.3.0 loaded
[   10.920856] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.927699] device-mapper: raid: Loading target version 1.15.1
[   10.937147] hid: raw HID events driver (C) Jiri Kosina
[   10.943399] drop_monitor: Initializing network drop monitor service
[   10.950966] NET: Registered protocol family 10
[   10.957392] Segment Routing with IPv6
[   10.961781] RPL Segment Routing with IPv6
[   10.966685] NET: Registered protocol family 17
[   10.972084] Key type dns_resolver registered
[   10.977146] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   10.984956] registered taskstats version 1
[   10.989801] Loading compiled-in X.509 certificates
[   10.995962] zswap: loaded using pool lzo/zbud
[   11.001562] Key type ._fscrypt registered
[   11.006380] Key type .fscrypt registered
[   11.011032] Key type fscrypt-provisioning registered
[   11.018784] Key type big_key registered
[   11.056755] Key type encrypted registered
[   11.133931] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.335727] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   11.344691] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   11.352593] usb 1-1: Product: USB2.0 Hub
[   11.358198] hub 1-1:1.0: USB hub found
[   11.363229] hub 1-1:1.0: 4 ports detected
[   11.474008] ata1.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[   11.481459] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   11.546277] ata1.00: configured for UDMA/133
[   11.561831] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EARX-00P AB51 PQ: 0 ANSI: 5
[   11.571957] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   11.580993] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   11.587122] sd 0:0:0:0: [sda] Write Protect is off
[   11.592669] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   11.592806] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   11.622454]  sda: sda1 sda2
[   11.628006] sd 0:0:0:0: [sda] Attached SCSI disk
[   11.693940] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   11.852114] usb 1-1.2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   11.861279] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.869375] usb 1-1.2: Product: DataTraveler 2.0
[   11.874762] usb 1-1.2: Manufacturer: Kingston
[   11.879872] usb 1-1.2: SerialNumber: C86000BDB983B0B02A2213A7
[   11.887184] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   11.894886] scsi host2: usb-storage 1-1.2:1.0
[   11.915267] ata2: SATA link down (SStatus 0 SControl F300)
[   11.934591] Freeing unused kernel memory: 1024K
[   11.940707] Checked W+X mappings: passed, no W+X pages found
[   11.947147] Run /init as init process
[   11.951529]   with arguments:
[   11.951538]     /init
[   11.951546]   with environment:
[   11.951553]     HOME=/
[   11.951560]     TERM=linux
[   12.841287] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   12.967347] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[   12.985915] sd 2:0:0:0: [sdb] 15249408 512-byte logical blocks: (7.81 GB/7.27 GiB)
[   13.001665] sd 2:0:0:0: [sdb] Write Protect is off
[   13.013702] sd 2:0:0:0: [sdb] Mode Sense: 45 00 00 00
[   13.014411] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   13.038433]  sdb: sdb1
[   13.046781] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   13.068504] r8169 0000:01:00.0: assign IRQ: got 38
[   13.068577] pci 0000:00:01.0: enabling bus mastering
[   13.068598] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   13.109110] r8169 0000:01:00.0: enabling Mem-Wr-Inval
[   13.153234] libphy: r8169: probed
[   13.165181] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 38
[   13.204667] usbcore: registered new interface driver uas
[   13.210824] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[   13.711106] r8169 0000:01:00.0 enp1s0: renamed from eth0
[   34.360892] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   34.506400] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[   36.004031] random: crng init done
[   37.801256] hwmon_vid: Unknown VRM version of your CPU
[   37.862534] adt7475 0-002e: ADT7476 device, revision 1
[   37.934581] orion_wdt: Initial timeout 21 sec
[   37.954687] adt7475 0-002e: Optional features: in0 in4 pwm2 vid
[   38.030604] adt7475 0-002e: Bypassing attenuators on: in0 in1 in3 in4
[   38.104489] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   38.226796] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   38.397841] marvell-cesa f1030000.crypto: CESA device successfully registered
[   39.701209] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
root@debian:~# ]

Re: NSA310 with bad blocks in NAND
January 10, 2022 06:42PM
Quote

[ 13.711106] r8169 0000:01:00.0 enp1s0: renamed from eth0

Do

ifconfig -a

Aand then manual bring down and up again
ifdown enp1s0
ifup enp1s0

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 11, 2022 08:37AM
Hmmh, that is not working. I am rather lost!?


root@debian:/# ifconfig -a
enp1s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:00:00:00:00:30  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 23  bytes 3336 (3.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 3336 (3.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@debian:/# ifdown enp1s0
ifdown: unknown interface enp1s0

root@debian:/# ifup enp1s0
ifup: unknown interface enp1s0

root@debian:/#

root@debian:/# ifdown eth0
ifdown: interface eth0 not configured
root@debian:/# ifup eth0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
ifup: failed to bring up eth0
root@debian:/#


I took a look at /etc/udev/rules.d/70-persistent-net.rules
although I have no idea if this is really helpful :)

As I said earlier, I am not certain I have NSA310/310A/310B but as I understood it we are using rootfs from Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi-tar.bz2 which should be good for all with original included uImage?

root@debian:/etc# cd /etc/udev
root@debian:/etc/udev# ls
.  ..  hwdb.d  rules.d  udev.conf
root@debian:/etc/udev# ls rules.d
.  ..  70-persistent-net.rules

root@debian:/etc/udev# cat rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)

# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
root@debian:/etc/udev#
Re: NSA310 with bad blocks in NAND
January 11, 2022 04:25PM
Hilsen,

You might be on to something here. I will take a look at udev area. I use the old naming scheme eth0. It might have something to do with it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 11, 2022 06:16PM
I did a little more grepping under /etc, but did not come up with anything inspirational (to me!)...


root@debian:/etc# grep eth0 * -drecurse
avahi/avahi-daemon.conf:#allow-interfaces=eth0
default/dhcpcd:eth0) 
dhcp/dhclient.conf:#  interface "eth0";
dhcp/dhclient.conf:#  interface "eth0";
dhcpcd.sh:#  $1 = HostInfoFilePath, e.g  "/var/lib/dhcpc/dhcpcd-eth0.info"
initramfs-tools/initramfs.conf:# Specify a specific network interface, like eth0
network/interfaces:auto lo eth0
network/interfaces:iface eth0 inet dhcp
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
udev/rules.d/70-persistent-net.rules:#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

root@debian:/etc# grep ens1p0 * -drecurse
(no results)

root@debian:/etc# grep eth_port * -drecurse
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)

root@debian:/etc# grep eth * -drecurse
X11/Xsession.d/90gpg-agent:# from your session initialization with something like "gpgconf
X11/Xsession.d/90gpg-agent:# Nonetheless, ssh and older versions of gpg require environment
adduser.conf:# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS
apparmor.d/usr.bin.man:  # Ordinary permission checks sometimes involve checking whether the
avahi/avahi-daemon.conf:#allow-interfaces=eth0
avahi/avahi-daemon.conf:#deny-interfaces=eth1
dbus-1/system.d/avahi-dbus.conf:  <!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
default/networking:# Method to wait for the network to become online,
default/networking:# Which address to wait for for route, ping and ping6 methods.
default/dhcpcd:eth0) 
default/useradd:# Defines whether the mail spool should be created while
dhcp/dhclient.conf:send host-name = gethostname();
dhcp/dhclient.conf:#  interface "eth0";
dhcp/dhclient.conf:#  interface "eth0";
dhcpcd.sh:#  $1 = HostInfoFilePath, e.g  "/var/lib/dhcpc/dhcpcd-eth0.info"
ethertypes:#	http://standards-oui.ieee.org/ethertype/eth.txt
ethertypes:ARP		0806	ether-arp # Address Resolution Protocol
gai.conf:#    If set to yes, each getaddrinfo(3) call will check whether this file
init.d/networking:	/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*|curlftpfs*)
init.d/networking:	/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
init.d/nfs-common:# Parse the fstab file, and determine whether we need gssd. (The
init.d/dbus:  dbus-send --print-reply --system --type=method_call \
init.d/mountall.sh:	# We might have mounted something over /run; see if
init.d/mountall.sh:	# Now we have mounted everything, check whether we need to
initramfs-tools/initramfs.conf:# Specify a specific network interface, like eth0
insserv.conf:# Low level networking (ethernet card)
login.defs:# Each line of the file is in a format something like "vt100  tty01".
login.defs:# name of the shell actually being run, e.g. something like "-sh".
manpath.config:# directives may be given for clarity, and will be concatenated together in
network/if-up.d/ethtool:ETHTOOL=/sbin/ethtool
network/if-up.d/ethtool:# Gather together the mixed bag of settings applied with -s/--change
network/if-pre-up.d/ethtool:ETHTOOL=/sbin/ethtool
network/if-pre-up.d/ethtool:# Gather together the mixed bag of settings applied with -s/--change
network/interfaces:auto lo eth0
network/interfaces:iface eth0 inet dhcp
nsswitch.conf:ethers:         db files
protocols:etherip	97	ETHERIP		# Ethernet-within-IP Encapsulation [RFC3378]
grep: rmt: binary file matches
rpc:etherstatd	100010	etherstat
security/access.conf:# permissions field of that table entry determines whether the login will
security/namespace.init:# a flag whether the instance dir was newly created (0 - no, 1 - yes) in $3,
sysctl.d/README.sysctl:with something the package builder needs later. It must end with .conf though.
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
udev/rules.d/70-persistent-net.rules:# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
udev/rules.d/70-persistent-net.rules:#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
root@debian:/etc#
Re: NSA310 with bad blocks in NAND
January 11, 2022 06:32PM
udev is not a problem. But I forgot that in the current rootfs we have:

# cat /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

So do this to see if it will work
auto lo enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

There is a way to reverse to the old naming scheme, but I forgot about it.

This box has a different NIC and uses the r8169 driver, so the driver apparently sets it to the new naming convention (unlike the Marvell driver in other Kirkwood boxes).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 11, 2022 06:51PM
Network is now up :)

I modified /etc/network/interfaces
from

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

to

auto lo enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

(found a helpful ref in https://forum.doozan.com/read.php?3,65269,65379#msg-65379)

mari8b [ PM ]
Re: Boot Debian from USB on Zyxel NSA310
August 16, 2018 05:03AM 	Registered: 3 years ago
Posts: 11
Network problem solved. I've overseen, that eth0 was renamed to enp1s0.

mari8b Wrote:
-------------------------------------------------------
> Network problem solved. I've overseen, that eth0
> was renamed to enp1s0.
> 
> [   10.634048] r8169 0000:01:00.0 enp1s0: renamed
> from eth0
>
> So I modified /etc/network/interfaces and
> everything's ok now...


so my kernel boot log now completes as shown below....

What would you recommend the next step?

[   11.957235][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   12.860394][  T140] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   13.053860][  T140] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   13.138460][  T140] libphy: r8169: probed
[   13.152406][  T140] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 38
[   13.194236][  T141] usbcore: registered new interface driver uas
[   13.204059][  T140] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[   13.673401][  T141] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
[   14.357764][   T81] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[   14.372604][   T58] sd 2:0:0:0: [sdb] 15249408 512-byte logical blocks: (7.81 GB/7.27 GiB)
[   14.386838][   T58] sd 2:0:0:0: [sdb] Write Protect is off
[   14.392944][   T58] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   14.409962][   T58]  sdb: sdb1
[   14.427084][   T58] sd 2:0:0:0: [sdb] 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/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: ignoring check interval, broken_system_clock set
rootfs: clean, 15648/953440 files, 237521/1905168 blocks
done.
[   24.119004][  T169] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   24.299609][  T169] EXT4-fs (sdb1): 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.653784][  T352] hwmon_vid: Unknown VRM version of your CPU
[   27.711344][  T352] adt7475 0-002e: ADT7476 device, revision 1
[   27.731022][  T354] orion_wdt: Initial timeout 21 sec
[   27.739712][  T352] adt7475 0-002e: Optional features: in0 in4 pwm2 vid
[   27.848213][  T352] adt7475 0-002e: Bypassing attenuators on: in0 in1
[   27.960586][  T353] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   27.996701][    C0] random: crng init done
[   28.030218][  T353] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   28.276165][  T358] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   29.497520][  T509] EXT4-fs (sdb1): 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....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl.
[   32.242073][  T919] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168d-2.fw failed with error -2
[   32.252031][  T919] r8169 0000:01:00.0: Unable to load firmware rtl_nic/rtl8168d-2.fw (-2)
[   32.261651][  T919] RTL8211B Gigabit Ethernet r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[   32.356649][   T17] r8169 0000:01:00.0 enp1s0: Link is Down
[   34.453170][   T17] r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   34.461647][   T17] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enp1s0/00:00:00:00:00:30
Sending on   LPF/enp1s0/00:00:00:00:00:30
Sending on   Socket/fallback
Created duid "\000\001\000\001\000\007\000\231\000\000\000\000\0000".
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 6
DHCPOFFER of 192.168.31.148 from 192.168.31.1
DHCPREQUEST for 192.168.31.148 on enp1s0 to 255.255.255.255 port 67
DHCPACK of 192.168.31.148 from 192.168.31.1
bound to 192.168.31.148 -- renewal in 33212 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.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1063 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1102 (klogd)
.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

debian login: root
Password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jan  5 23:20:02 PST 2000 on ttyS0
debian
192.168.31.14
ZyXEL NSA310
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
Debian 11.0
Wed Jan 5 23:29:38 PST 2000 up 1 minute
root@debian:~# ifconfig -a
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.31.148  netmask 255.255.255.0  broadcast 192.168.31.255
        inet6 fe80::200:ff:fe00:30  prefixlen 64  scopeid 0x20<link>
        ether 00:00:00:00:00:30  txqueuelen 1000  (Ethernet)
        RX packets 16  bytes 2366 (2.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 38  bytes 5220 (5.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 12  bytes 1710 (1.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1710 (1.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@debian:~#
Re: NSA310 with bad blocks in NAND
January 11, 2022 09:07PM
Hilsen,

> Network is now up :)

Cool!

Now a few things.

- See if you can list u-boot envs. Useful later if you want to set envs in Debian with fw_setenv.

fw_printenv

- Install lmsensors. Your hwmon is adt7475. And see the temperature, and try setting fan speed....

- And then look at the Wiki thread for tutorials that you are interested in.

https://forum.doozan.com/read.php?2,23630

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 13, 2022 05:14AM
Hi bodhi,

I installed the env tools..

quote:

1. I realized I've missed one package that needs to be installed in order to make fw_printenv and fw_setenv available (these binaries have been moved to package libubootenv-tool in bullseye) . So do this if you want to list or set envs in Debian.

apt-get install libubootenv-tool


but fw_printenv cannot access the uboot env it seems...

root@debian:~# fw_printenv
Cannot read environment, using default
Cannot read default environment from file

I also modified the security repo source... I think the https should be http here though:

quote:
deb https://security.debian.org/debian-security bullseye-security main contrib non-free

I did get lm-sensors installed, though I needed to do a general update/upgrade first.
ran sensors-detect and adt7476 added to /etc/modules

Driver `adt7475':
  * Bus `mv64xxx_i2c adapter'
    Busdriver `UNKNOWN', I2C address 0x2e
    Chip `adt7476' (confidence: 6)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
adt7475
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)y
Successful!

Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.

root@debian:/#

I think I will probably now copy the usb debian rootfs to the sata drive, and see if I can get the stock uboot to boot debain from the HD. I think I will be able to find info on that in the wiki?

The alternative is to attempt to flash the new uboot anyway...

You said that if one can KWBOOT then there is always a recovery option, so is it worth trying to flash the new uboot?

My understanding of nand flash management of bad blocks is not complete...

I was under the impression that the nand chip itself performs some bad block management and remaps spare blocks when a block fails the erase cycle?

Or is bad block management completely managed by the uboot nand flash management code?

It is a little confusing to me that the bad block scan reveals bad blocks in space that is actually being used. Any comment or explanation would be appreciated if you have detailed knowledge in that area.

Once again, thanks so much for the step by step instructions to get me this far and in the process I have learnt much.

You do a great job on this forum!

Best regards,
Hilsen
Re: NSA310 with bad blocks in NAND
January 13, 2022 04:28PM
Hilsen,

> I installed the env tools..

> root@debian:~# fw_printenv
> Cannot read environment, using default
> Cannot read default environment from file

I forgot that you are still booting with kwboot! so save this for later after you have flashed new u-boot.

> I think I will probably now copy the usb debian
> rootfs to the sata drive, and see if I can get the
> stock uboot to boot debain from the HD. I think I
> will be able to find info on that in the wiki?

Save the HDD rootfs for later.

> The alternative is to attempt to flash the new
> uboot anyway...
>
> You said that if one can KWBOOT then there is
> always a recovery option, so is it worth trying to
> flash the new uboot?

Yes.

> Or is bad block management completely managed by
> the uboot nand flash management code?
>
> It is a little confusing to me that the bad block
> scan reveals bad blocks in space that is actually
> being used. Any comment or explanation would be
> appreciated if you have detailed knowledge in that
> area.

That's OK.The bad blocks are managed by the flash chip itself. So in u-boot you can also see bad blocks. So the same in Linux.

[   10.472087][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   10.479255][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[   10.484619][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.493239][    T1] Scanning device for bad blocks
[   10.498370][    T1] Bad eraseblock 2 at 0x000000040000
[   10.503592][    T1] Bad eraseblock 3 at 0x000000060000
[   10.539868][    T1] Bad eraseblock 294 at 0x0000024c0000
[   10.617242][    T1] Bad eraseblock 968 at 0x000007900000

Your bad blocks can be managed. Since the mtd0 is 1MB = 8 blocks. u-boot will occupy blocks 0-3, and envs wiil be in block 6th.

The NAND flash utility skip the bad blocks and write to the next block. So as of right now, your mtd0 looks like this (these bad blocks are factory condition, ie. they know it still work so it passed QA :)

0 u-boot
1 u-boot
2 no data
3 no data
4 u-boot
5 u-boot
And the BootROM recognizes the bad blocks, so it loads the completed u-boot image.

========

A big warning: the new NSA310 u-boot does not have Ethernet working. So if you need to use network during booting u-boot, you should stay with stock u-boot.

If you don't care about network before Linux starts, then flash new u-boot.

========

When you flash new u-boot, please post the log here. Don't reboot until after I can review the log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 14, 2022 07:48AM
Hi bodhi,

Thanks for the continued help!

I flashed the uboot and environment img (files renamed for convenience uboot.kwb, newenv.img)

That seemed to go well as shown below.

Now I pause at editing the environment variables...

Is it not necessary to reload the (new updated and default) environment from nand before changing environment variables and resaving the modified environment? I am just abit fuzzy about this and may have some significant misinterpretations here, about how exactly the environment mechanism works.

I note your message about no eth support in new uboot. I dont think thats a concern for me.

Thanks,
Hilsen



media/usbkey/nsa310/tools/tools # ls
busybox        e2fsck         flash_erase    fw_env.config  fw_printenv    nanddump       nandwrite      old_mtd0

/media/usbkey/nsa310/tools/tools # ./flash_eraser /dev/mtd0 0 4

Erasing 128 Kibyte @ 0 --  0 % complete 
Erasing 128 Kibyte @ 20000 -- 25 % complete flash_erase: Skipping bad block at 00040000
flash_erase: Skipping bad block at 00060000
Erasing 128 Kibyte @ 60000 -- 100 % complete
 
/media/usbkey/nsa310/tools/tools # ./nandwrite /dev/mtd0 /tmp/uboot.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000

/media/usbkey/nsa310/tools/tools # ./fw_printenv >current_envs.txt

/media/usbkey/nsa310/tools/tools # ./flash_erase /dev/mtd0 0xc0000 1

Erasing 128 Kibyte @ c0000 --  0 % complete 
Erasing 128 Kibyte @ c0000 -- 100 % complete 

/media/usbkey/nsa310/tools/tools # ls /tmp/env* -l
-rw-r-----    1 root     root        131072 Jan 14 12:04 envnew.img

/media/usbkey/nsa310/tools/tools # /./nandwrite -s 786432 /dev/mtd0 envnew.img
Writing data to block 6 at offset 0xc0000

/media/usbkey/nsa310/tools/tools # fw_printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
eth1addr=00:19:CB:00:51:82
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=A203
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
ethaddr=C8:6C:87:1C:F5:85
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=no
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga1
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
disaMvPnp=no
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
hddPowerCtrl=no
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
ethact=egiga1
/media/usbkey/nsa310/tools/tools # set
HOME='/root'
IFS='   
'
LD_LIBRARY_PATH='/usr/local/zy-pkgs/lib'
LOGNAME='root'
OLDPWD='/'
PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/zyxel/sbin:/usr/local/zy-pkgs/bin:/zyxel/htp'
PPID='6097'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/media/usbkey/nsa310/tools/tools'
SHELL='/bin/sh'
USER='root'
_='fw_printenv'
/media/usbkey/nsa310/tools/tools #
Re: NSA310 with bad blocks in NAND
January 14, 2022 09:03AM
Hilsen,

Glad I asked you to wait for my response :) You need to erase 6 blocks to make sure that the bad blocks skipping taken into account.

/media/usbkey/nsa310/tools/tools # ./flash_erase /dev/mtd0 0 6

And then the rest are OK as you did.

> /media/usbkey/nsa310/tools/tools # ./nandwrite /dev/mtd0 /tmp/uboot.kwb

> /media/usbkey/nsa310/tools/tools # ./fw_printenv > current_envs.txt

> /media/usbkey/nsa310/tools/tools # ./flash_erase /dev/mtd0 0xc0000 1
> /media/usbkey/nsa310/tools/tools # /./nandwrite -s 786432 /dev/mtd0 envnew.img

Will be back late today to check your log. Since you can kwboot, you can recover from any mistake. So I seem to be too cautious, but best to go slow anyway. No fun in trying to recover a soft brick!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 with bad blocks in NAND
January 14, 2022 10:33AM
Hi bodhi,

Thanks, all cautions welcomed. The results are the same in any case. I am not going to think about that one too hard...
I would have thought the blocks were perhaps already erased/blank, presumably nand write does a read verification and will only write to blocks which are erased ff...


/media/usbkey/nsa310/tools/tools # /media.flash/flash_erase /dev/mtd0 0 6

Erasing 128 Kibyte @ 0 --  0 % complete 
Erasing 128 Kibyte @ 20000 -- 16 % complete flash_erase: Skipping bad block at 00040000
flash_erase: Skipping bad block at 00060000

Erasing 128 Kibyte @ 80000 -- 66 % complete 
Erasing 128 Kibyte @ a0000 -- 83 % complete 
Erasing 128 Kibyte @ a0000 -- 100 % complete 

/media/usbkey/nsa310/tools/tools # ./nandwrite /dev/mtd0 /tmp/uboot.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000

/media/usbkey/nsa310/tools/tools # ./flash_erase /dev/mtd0 0xc0000 1

Erasing 128 Kibyte @ c0000 --  0 % complete 
Erasing 128 Kibyte @ c0000 -- 100 % complete 

/media/usbkey/nsa310/tools/tools # ./nandwrite -s 786432 /dev/mtd0 /tmp/envnew.img
Writing data to block 6 at offset 0xc0000
/media/usbkey/nsa310/tools/tools #
Re: NSA310 with bad blocks in NAND
January 14, 2022 04:39PM
Hilsen,

> Thanks, all cautions welcomed. The results are the
> same in any case. I am not going to think about
> that one too hard...
> I would have thought the blocks were perhaps
> already erased/blank, presumably nand write does a
> read verification and will only write to blocks
> which are erased ff...

In my experience, nandwrite does not check if the blocks are empty (I could be wrong about the latest nandwrite version , though).

In any case, there are differences in your 1st and 2nd attempt with flash_erase. Only 2 blocks were erased in the 1st. And there were 4 block erased in the 2nd.

Quote
1st attempt
/media/usbkey/nsa310/tools/tools # ./flash_eraser /dev/mtd0 0 4

Erasing 128 Kibyte @ 0 -- 0 % complete
Erasing 128 Kibyte @ 20000 -- 25 % complete flash_erase: Skipping bad block at 00040000
flash_erase: Skipping bad block at 00060000
Erasing 128 Kibyte @ 60000 -- 100 % complete

Quote
2nd attempt
/media/usbkey/nsa310/tools/tools # /media.flash/flash_erase /dev/mtd0 0 6

Erasing 128 Kibyte @ 0 -- 0 % complete
Erasing 128 Kibyte @ 20000 -- 16 % complete flash_erase: Skipping bad block at 00040000
flash_erase: Skipping bad block at 00060000

Erasing 128 Kibyte @ 80000 -- 66 % complete
Erasing 128 Kibyte @ a0000 -- 83 % complete
Erasing 128 Kibyte @ a0000 -- 100 % complete


Note that in the 1st attempt, nandwrite does not complaint about block starting at 0xa0000. This block is where the stock u-boot envs are! So this nandwrite just writes to the block that has not been erased.

Moving on with the 2nd attempt.

> /media/usbkey/nsa310/tools/tools #
> /media.flash/flash_erase /dev/mtd0 0 6
>
> Erasing 128 Kibyte @ 0 -- 0 % complete
> Erasing 128 Kibyte @ 20000 -- 16 % complete
> flash_erase: Skipping bad block at 00040000
> flash_erase: Skipping bad block at 00060000
>
> Erasing 128 Kibyte @ 80000 -- 66 % complete
> Erasing 128 Kibyte @ a0000 -- 83 % complete
> Erasing 128 Kibyte @ a0000 -- 100 % complete

There are total of 4 good blocks erased.

> /media/usbkey/nsa310/tools/tools # ./nandwrite
> /dev/mtd0 /tmp/uboot.kwb
> Writing data to block 0 at offset 0x0
> Writing data to block 1 at offset 0x20000
> Writing data to block 2 at offset 0x40000
> Bad block at 40000, 1 block(s) from 40000 will be
> skipped
> Writing data to block 3 at offset 0x60000
> Bad block at 60000, 1 block(s) from 60000 will be
> skipped
> Writing data to block 4 at offset 0x80000
> Writing data to block 5 at offset 0xa0000

Looks good!

>
> /media/usbkey/nsa310/tools/tools # ./flash_erase
> /dev/mtd0 0xc0000 1
>
> Erasing 128 Kibyte @ c0000 -- 0 % complete
> Erasing 128 Kibyte @ c0000 -- 100 % complete
>
> /media/usbkey/nsa310/tools/tools # ./nandwrite -s
> 786432 /dev/mtd0 /tmp/envnew.img
> Writing data to block 6 at offset 0xc0000
> /media/usbkey/nsa310/tools/tools #

Looks good!

You can now reboot the box. Run normal serial console with minicom/picocom/putty/screen and observe the boot process. Please post and keep the log.

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



Edited 2 time(s). Last edit at 01/14/2022 05:08PM by bodhi.
Re: NSA310 with bad blocks in NAND
January 14, 2022 06:37PM
Thanks bodhi, I see you are correct about that a0000 write indeed.

As I said earlier, I did NOT make any attempt to perform fw_setenv operations in Section e.

Particularly e2:
-> fw_setenv mtdparts 'xxxxxxxxx'
and e3:
-> These envs are important to be set if you plan to use uEnv.txt (see section C). [sounds like a good idea]


Is it OK to reboot anyway?

I am a little unclear about how the environment storage management actually works.:

in my earlier message "Is it not necessary to reload the (new updated and default) environment from nand before changing environment variables and resaving the modified environment? I am just abit fuzzy about this and may have some significant misinterpretations here, about how exactly the environment mechanism works."

And if the environment mtd is now moved from 0xa0000 to 0xc0000 in the flash, where is the spec that determines from where it is loaded?

If you can help me get my head around this it would be greatly appreciated :)

Cheers,
Hilsen.
Re: NSA310 with bad blocks in NAND
January 14, 2022 09:54PM
Hilsen,

> As I said earlier, I did NOT make any attempt to
> perform fw_setenv operations in Section e.

The dtb_file is the most important thing to set. So that's not optional. However, dtb_file can be adjusted in serial console, if you did not set it before reboot.

The rest of the envs can be adjusted after booted into Debian.

> Is it OK to reboot anyway?

Yes, mtdparts is not relevant to booting.

> I am a little unclear about how the environment
> storage management actually works.:
>

> And if the environment mtd is now moved from
> 0xa0000 to 0xc0000 in the flash, where is the spec
> that determines from where it is loaded?

Recall you have flashed the default envs image to 0xc0000

Quote

/media/usbkey/nsa310/tools/tools # ./nandwrite -s 786432 /dev/mtd0 /tmp/envnew.img
Writing data to block 6 at offset 0xc0000

That's where the new u-boot expects the envs to be. During u-boot booting, the first thing it does before the countdown was looking for the envs at that location in NAND. This is hardcoded in u-boot. Each board can define a different location. I've unified the Kirkwood boxes u-boot behavior by defining the location at 0xc0000 for all (Jeff, our forum host, was the pioneer who defined this location from way back and I think it was very well thought out).

And then in Debian, the envs are specified as:

Quote
https://forum.doozan.com/read.php?3,12381

1. uBoot envs config should be defined as followed in your /etc/fw_env.config

cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

This is where fw_setenv/fw_printenv comes in. The u-boot-tools (and its associated binaries), and mtd-utils know where the envs are by the definition in this file.

=======

Once you run the system successfully, you might run into a situation where you want to setup certain booting sequence in order to customize your box, you can use uEnv.txt to tweak the behavior. It is non-destructive so you can test all kind of configuration, and when you reboot without uEnv.txt, it will be back to the way it was.

And what if you have a bad block at 0xc0000 ? :) uEnv.txt is then used as the fallback location on disk.

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



Edited 2 time(s). Last edit at 01/15/2022 06:41PM by bodhi.
Re: NSA310 with bad blocks in NAND
January 15, 2022 09:20AM
Hi Bodhi,

All seems to be going well.

I post the boot log below finishing with an fw_printenv, this is actually the second boot, the first boot also booted to the shell successfully with the default pogoxxx.dtb, at which point i fw_setenv updated the dtb identifier to the nsa310b-lmsensor-redusbled.dtb, and adjusted the other env settings as recommended.

I have not yet setup a swap file, which I would like to do on the HDD sda1 (where it used to be).
I cannot mount the sda2 partition from the old NAS system. It shows up as a raid element, but I do not have traditional /dev/mdx raid devices listed, and of course it is only a single drive NAS. Curious about how to mount/assemble/read that raid partition, which would be handy to know :)

root@debian:~# mkdir /media/dp2
root@debian:~# mount /dev/sda2 /media/dp2
mount: /media/dp2: unknown filesystem type 'linux_raid_member'.
root@debian:~#



Then I should probably update the kernel to the latest which includes the SMB support.

But first I think its time to backup an image of the USB boot drive.

As always, suggestions, directions, comments very welcome!

Many thanks again,
Hilsen


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 10  9  8  7  6  5  4  3  2  1  0 
Initializing devices...
starting 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

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD20EARX-00PASB0 Firm: 51.0AB51 Ser#:  WD-WCAZAC605752
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 784 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1129 ms (4.6 MiB/s)
loading uInitrd ...
EHCI timed out on TD - token=0x90008d80
9671091 bytes read in 6633 ms (1.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310b-lmsensor-redusbled.dtb ...
12272 bytes read in 3029 ms (3.9 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 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1d4000, end 0fb0d173 ... OK
   Loading Device Tree to 0f1ce000, end 0f1d3fef ... OK
Using machid 0x831 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.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 NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 231048K/262144K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 31096K 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.000060][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000926][    T0] Console: colour dummy device 80x30
[    0.001002][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001044][    T0] pid_max: default: 32768 minimum: 301
[    0.001453][    T0] LSM: Security Framework initializing
[    0.001634][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001681][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003122][    T0] CPU: Testing write buffer coherency: ok
[    0.005525][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005858][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006194][    T1] rcu: Hierarchical SRCU implementation.
[    0.007611][    T1] devtmpfs: initialized
[    0.014230][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014287][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.051595][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.051641][    T1] prandom: seed boundary self test passed
[    0.055827][    T1] prandom: 100 self tests passed
[    0.055845][    T1] pinctrl core: initialized pinctrl subsystem
[    0.057449][    T1] NET: Registered protocol family 16
[    0.058235][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.059219][    T1] audit: initializing netlink subsys (disabled)
[    0.060699][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.061086][   T16] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.061272][    T1] cpuidle: using governor ladder
[    0.061374][    T1] cpuidle: using governor menu
[    0.061902][    T1] Feroceon L2: Enabling L2
[    0.061957][    T1] Feroceon L2: Cache support initialised.
[    0.072164][    T1] No ATAGs?
[    2.560068][    C0] random: fast init done
[    4.933723][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    4.959405][   T59] wait_for_initramfs() called before rootfs_initcalls
[    5.150130][    T1] raid6: int32x8  gen()   109 MB/s
[    5.320269][    T1] raid6: int32x8  xor()    69 MB/s
[    5.490180][    T1] raid6: int32x4  gen()   109 MB/s
[    5.660103][    T1] raid6: int32x4  xor()    72 MB/s
[    5.830237][    T1] raid6: int32x2  gen()   138 MB/s
[    6.0001404[4][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.341980][    T1] PTP clock support registered
[    6.343865][    T1] clocksource: Switched to clocksource orion_clocksource
[    6.444540][    T1] VFS: Disk quotas dquot_6.6.0
[    6.444655][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    6.461056][    T1] NET: Registered protocol family 2
[    6.461244][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    6.474314][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    6.474372][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474423][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    6.474463][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    6.474711][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    6.474791][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.474832][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.475074][    T1] NET: Registered protocol family 1
[    6.475845][    T1] RPC: Registered named UNIX socket transport module.
[    6.475869][    T1] RPC: Registered udp transport module.
[    6.475882][    T1] RPC: Registered tcp transport module.
[    6.475894][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.475911][    T1] PCI: CLS 0 bytes, default 32
[    6.476093][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    6.476689][   T58] Trying to unpack rootfs image as initramfs...
[    8.193304][   T58] Freeing initrd memory: 9448K
[    8.820895][    T1] Initialise system trusted keyrings
[    8.820979][    T1] Key type blacklist registered
[    8.821251][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    8.821382][    T1] zbud: loaded
[    8.822920][    T1] NFS: Registering the id_resolver key type
[    8.822972][    T1] Key type id_resolver registered
[    8.822988][    T1] Key type id_legacy registered
[    8.823033][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    8.823059][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    8.823075][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    8.823358][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  \A9 2001-2006 Red Hat, Inc.
[    8.823854][    T1] fuse: init (API version 7.34)
[    8.824390][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    8.824619][    T1] orangefs_init: module version upstream loaded
[    8.824641][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    8.926818][    T1] xor: measuring software checksum speed
[    8.935720][    T1]    arm4regs        :  1119 MB/sec
[    8.950461][    T1]    8regs           :   671 MB/sec
[    8.960604][    T1]    32regs          :   976 MB/sec
[    8.960623][    T1] xor: using function: arm4regs (1119 MB/sec)
[    8.960648][    T1] async_tx: api initialized (async)
[    8.960669][    T1] Key type asymmetric registered
[    8.960684][    T1] Asymmetric key parser 'x509' registered
[    8.960749][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    8.960831][    T1] io scheduler bfq registered
[    9.159504][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.161503][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    9.161596][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    9.161644][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.161679][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.161995][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    9.162021][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.162047][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    9.162070][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.162090][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    9.162232][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    9.162274][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    9.163712][    T1] PCI: bus0: Fast back to back transfers disabled
[    9.163750][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.164050][    T1] pci 0000:01:00.0: [10e0::00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.195371][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    9.195394][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    9.195425][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    9.195450][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    9.195483][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    9.195515][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    9.195540][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.195560][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    9.195583][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.195715][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    9.196290][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    9.255007][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.257652][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    9.314983][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.317852][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    9.319339][    T1] printk: console [ttyS0] disabled
[    9.319442][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   10.423677][    T1] printk: console [ttyS0] enabled
[   10.437602][    T1] loop: module loaded
[   10.442313][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   10.451788][    T1] scsi host0: sata_mv
[   10.456395][    T1] scsi host1: sata_mv
[   10.460524][    T1] ata1: SATA max UDMA/133 irq 32
[   10.465405][    T1] ata2: SATA max UDMA/133 irq 32
[   10.471199][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   10.478370][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[   10.483711][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.492335][    T1] Scanning device for bad blocks
[   10.497463][    T1] Bad eraseblock 2 at 0x000000040000
[   10.502688][    T1] Bad eraseblock 3 at 0x000000060000
[   10.538951][    T1] Bad eraseblock 294 at 0x0000024c0000
[   10.616338][    T1] Bad eraseblock 968 at 0x000007900000
[   10.627601][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[   10.634622][    T1] Creating 4 MTD partitions on "orion_nand":
[   10.640491][    T1] 0x000000000000-0x000000100000 : "u-boot"
[   10.647769][    T1] 0x000000100000-0x000000500000 : "uImage"
[   10.654944][    T1] 0x000000500000-0x000002500000 : "rootfs"
[   10.662234][    T1] 0x000002500000-0x000008000000 : "data"
[   10.670199][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   10.678819][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   10.690382][    T1] libphy: Fixed MDIO Bus: probed
[   10.696318][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.703655][    T1] ehci-pci: EHCI PCI platform driver
[   10.708938][    T1] ehci-orion: EHCI orion driver
[   10.713908][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.720218][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.728874][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.763892][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.770983][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   10.780051][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.788055][    T1] usb usb1: Product: EHCI Host Controller
[   10.793693][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   10.801167][    T1] usb usb1: SerialNumber: f1050000.ehci
[   10.807414][    T1] hub 1-0:1.0: USB hub found
[   10.811932][    T1] hub 1-0:1.0: 1 port detected
[   10.817436][    T1] usbcore: registered new interface driver usb-storage
[   10.824653][    T1] mousedev: PS/2 mouse device common for all mice
[   10.831979][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   10.837699][    T1] rtc-mv f1010300.rtc: setting system clock to 2022-01-15T14:57:17 UTC (1642258637)
[   10.847312][    T1] i2c /dev entries driver
[   10.853404][    T1] device-mapper: uevent: version 1.0.3
[   10.859142][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   10.868840][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   10.876169][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   10.883524][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   10.890968][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.897822][    T1] device-mapper: raid: Loading target version 1.15.1
[   10.907005][    T1] hid: raw HID events driver (C) Jiri Kosina
[   10.913509][    T1] drop_monitor: Initializing network drop monitor service
[   10.921039][    T1] NET: Registered protocol family 10
[   10.927458][    T1] Segment Routing with IPv6
[   10.931849][    T1] RPL Segment Routing with IPv6
[   10.936791][    T1] NET: Registered protocol family 17
[   10.942200][    T1] Key type dns_resolver registered
[   10.947793][    T1] registered taskstats version 1
[   10.952626][    T1] Loading compiled-in X.509 certificates
[   10.958745][    T1] zswap: loaded using pool lzo/zbud
[   10.964259][    T1] Key type ._fscrypt registered
[   10.968997][    T1] Key type .fscrypt registered
[   10.973635][    T1] Key type fscrypt-provisioning registered
[   10.979400][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   10.988637][    T1] Key type big_key registered
[   11.026783][    T1] Key type encrypted registered
[   11.103895][  T103] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.305633][  T103] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   11.314593][  T103] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   11.322496][  T103] usb 1-1: Product: USB2.0 Hub
[   11.328103][  T103] hub 1-1:1.0: USB hub found
[   11.333134][  T103] hub 1-1:1.0: 4 ports detected
[   11.413968][   T94] ata1.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[   11.421416][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   11.486239][   T94] ata1.00: configured for UDMA/133
[   11.501799][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EARX-00P AB51 PQ: 0 ANSI: 5
[   11.511935][   T81] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   11.520949][   T81] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   11.527076][   T81] sd 0:0:0:0: [sda] Write Protect is off
[   11.532736][   T81] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   11.561726][   T81]  sda: sda1 sda2
[   11.567082][   T81] sd 0:0:0:0: [sda] Attached SCSI disk
[   11.653895][  T103] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   11.811882][  T103] usb 1-1.2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   11.821034][  T103] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.829143][  T103] usb 1-1.2: Product: DataTraveler 2.0
[   11.834534][  T103] usb 1-1.2: Manufacturer: Kingston
[   11.839651][  T103] usb 1-1.2: SerialNumber: C86000BDB983B0B02A2213A7
[   11.847086][  T103] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   11.854178][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[   11.861043][  T103] scsi host2: usb-storage 1-1.2:1.0
[   11.873466][    T1] Freeing unused kernel memory: 1024K
[   11.879614][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.886045][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   12.786762][  T143] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   12.880983][  T143] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   12.971249][  T143] libphy: r8169: probed
[   12.987559][  T143] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 38
[   13.016340][  T138] usbcore: registered new interface driver uas
[   13.028254][  T143] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[   13.482237][  T138] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
[   14.238487][   T81] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[   14.253326][   T58] sd 2:0:0:0: [sdb] 15249408 512-byte logical blocks: (7.81 GB/7.27 GiB)
[   14.267561][   T58] sd 2:0:0:0: [sdb] Write Protect is off
[   14.273668][   T58] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   14.290542][   T58]  sdb: sdb1
[   14.307055][   T58] sd 2:0:0:0: [sdb] 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/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: clean, 17770/953440 files, 242271/1905168 blocks (check in 5 mounts)
done.
[   23.936222][  T167] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   24.056572][  T167] EXT4-fs (sdb1): 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.314456][  T352] orion_wdt: Initial timeout 21 sec
[   27.371669][  T358] hwmon_vid: Unknown VRM version of your CPU
[   27.474070][  T358] lm85 0-002e: Starting monitoring
[   27.537485][  T355] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   27.644024][    C0] random: crng init done
[   27.652367][  T355] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   27.887897][  T353] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   29.106623][  T502] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
[   29.115276][  T502] ext3 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
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.
Loading kernel module adt7475.
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....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl
.
[   31.861833][  T913] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168d-2.fw failed with error -2
[   31.871762][  T913] r8169 0000:01:00.0: Unable to load firmware rtl_nic/rtl8168d-2.fw (-2)
[   31.881405][  T913] RTL8211B Gigabit Ethernet r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[   31.976580][  T102] r8169 0000:01:00.0 enp1s0: Link is Down
[   34.115625][  T102] r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   34.124103][  T102] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enp1s0/00:00:00:00:00:30
Sending on   LPF/enp1s0/00:00:00:00:00:30
Sending on   Socket/fallback
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 192.168.31.148 from 192.168.31.1
DHCPREQUEST for 192.168.31.148 on enp1s0 to 255.255.255.255 port 67
DHCPACK of 192.168.31.148 from 192.168.31.1
bound to 192.168.31.148 -- renewal in 35472 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
Setting sensors limits...
done.

INIT: Entering runlevel: 2


Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1061 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1102 (klogd)
.
Running local boot scripts (/etc/rc.local)
.



Debian GNU/Linux 11 debian ttyS0

debian login: root


Password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jan 15 04:30:21 PST 2022 on ttyS0
debian
192.168.31.14
ZyXEL NSA310
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
Debian 11.2
Sat Jan 15 06:57:57 PST 2022 up 0 minutes
root@debian:~# fw_printenv

arcNumber=2097
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; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310b-lmsensor-redusbled.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
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
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=echo Initializing 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 $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_ready_retry=15
root@debian:
Re: NSA310 with bad blocks in NAND
January 15, 2022 12:54PM
It continues to go well I think.

Now enabled swap and rebuilt the kernel files so now booting successfully 5.15.5.

Just got to figure out how to mount that sda2 partition....??

root@debian:~# mkdir  /mnt/sda2
root@debian:-# mount /dev/sda2 /mnt/sda2
mount: /mnt/sda2: unknown filesystem type 'linux_raid_member'.


The 5.15.5 boot log...

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 10  9  8  7  6  5  4  3  2  1  0 
Initializing devices...
starting 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

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD20EARX-00PASB0 Firm: 51.0AB51 Ser#:  WD-WCAZAC605752
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 784 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5652808 bytes read in 1120 ms (4.8 MiB/s)
loading uInitrd ...
EHCI timed out on TD - token=0xd8d80
10561887 bytes read in 6779 ms (1.5 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310b-lmsensor-redusbled.dtb ...
12272 bytes read in 3029 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.15.5-kirkwood-tld-1
   Created:      2022-01-15  18:33:14 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5652744 Bytes = 5.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.15.5-kirkwood-tld-1
   Created:      2022-01-15  18:34:52 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    10561823 Bytes = 10.1 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 0f0fb000, end 0fb0d91f ... OK
   Loading Device Tree to 0f0f5000, end 0f0fafef ... OK
Using machid 0x831 from environment

Starting kernel ...

[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.15.5-kirkwood-tld-1 (root@tldDebianVM) (arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sun Nov 28 23:08:13 PST 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 NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 229144K/262144K available (11264K kernel code, 1562K rwdata, 4880K rodata, 1024K init, 310K bss, 33000K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x2fc/0x7b0 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.000001][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000053][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000885][    T0] Console: colour dummy device 80x30
[    0.000961][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.001003][    T0] pid_max: default: 32768 minimum: 301
[    0.001402][    T0] LSM: Security Framework initializing
[    0.001585][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001632][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003087][    T0] CPU: Testing write buffer coherency: ok
[    0.005444][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005777][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006107][    T1] rcu: Hierarchical SRCU implementation.
[    0.007519][    T1] devtmpfs: initialized
[    0.015359][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015414][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.052719][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.052764][    T1] prandom: seed boundary self test passed
[    0.056950][    T1] prandom: 100 self tests passed
[    0.056968][    T1] pinctrl core: initialized pinctrl subsystem
[    0.058594][    T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.059415][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.060552][    T1] audit: initializing netlink subsys (disabled)
[    0.062031][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.062408][   T16] audit: type=2000 audit(0.060:1): state=initialized audit_enabled=0 res=1
[    0.062598][    T1] cpuidle: using governor ladder
[    0.062702][    T1] cpuidle: using governor menu
[    0.063260][    T1] Feroceon L2: Enabling L2
[    0.063315][    T1] Feroceon L2: Cache support initialised.
[    0.074007][    T1] No ATAGs?
[    2.560059][    C0] random: fast init done
[    5.601127][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    5.820232][    T1] raid6: int32x8  gen()   109 MB/s
[    5.990207][    T1] raid6: int32x8  xor()    69 MB/s
[    6.160126][    T1] raid6: int32x4  gen()   109 MB/s
[    6.330191][    T1] raid6: int32x4  xor()    71 MB/s
[    6.500151][    T1] raid6: int32x2  gen()   142 MB/s
[    6.670061][    T1] raid6: int32x2  xor()    87 MB/s
[    6.840188][    T1] raid6: int32x1  gen()    98 MB/s
[    7.010241][    T1] raid6: int32x1  xor()    58 MB/s
[    7.010259][    T1] raid6: using algorithm int32x2 gen() 142 MB/s
[    7.010273][    T1] raid6: .... xor() 87 MB/s, rmw enabled
[    7.010284][    T1] raid6: using intx1 recovery algorithm
[    7.010592][    T1] vgaarb: loaded
[    7.011191][    T1] SCSI subsystem initialized
[    7.011751][    T1] usbcore: registered new interface driver usbfs
[    7.011831][    T1] usbcore: registered new interface driver hub
[    7.011892][    T1] usbcore: registered new device driver usb
[    7.012114][    T1] pps_core: LinuxPPS API ver. 1 registered
[    7.012132][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    7.012167][    T1] PTP clock support registered
[    7.014140][    T1] clocksource: Switched to clocksource orion_clocksource
[    7.104383][    T1] VFS: Disk quotas dquot_6.6.0
[    7.104501][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.136425][    T1] NET: Registered PF_INET protocol family
[    7.136616][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    7.137690][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    7.137745][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.137795][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.137834][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    7.138076][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    7.138156][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.138196][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.138446][    T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    7.139253][    T1] RPC: Registered named UNIX socket transport module.
[    7.139277][    T1] RPC: Registered udp transport module.
[    7.139290][    T1] RPC: Registered tcp transport module.
[    7.139301][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.139319][    T1] PCI: CLS 0 bytes, default 32
[    7.139526][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.140130][   T75] Trying to unpack rootfs image as initramfs...
[    9.013919][   T75] Freeing initrd memory: 10316K
[    9.601713][    T1] Initialise system trusted keyrings
[    9.601785][    T1] Key type blacklist registered
[    9.602050][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    9.602183][    T1] zbud: loaded
[    9.603652][    T1] NFS: Registering the id_resolver key type
[    9.603697][    T1] Key type id_resolver registered
[    9.603712][    T1] Key type id_legacy registered
[    9.603757][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    9.603783][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    9.603799][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    9.604091][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  \A9 2001-2006 Red Hat, Inc.
[    9.604653][    T1] fuse: init (API version 7.34)
[    9.605132][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    9.605375][    T1] orangefs_init: module version upstream loaded
[    9.605395][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    9.707416][    T1] xor: measuring software checksum speed
[    9.716360][    T1]    arm4regs        :  1117 MB/sec
[    9.731106][    T1]    8regs           :   670 MB/sec
[    9.741259][    T1]    32regs          :   975 MB/sec
[    9.741278][    T1] xor: using function: arm4regs (1117 MB/sec)
[    9.741299][    T1] async_tx: api initialized (async)
[    9.741319][    T1] Key type asymmetric registered
[    9.741332][    T1] Asymmetric key parser 'x509' registered
[    9.741461][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    9.741553][    T1] io scheduler bfq registered
[    9.941126][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.943167][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    9.943263][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    9.943311][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.943345][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    9.943666][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    9.943692][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.943718][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    9.943741][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.943760][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    9.943907][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    9.943949][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    9.945541][    T1] PCI: bus0: Fast back to back transfers disabled
[    9.945580][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.945815][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    9.945854][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    9.945891][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    9.945923][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    9.945950][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    9.946070][    T1] pci 0000:01:00.0: supports D1 D2
[    9.946090][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    9.975454][    T1] PCI: bus1: Fast back to back transfers disabled
[    9.975489][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    9.975712][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.975741][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    9.975765][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    9.975795][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    9.975820][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    9.975853][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    9.975885][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    9.975910][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.975930][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    9.975953][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.976087][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    9.976712][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[   10.035252][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   10.037818][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[   10.095251][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   10.098084][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   10.099625][    T1] printk: console [ttyS0] disabled
[   10.099730][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   11.204162][    T1] printk: console [ttyS0] enabled
[   11.218110][    T1] loop: module loaded
[   11.222825][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   11.232306][    T1] scsi host0: sata_mv
[   11.236943][    T1] scsi host1: sata_mv
[   11.241074][    T1] ata1: SATA max UDMA/133 irq 32
[   11.245961][    T1] ata2: SATA max UDMA/133 irq 32
[   11.251799][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   11.258967][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[   11.264332][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   11.272671][    T1] Scanning device for bad blocks
[   11.277757][    T1] Bad eraseblock 2 at 0x000000040000
[   11.282978][    T1] Bad eraseblock 3 at 0x000000060000
[   11.316131][    T1] Bad eraseblock 294 at 0x0000024c0000
[   11.386226][    T1] Bad eraseblock 968 at 0x000007900000
[   11.396879][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[   11.403883][    T1] Creating 4 MTD partitions on "orion_nand":
[   11.409769][    T1] 0x000000000000-0x000000100000 : "u-boot"
[   11.416038][    T1] mtdblock: MTD device 'u-boot' is NAND, please consider using UBI block devices instead.
[   11.426911][    T1] 0x000000100000-0x000000500000 : "uImage"
[   11.433091][    T1] mtdblock: MTD device 'uImage' is NAND, please consider using UBI block devices instead.
[   11.443945][    T1] 0x000000500000-0x000002500000 : "rootfs"
[   11.450338][    T1] mtdblock: MTD device 'rootfs' is NAND, please consider using UBI block devices instead.
[   11.461205][    T1] 0x000002500000-0x000008000000 : "data"
[   11.467669][    T1] mtdblock: MTD device 'data' is NAND, please consider using UBI block devices instead.
[   11.478875][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   11.487528][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   11.499162][    T1] libphy: Fixed MDIO Bus: probed
[   11.505171][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.512505][    T1] ehci-pci: EHCI PCI platform driver
[   11.517795][    T1] ehci-orion: EHCI orion driver
[   11.522748][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   11.529060][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   11.537697][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   11.574175][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   11.581278][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[   11.590397][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.598380][    T1] usb usb1: Product: EHCI Host Controller
[   11.603982][    T1] usb usb1: Manufacturer: Linux 5.15.5-kirkwood-tld-1 ehci_hcd
[   11.611442][    T1] usb usb1: SerialNumber: f1050000.ehci
[   11.617603][    T1] hub 1-0:1.0: USB hub found
[   11.622131][    T1] hub 1-0:1.0: 1 port detected
[   11.627651][    T1] usbcore: registered new interface driver usb-storage
[   11.634875][    T1] mousedev: PS/2 mouse device common for all mice
[   11.642256][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   11.647970][    T1] rtc-mv f1010300.rtc: setting system clock to 2022-01-15T18:38:07 UTC (1642271887)
[   11.657625][    T1] i2c_dev: i2c /dev entries driver
[   11.664503][    T1] device-mapper: uevent: version 1.0.3
[   11.670151][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   11.679840][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   11.687176][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   11.694560][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   11.701970][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   11.708821][    T1] device-mapper: raid: Loading target version 1.15.1
[   11.718059][    T1] hid: raw HID events driver (C) Jiri Kosina
[   11.724587][    T1] drop_monitor: Initializing network drop monitor service
[   11.732112][    T1] NET: Registered PF_INET6 protocol family
[   11.739123][    T1] Segment Routing with IPv6
[   11.743519][    T1] RPL Segment Routing with IPv6
[   11.748387][    T1] In-situ OAM (IOAM) with IPv6
[   11.753134][    T1] NET: Registered PF_PACKET protocol family
[   11.758975][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   11.766444][    T1] Key type dns_resolver registered
[   11.772210][    T1] registered taskstats version 1
[   11.777250][    T1] Loading compiled-in X.509 certificates
[   11.783144][    T1] zswap: loaded using pool lzo/zbud
[   11.788648][    T1] Key type ._fscrypt registered
[   11.793389][    T1] Key type .fscrypt registered
[   11.798118][    T1] Key type fscrypt-provisioning registered
[   11.806122][    T1] Key type big_key registered
[   11.810777][   T94] ata1.00: ATA-8: WDC WD20EARX-00PASB0, 51.0AB51, max UDMA/133
[   11.821276][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   11.859305][    T1] Key type encrypted registered
[   11.864632][   T94] ata1.00: configured for UDMA/133
[   11.880202][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EARX-00P AB51 PQ: 0 ANSI: 5
[   11.890423][  T108] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   11.899500][  T108] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   11.905643][  T108] sd 0:0:0:0: [sda] Write Protect is off
[   11.911183][  T108] sd 0:0:0:0: [sda] Asking for cache data failed
[   11.917455][  T103] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.924949][  T108] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   12.125956][  T103] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   12.134948][  T103] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   12.142873][  T103] usb 1-1: Product: USB2.0 Hub
[   12.148550][  T103] hub 1-1:1.0: USB hub found
[   12.153457][  T103] hub 1-1:1.0: 4 ports detected
[   12.234342][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[   12.361694][  T108]  sda: sda1 sda2
[   12.366397][  T108] sd 0:0:0:0: [sda] Attached SCSI disk
[   12.375196][    T1] Freeing unused kernel image (initmem) memory: 1024K
[   12.382785][    T1] Checked W+X mappings: passed, no W+X pages found
[   12.389236][    T1] Run /init as init process
Loading, please wait...
[   12.474282][  T103] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
Starting version 247.3-6
[   12.642368][  T103] usb 1-1.2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   12.664288][  T103] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   12.672368][  T103] usb 1-1.2: Product: DataTraveler 2.0
[   12.693420][  T103] usb 1-1.2: Manufacturer: Kingston
[   12.714330][  T103] usb 1-1.2: SerialNumber: C86000BDB983B0B02A2213A7
[   12.735004][  T103] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   12.756274][  T103] scsi host2: usb-storage 1-1.2:1.0
[   13.207708][  T137] usbcore: registered new interface driver uas
[   13.400721][  T146] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   13.481420][  T146] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   13.573077][  T146] libphy: r8169: probed
[   13.590389][  T146] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 38
[   13.634290][  T146] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[   14.092663][  T152] md0: detected capacity change from 0 to 3905993857
[   14.140592][  T147] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
[   15.018064][   T75] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[   15.032647][  T108] sd 2:0:0:0: [sdb] 15249408 512-byte logical blocks: (7.81 GB/7.27 GiB)
[   15.046882][  T108] sd 2:0:0:0: [sdb] Write Protect is off
[   15.052991][  T108] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   15.070613][  T108]  sdb: sdb1
[   15.086884][  T108] sd 2:0:0:0: [sdb] 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/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: clean, 20901/953440 files, 284095/1905168 blocks (check in 4 mounts)
done.
[   24.936421][  T191] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   25.055632][  T191] EXT4-fs (sdb1): 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...[   28.348268][  T378] hwmon_vid: Unknown VRM version of your CPU
[   28.357779][  T387] orion_wdt: Initial timeout 21 sec
[   28.441621][    C0] random: crng init done
[   28.552229][  T378] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   28.627347][  T378] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   28.963237][  T382] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Not activating swap on swapfile. ... (warning).
[   30.217690][  T530] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
[   30.226350][  T530] ext3 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
UUID=7167767a-a1b9-4847-b644-abf89504f702 is not mounted
[/sbin/fsck.ext2 (1) -- /mnt/sda1] fsck.ext2 -y -C0 /dev/sda1 
e2fsck 1.46.2 (28-Feb-2021)
/dev/sda1: clean, 13/128520 files, 506599/514048 blocks
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Loading kernel module adt7475.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
[   32.337610][  T783] ext2 filesystem being mounted at /mnt/sda1 supports timestamps until 2038 (0x7fffffff)
Will now mount local filesystems:.
Will now activate swapfile swap, if any:swapon: /mnt/sda1/swap_ul6545p: found signature [pagesize=4096, signature=swap]
swapon: /mnt/sda1/swap_ul6545p: pagesize=4096, swapsize=357564416, devsize=357564416
swapon /mnt/sda1/swap_ul6545p
[   35.520197][  T815] Adding 344940k swap on /mnt/sda1/swap_ul6545p.  Priority:-2 extents:1405 across:361932k FS
done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl.
[   37.062079][  T943] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168d-2.fw failed with error -2
[   37.072014][  T943] r8169 0000:01:00.0: Unable to load firmware rtl_nic/rtl8168d-2.fw (-2)
[   37.081656][  T943] RTL8211B Gigabit Ethernet r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[   37.176355][  T102] r8169 0000:01:00.0 enp1s0: Link is Down
[   39.201845][  T102] r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   39.210314][  T102] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enp1s0/00:00:00:00:00:30
Sending on   LPF/enp1s0/00:00:00:00:00:30
Sending on   Socket/fallback
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on enp1s0 to 255.255.255.255 port 67 interval 5
DHCPOFFER of 192.168.31.148 from 192.168.31.1
DHCPREQUEST for 192.168.31.148 on enp1s0 to 255.255.255.255 port 67
DHCPACK of 192.168.31.148 from 192.168.31.1
bound to 192.168.31.148 -- renewal in 37566 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
Setting sensors limits...
done.

INIT: Entering runlevel: 2


Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1088 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting MD monitoring service: mdadm --monitor.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1133 (klogd)
.
Running local boot scripts (/etc/rc.local)
.



Debian GNU/Linux 11 debian ttyS0

debian login: root
Password: 
Linux debian 5.15.5-kirkwood-tld-1 #1.0 PREEMPT Sun Nov 28 23:08:13 PST 2021 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jan 15 09:11:57 PST 2022 on ttyS0
debian
192.168.31.14
ZyXEL NSA310
Linux version 5.15.5-kirkwood-tld-1 (root@tldDebianVM) (arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sun Nov 28 23:08:13 PST 2021
Debian 11.2
Sat Jan 15 10:39:03 PST 2022 up 1 minute
root@debian:~# mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=114572k,nr_inodes=28643,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24052k,mode=755)
/dev/sdb1 on / type ext3 (rw,noatime,errors=remount-ro)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=48080k)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/sda1 on /mnt/sda1 type ext2 (rw,relatime,errors=continue)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
root@debian:~# swapon

NAME                   TYPE   SIZE USED PRIO
/mnt/sda1/swap_ul6545p file 336.9M   0B   -2
root@debian:~# free

               total        used        free      shared  buff/cache   available
Mem:          240484       21052      168904         460       50528      211332
Swap:         344940           0      344940
root@debian:~# 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
UUID=7167767a-a1b9-4847-b644-abf89504f702 /mnt/sda1 ext2 rw,auto 0 2
/mnt/sda1/swap_ul6545p swap swap defaults 0 0
root@debian:~#
Re: NSA310 with bad blocks in NAND
January 15, 2022 03:17PM
The /dev/sda2 problem seems to have resolved (itself!)
I did install mdadm but did not do anything with it.

Anyway, I am now seeing a /dev/md0 device for the (1 drive) raid volume (and which was not there earlier) and that mounts up fine to access the old XFS filesystem. I will add a mount to /etc/fstab.

root@debian:~# mkdir /media/big
root@debian:~# mount /dev/md0 /media/big

[  146.759371][ T1264] XFS (md0): Deprecated V4 format (crc=0) will not be supported after September 2030.
[  146.769324][ T1264] XFS (md0): Mounting V4 Filesystem
[  147.329622][ T1264] XFS (md0): Ending clean mount
[  147.334493][ T1264] xfs filesystem being mounted at /media/big supports timestamps until 2038 (0x7fffffff)
root@debian:~# ls /media/big

.  ..  .media  .system  .zyxel  HomeDisk  admin  music  photo  public  video
root@debian:
Re: NSA310 with bad blocks in NAND
January 15, 2022 03:48PM
Hilsen,

Looks great!

One more thing. It seems you have the 1st model of the NSA310.

Quote
kirkwood-nsa310.dts

i2c@11000 {
status = "okay";

adt7476: adt7476a@2e {
compatible = "adi,adt7476";
reg = <0x2e>;
};
};


The DTB for this model is
/boot/dts/kirkwood-nsa310.dtb

The kirkwood-nsa310b-lmsensor-redusbled.dtb is for the model that has lm85 sensor. This model has red LED for USB..

Now I search the older posts and see you added adt7476 to /etc/modules.

Quote

I did get lm-sensors installed, though I needed to do a general update/upgrade first.
ran sensors-detect and adt7476 added to /etc/modules

It is not necessary to explicitly load this module if you used the correct DTB.

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

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: