Welcome! Log In Create A New Profile

Advanced

Install Debian on NSA310S

Posted by Arisu 
Install Debian on NSA310S
April 05, 2023 12:53PM
Hello everyone,

I've been trying to install Debian on my NSA310S for days.
I managed to get to the point where I can access the nas via a USB serial adapter. Have already tried with various Uboot and instructions. However, most of the links to the files are already offline. Can someone please post a small instruction here or knows one that is active and the instruction also works.

Thanks so much
Re: Install Debian on NSA310S
April 05, 2023 02:28PM
The basic steps to install Debian and new u-boot on Kirkwood box

If you are inside stock OS (or if you are running another Linux distro on this box already), you can install both new U-Boot and new Debian rootfs.

1. On another Linux box, create the Debian rootfs using Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 following the instruction.

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

Scroll down to the section 26 Sept 2021.

2. Dowload the u-boot tarball uboot.2017.07-tld-1.nsa310s.bodhi.tar to this new USB rootfs:

U-Boot:
https://forum.doozan.com/read.php?3,12381

3. And then attach the new USB rootfs to the NSA310s box. Follow the u-boot installation instruction to flash u-boot.

4. Reboot. It will boot into Debian on USB rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Install Debian on NSA310S
April 06, 2023 12:49PM
Hello Bodhi

Many thanks for your help I have now been able to successfully install the U boot.

now I have reformatted a 32 GB stick as per your instructions in single Ext3 partition, and label it rootfs.

I also created the data with the command
"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"


Now I get the following message from the console with the NSA310S

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:50:06 -0700)
ZyXEL NSA310S/320S 1/2-Bay Power Media Server

SoC:   Kirkwood 88F6702_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
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)
** First descriptor is NOT a primary desc on 0:1 **
1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: WDC WD40EFRX-68WT0N0 Firm: 82.00A82 Ser#:  WD-WCC4E2LH9CDD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
## 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

## Unknown partition table type 0
loading envs from usb 0 ...
** No partition table - usb 0 **

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

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x000f3fff      "firmware"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   c56214d8-4d0c-4f95-94ba-f99af170b274
  2     0x000f4000      0x1d1c0b7ff     "eexxtt44"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   955714d6-bb45-4558-9b33-9d4b090e2bca
running scan_disk ...
Scan device usb
device usb 0:1
** No partition table - usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: WDC WD40EFRX-68WT0N0 Firm: 82.00A82 Ser#:  WD-WCC4E2LH9CDD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
device ide 0:1
** File not found /boot/uImage **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
loading uImage ...
** No partition table - usb 0 **
loading uInitrd ...
** No partition table - usb 0 **
loading DTB /boot/dts/kirkwood-nsa310s.dtb ...
** No partition table - usb 0 **
Unknown command 'bootm0x800000' - try 'help'
resetting ...

Re: Install Debian on NSA310S
April 06, 2023 02:07PM
Arisu,


> 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)
> ** First descriptor is NOT a primary desc on 0:1
> **
> 1 Storage Device(s) found

> ** No partition table - usb 0 **
> loading DTB /boot/dts/kirkwood-nsa310s.dtb ...
> ** No partition table - usb 0 **
> Unknown command 'bootm0x800000' - try 'help'
> resetting ...

The USB was not formatted correctly. You need to run fdisk at Linux command line to remove all partitions, create 1 partition, and then format it as Ext3. Extract the rootfs to that parition. Doing all these activities while being root user (sudo does not work).

Also, what you said above telling me that you're using the wrong instruction. Here is what the instruction said

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).

After extract the rootfs to the USB partition, you are done creating rootfs. There is no need to do Step 4, because you will be booting with new u-boot.

So restore the original uImage.

cp -a uImage.orig uImage

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



Edited 2 time(s). Last edit at 04/06/2023 02:11PM by bodhi.
Re: Install Debian on NSA310S
April 07, 2023 11:07AM
So I've made everything new again, now he recognizes the usb and starts but has the next error message

It can't be that this is so difficult ^^


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:50:06 -0700)
ZyXEL NSA310S/320S 1/2-Bay Power Media Server

SoC:   Kirkwood 88F6702_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
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
5435888 bytes read in 957 ms (5.4 MiB/s)
9671091 bytes read in 908 ms (10.2 MiB/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 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1d2000, end 0fb0b173 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00001343, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.


Re: Install Debian on NSA310S
April 07, 2023 12:55PM
After what felt like 1000 attempts, I successfully started the NSA310S with debian.

What is missing now is that my lan connection would go.

Console boot
NSA3x0S> boot
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 WD40EFRX-68WT0N0 Firm: 82.00A82 Ser#:  WD-WCC4E2LH9CDD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            61339648        5869f19a-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
2777 bytes read in 800 ms (2.9 KiB/s)

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

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x000f3fff      "firmware"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   c56214d8-4d0c-4f95-94ba-f99af170b274
  2     0x000f4000      0x1d1c0b7ff     "eexxtt44"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   955714d6-bb45-4558-9b33-9d4b090e2bca
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 722 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 926 ms (5.6 MiB/s)
loading uInitrd ...
9671091 bytes read in 877 ms (10.5 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310s.dtb ...
12774 bytes read in 3536 ms (2.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 0f1d2000, end 0fb0b173 ... OK
   Loading Device Tree to 0f1cb000, end 0f1d11e5 ... 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 NSA310S
[    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: 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: 11467562657 ns
[    0.000002][    T0] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000066][    T0] Switching to timer-based delay loop, resolution 6ns
[    0.001060][    T0] Console: colour dummy device 80x30
[    0.001145][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.001195][    T0] pid_max: default: 32768 minimum: 301
[    0.001663][    T0] LSM: Security Framework initializing
[    0.001870][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001923][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003551][    T0] CPU: Testing write buffer coherency: ok
[    0.006181][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.006560][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006930][    T1] rcu: Hierarchical SRCU implementation.
[    0.008516][    T1] devtmpfs: initialized
[    0.016290][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.016352][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.061337][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.061389][    T1] prandom: seed boundary self test passed
[    0.066437][    T1] prandom: 100 self tests passed
[    0.066458][    T1] pinctrl core: initialized pinctrl subsystem
[    0.068257][    T1] NET: Registered protocol family 16
[    0.069117][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.070284][    T1] audit: initializing netlink subsys (disabled)
[    0.071866][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.072287][   T16] audit: type=2000 audit(0.070:1): state=initialized audit_enabled=0 res=1
[    0.072494][    T1] cpuidle: using governor ladder
[    0.072608][    T1] cpuidle: using governor menu
[    0.073217][    T1] Feroceon L2: Enabling L2
[    0.073276][    T1] Feroceon L2: Cache support initialised.
[    0.086030][    T1] No ATAGs?
[    2.560074][    C0] random: fast init done
[    5.949101][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    5.977703][   T59] wait_for_initramfs() called before rootfs_initcalls
[    6.170278][    T1] raid6: int32x8  gen()    93 MB/s
[    6.340314][    T1] raid6: int32x8  xor()    58 MB/s
[    6.510108][    T1] raid6: int32x4  gen()    95 MB/s
[    6.680167][    T1] raid6: int32x4  xor()    61 MB/s
[    6.850265][    T1] raid6: int32x2  gen()   122 MB/s
[    7.020094][    T1] raid6: int32x2  xor()    75 MB/s
[    7.190284][    T1] raid6: int32x1  gen()    93 MB/s
[    7.360278][    T1] raid6: int32x1  xor()    55 MB/s
[    7.360299][    T1] raid6: using algorithm int32x2 gen() 122 MB/s
[    7.360316][    T1] raid6: .... xor() 75 MB/s, rmw enabled
[    7.360330][    T1] raid6: using intx1 recovery algorithm
[    7.360623][    T1] vgaarb: loaded
[    7.361275][    T1] SCSI subsystem initialized
[    7.361849][    T1] usbcore: registered new interface driver usbfs
[    7.361947][    T1] usbcore: registered new interface driver hub
[    7.362012][    T1] usbcore: registered new device driver usb
[    7.362244][    T1] pps_core: LinuxPPS API ver. 1 registered
[    7.362263][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    7.362303][    T1] PTP clock support registered
[    7.364393][    T1] clocksource: Switched to clocksource orion_clocksource
[    7.475120][    T1] VFS: Disk quotas dquot_6.6.0
[    7.475241][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.494185][    T1] NET: Registered protocol family 2
[    7.494384][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    7.504884][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    7.504946][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.504999][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.505047][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    7.505321][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    7.505406][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.505455][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.505729][    T1] NET: Registered protocol family 1
[    7.506538][    T1] RPC: Registered named UNIX socket transport module.
[    7.506566][    T1] RPC: Registered udp transport module.
[    7.506581][    T1] RPC: Registered tcp transport module.
[    7.506595][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.506616][    T1] PCI: CLS 0 bytes, default 32
[    7.506826][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.507459][   T58] Trying to unpack rootfs image as initramfs...
[    9.507508][   T58] Freeing initrd memory: 9448K
[   10.296939][    T1] Initialise system trusted keyrings
[   10.297027][    T1] Key type blacklist registered
[   10.297313][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[   10.297453][    T1] zbud: loaded
[   10.299156][    T1] NFS: Registering the id_resolver key type
[   10.299204][    T1] Key type id_resolver registered
[   10.299221][    T1] Key type id_legacy registered
[   10.299272][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   10.299301][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[   10.299319][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   10.299645][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   10.300183][    T1] fuse: init (API version 7.34)
[   10.300651][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   10.300913][    T1] orangefs_init: module version upstream loaded
[   10.300936][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[   10.422431][    T1] xor: measuring software checksum speed
[   10.433182][    T1]    arm4regs        :   927 MB/sec
[   10.450968][    T1]    8regs           :   556 MB/sec
[   10.463323][    T1]    32regs          :   802 MB/sec
[   10.463344][    T1] xor: using function: arm4regs (927 MB/sec)
[   10.463371][    T1] async_tx: api initialized (async)
[   10.463393][    T1] Key type asymmetric registered
[   10.463409][    T1] Asymmetric key parser 'x509' registered
[   10.463481][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[   10.463572][    T1] io scheduler bfq registered
[   10.703014][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[   10.705293][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[   10.705398][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[   10.705453][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[   10.705494][    T1] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[   10.705857][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[   10.705886][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[   10.705915][    T1] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[   10.705941][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[   10.705965][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[   10.706125][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[   10.706172][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[   10.707868][    T1] PCI: bus0: Fast back to back transfers disabled
[   10.707912][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   10.709487][    T1] PCI: bus1: Fast back to back transfers enabled
[   10.709524][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[   10.709776][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0000000-0xe00007ff pref]
[   10.709811][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[   10.710550][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[   10.765739][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   10.768826][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[   10.825712][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   10.829108][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   10.830769][    T1] printk: console [ttyS0] disabled
[   10.830885][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16550A
[   11.810031][    T1] printk: console [ttyS0] enabled
[   11.824829][    T1] loop: module loaded
[   11.829603][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   11.839337][    T1] scsi host0: sata_mv
[   11.843900][    T1] scsi host1: sata_mv
[   11.848097][    T1] ata1: SATA max UDMA/133 irq 32
[   11.852881][    T1] ata2: SATA max UDMA/133 irq 32
[   11.858758][    T1] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[   11.865874][    T1] nand: Eon NAND 128MiB 3,3V 8-bit
[   11.870824][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   11.879428][    T1] Scanning device for bad blocks
[   11.890030][    T1] Bad eraseblock 100 at 0x000000c80000
[   11.901070][    T1] Bad eraseblock 200 at 0x000001900000
[   11.953551][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[   11.960554][    T1] Creating 4 MTD partitions on "orion_nand":
[   11.966402][    T1] 0x000000000000-0x000000100000 : "u-boot"
[   11.973767][    T1] 0x000000100000-0x000000500000 : "uImage"
[   11.981069][    T1] 0x000000500000-0x000002500000 : "rootfs"
[   11.988529][    T1] 0x000002500000-0x000008000000 : "data"
[   11.996712][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   12.005265][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   12.016921][    T1] libphy: Fixed MDIO Bus: probed
[   12.023432][    T1] libphy: orion_mdio_bus: probed
[   12.028271][    T1] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@1: Whitelisted compatible string. Please remove
[   12.058313][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   12.067511][    T1] mv643xx_eth: Set the PHY to fix link down
[   12.068268][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address e8:37:7a:17:60:76
[   12.083634][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   12.091135][    T1] ehci-pci: EHCI PCI platform driver
[   12.096425][    T1] ehci-orion: EHCI orion driver
[   12.101345][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   12.107633][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   12.116228][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   12.144422][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   12.151481][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   12.160474][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   12.168415][    T1] usb usb1: Product: EHCI Host Controller
[   12.174008][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   12.181423][    T1] usb usb1: SerialNumber: f1050000.ehci
[   12.187690][    T1] hub 1-0:1.0: USB hub found
[   12.192218][    T1] hub 1-0:1.0: 1 port detected
[   12.197863][    T1] usbcore: registered new interface driver usb-storage
[   12.205049][    T1] mousedev: PS/2 mouse device common for all mice
[   12.211630][    T1] i2c /dev entries driver
[   12.218737][    T1] ht1382 0-0068: registered as rtc0
[   12.224863][    T1] ht1382 0-0068: setting system clock to 2023-04-07T18:26:17 UTC (1680891977)
[   12.234724][    T1] device-mapper: uevent: version 1.0.3
[   12.240370][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   12.250005][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   12.257278][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   12.264589][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   12.271944][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   12.278737][    T1] device-mapper: raid: Loading target version 1.15.1
[   12.288267][    T1] hid: raw HID events driver (C) Jiri Kosina
[   12.294581][    T1] drop_monitor: Initializing network drop monitor service
[   12.302073][    T1] NET: Registered protocol family 10
[   12.308788][    T1] Segment Routing with IPv6
[   12.313141][    T1] RPL Segment Routing with IPv6
[   12.318038][    T1] NET: Registered protocol family 17
[   12.323428][    T1] Key type dns_resolver registered
[   12.329040][    T1] registered taskstats version 1
[   12.333832][    T1] Loading compiled-in X.509 certificates
[   12.339949][    T1] zswap: loaded using pool lzo/zbud
[   12.345468][    T1] Key type ._fscrypt registered
[   12.350164][    T1] Key type .fscrypt registered
[   12.354847][    T1] Key type fscrypt-provisioning registered
[   12.362580][    T1] Key type big_key registered
[   12.367194][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   12.384733][   T94] ata1.00: ATA-9: WDC WD40EFRX-68WT0N0, 82.00A82, max UDMA/133
[   12.392128][   T94] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   12.408128][   T94] ata1.00: configured for UDMA/133
[   12.430288][    T1] Key type encrypted registered
[   12.435634][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40EFRX-68W 0A82 PQ: 0 ANSI: 5
[   12.449724][   T81] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[   12.458843][   T81] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   12.464976][   T81] sd 0:0:0:0: [sda] Write Protect is off
[   12.470599][   T81] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   12.484457][  T104] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   12.530104][   T81]  sda: sda1 sda2
[   12.535789][   T81] sd 0:0:0:0: [sda] Attached SCSI disk
[   12.686239][  T104] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.32
[   12.695149][  T104] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   12.703011][  T104] usb 1-1: Product: USB2.0 Hub
[   12.708608][  T104] hub 1-1:1.0: USB hub found
[   12.713363][  T104] hub 1-1:1.0: 4 ports detected
[   12.799454][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[   12.818781][    T1] Freeing unused kernel memory: 1024K
[   12.825178][    T1] Checked W+X mappings: passed, no W+X pages found
[   12.831592][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   13.044506][  T104] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[   13.215621][  T104] usb 1-1.3: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.00
[   13.240905][  T104] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.267693][  T104] usb 1-1.3: Product: Cruzer Blade
[   13.272667][  T104] usb 1-1.3: Manufacturer: SanDisk
[   13.296273][  T104] usb 1-1.3: SerialNumber: 4C530000150731114031
[   13.336959][  T104] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   13.359079][  T104] scsi host2: usb-storage 1-1.3:1.0
[   13.824742][  T143] usbcore: registered new interface driver uas
[   13.927315][  T137] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   14.406000][   T58] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
[   14.429807][   T81] sd 2:0:0:0: [sdb] 61341696 512-byte logical blocks: (31.4 GB/29.3 GiB)
[   14.445678][   T81] sd 2:0:0:0: [sdb] Write Protect is off
[   14.456410][   T81] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   14.487324][   T81]  sdb: sdb1
[   14.499422][   T81] sd 2:0:0:0: [sdb] Attached SCSI removable disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.36.1
fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/sdb1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[   30.167875][  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...[   33.463766][  T356] orion_wdt: Initial timeout 25 sec
[   33.656299][    C0] random: crng init done
[   33.716479][  T355] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   33.785010][  T355] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   34.176866][  T353] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   35.623850][  T502] EXT4-fs (sdb1): re-mounted. Opts: (null). Quota mode: none.
Will now check root file system:[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sdb1
e2fsck 1.46.2 (28-Feb-2021)
rootfs: clean, 15651/1916928 files, 345951/7667456 blocks
.
[   35.923521][  T514] 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 "enp1s0"
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 enp1s0
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...
1041 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1089 (klogd)
.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

debian login:


my env
NSA3x0S> printenv
arcNumber=4931
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310s.dtb
ethact=egiga0
ethaddr=E8:37:7A:17:60:76
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3009/131068 bytes


my /etc/network/interfaces

auto lo enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

Debian ip a
root@debian:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether e8:37:7a:17:60:76 brd ff:ff:ff:ff:ff:ff



Edited 1 time(s). Last edit at 04/07/2023 01:47PM by Arisu.
Re: Install Debian on NSA310S
April 07, 2023 02:38PM
Arisu,

Quote

After what felt like 1000 attempts, I successfully started the NSA310S with debian.

Congrats! you must have missed a step during installation. In the previous boot you did not have the DTB loaded. This boot you did.

The rootfs will work out of the box. There is no need to change anything.

Quote

my /etc/network/interfaces

auto lo enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

That's not what it should be. It should be eth0.

You can also do this right now to bring the nework up.
ifdown eth0
ifup eth0

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Install Debian on NSA310S
April 08, 2023 10:54AM
So now I've changed my interface under /etc/network/interfaces

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

after restarting the network I get it now
root@debian:~# /etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPRELEASE of 192.168.0.15 on eth0 to 192.168.0.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
dhclient.c:2879: Failed to send 300 byte long packet over fallback interface.
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/

[  183.729329][ T1267] mv643xx_eth: Set the PHY back to auto-negotiation mode
Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.

However, the LED lights do not blink on the NSA310S

Do I have to enter the NSA310S Mac address somewhere in Debian rootfs or u-boot ?

does one have to be entered or does he simply generate it himself.

If you have 2 NSA310S, the Mac address is on the case, but I don't know which case belongs to the circuit board.

where does it get the address

DHCPRELEASE from 192.168.0.15 on eth0 on 192.168.0.1 port 67 ?

my network is 192.168.179.1 fritz.box
Subnet mask 255.255.255.0






So now I've done it and the error you shouldn't believe it was the shitty cable



Edited 1 time(s). Last edit at 04/08/2023 11:58AM by Arisu.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: