Welcome! Log In Create A New Profile

Advanced

NSA325 - help switching from OpenWrt to Debian

Posted by Tyrannus 
Tyrannus
NSA325 - help switching from OpenWrt to Debian
May 12, 2020 02:55PM
Hi I am OpenWRT, working fine, I want to boot from Debian instead. What should I do. Can anyone help?
Here is my console log USB serial:

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

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
## Error: "setenv" not defined
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=2", size 126 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 512 (aligned 512), data offset: 2048
ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1062167026
ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
Read 0 bytes from volume kernel to 800000
No size specified -> Using max size (2193408)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-4.14.167
   Created:      2020-01-29  16:05:35 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2081576 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.167 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10911-c155900f66)) #0 Wed Jan 29 16:05:35 2020
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from 0xc0700980 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512108K/524288K available (4804K kernel code, 162K rwdata, 728K rodata, 1024K init, 208K bss, 12180K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05b1030   (5797 kB)
[    0.000000]       .init : 0xc0700000 - 0xc0800000   (1024 kB)
[    0.000000]       .data : 0xc0800000 - 0xc0828ba0   ( 163 kB)
[    0.000000]        .bss : 0xc0828ba0 - 0xc085cf84   ( 209 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    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.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000033] Switching to timer-based delay loop, resolution 5ns
[    0.000099] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000119] pid_max: default: 32768 minimum: 301
[    0.000232] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000248] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000703] CPU: Testing write buffer coherency: ok
[    0.001337] Setting up static identity map for 0x100000 - 0x10003c
[    0.001556] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.004639] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.004659] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.004732] pinctrl core: initialized pinctrl subsystem
[    0.005618] NET: Registered protocol family 16
[    0.005888] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.006687] cpuidle: using governor ladder
[    0.006977] Feroceon L2: Enabling L2
[    0.007009] Feroceon L2: Cache support initialised.
[    0.007216] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.009953] No ATAGs?
[    0.021947] SCSI subsystem initialized
[    0.022451] usbcore: registered new interface driver usbfs
[    0.022493] usbcore: registered new interface driver hub
[    0.022533] usbcore: registered new device driver usb
[    0.023913] clocksource: Switched to clocksource orion_clocksource
[    0.024512] NET: Registered protocol family 2
[    0.024954] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.025008] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.025058] TCP: Hash tables configured (established 4096 bind 4096)
[    0.025115] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.025134] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.025235] NET: Registered protocol family 1
[    0.026079] Crashlog allocated RAM at address 0x3f00000
[    0.027254] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.030498] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.030509] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.036053] io scheduler noop registered
[    0.036064] io scheduler deadline registered (default)
[    0.036950] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.038032] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.038047] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.038055] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.038064] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.038236] PCI: bus0: Fast back to back transfers disabled
[    0.038247] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.038592] PCI: bus1: Fast back to back transfers disabled
[    0.038630] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.038643] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.038661] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.038672] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.038709] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.038726] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    0.039077] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.040418] console [ttyS0] disabled
[    0.040473] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.541530] console [ttyS0] enabled
[    0.545853] sata_mv f1080000.sata: slots 32 ports 2
[    0.553145] scsi host0: sata_mv
[    0.556696] scsi host1: sata_mv
[    0.559954] ata1: SATA max UDMA/133 irq 32
[    0.564082] ata2: SATA max UDMA/133 irq 32
[    0.568565] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    0.574964] nand: Eon NAND 128MiB 3,3V 8-bit
[    0.579254] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.586865] Scanning device for bad blocks
[    0.595779] Bad eraseblock 100 at 0x000000c80000
[    0.605161] Bad eraseblock 200 at 0x000001900000
[    0.648855] 3 fixed-partitions partitions found on MTD device orion_nand
[    0.655589] Creating 3 MTD partitions on "orion_nand":
[    0.660746] 0x000000000000-0x0000000c0000 : "uboot"
[    0.666062] 0x0000000c0000-0x000000140000 : "uboot_env"
[    0.671666] 0x000000140000-0x000008000000 : "ubi"
[    0.677468] libphy: Fixed MDIO Bus: probed
[    0.681765] libphy: orion_mdio_bus: probed
[    0.688003] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.696141] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 5c:f4:ab:50:0d:b2
[    0.704944] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.711500] ehci-pci: EHCI PCI platform driver
[    0.716006] ehci-orion: EHCI orion driver
[    0.720169] orion-ehci f1050000.ehci: EHCI Host Controller
[    0.725714] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    0.733487] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    0.763922] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    0.770342] hub 1-0:1.0: USB hub found
[    0.774261] hub 1-0:1.0: 1 port detected
[    0.778524] usbcore: registered new interface driver usb-storage
[    0.784716] i2c /dev entries driver
[    0.789056] orion_wdt: Initial timeout 21 sec
[    0.798023] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.805851] NET: Registered protocol family 10
[    0.811591] Segment Routing with IPv6
[    0.815345] NET: Registered protocol family 17
[    0.819826] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.832844] 8021q: 802.1Q VLAN Support v1.8
[    0.839447] UBI: auto-attach mtd2
[    0.842787] ubi0: attaching mtd2
[    1.016837] ubi0: scanning is finished
[    1.020699] ata1: SATA link down (SStatus 0 SControl F300)
[    1.037079] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[    1.042592] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.049528] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.056265] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.063082] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[    1.069204] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.076463] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1062167026
[    1.085642] ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
[    1.095496] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.101006] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.108146] hctosys: unable to open rtc device (rtc0)
[    1.113517] ubi0: background thread "ubi_bgt0d" started, PID 462
[    1.183926] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    1.355167] ata2: SATA link down (SStatus 0 SControl F300)
[    1.364090] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.374165] Freeing unused kernel memory: 1024K
[    1.474552] hub 1-1:1.0: USB hub found
[    1.478751] hub 1-1:1.0: 4 ports detected
[    1.533941] random: fast init done
[    1.608514] init: Console is alive
[    1.612041] init: - watchdog -
[    1.731786] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.790017] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.795329] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    1.803066] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    1.812929] hub 2-0:1.0: USB hub found
[    1.816886] hub 2-0:1.0: 2 ports detected
[    1.821179] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.826467] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    1.833919] xhci_hcd 0000:01:00.0: Host supports USB 3.0  SuperSpeed
[    1.840535] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.849024] hub 3-0:1.0: USB hub found
[    1.852952] hub 3-0:1.0: 2 ports detected
[    1.858404] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.875948] init: - preinit -
[    1.940393] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    2.131277] random: procd: uninitialized urandom read (4 bytes read)
[    2.137941] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    2.152382] scsi host2: usb-storage 1-1.2:1.0
[    2.300250] random: jshn: uninitialized urandom read (4 bytes read)
[    2.328254] random: jshn: uninitialized urandom read (4 bytes read)
[    2.599267] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    2.609178] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[    2.615966] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    3.205067] scsi 2:0:0:0: Direct-Access     SanDisk' Cruzer Fit       1.00 PQ: 0 ANSI: 6
[    3.214650] sd 2:0:0:0: [sda] 123174912 512-byte logical blocks: (63.1 GB/58.7 GiB)
[    3.223010] sd 2:0:0:0: [sda] Write Protect is off
[    3.228509] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    3.244417]  sda: sda1
[    3.249388] sd 2:0:0:0: [sda] Attached SCSI removable disk
[    5.482881] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    5.492798] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.771671] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 585
[    5.804683] UBIFS (ubi0:2): recovery needed
[    5.949707] UBIFS (ubi0:2): recovery completed
[    5.954256] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    5.962120] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    5.972092] UBIFS (ubi0:2): FS size: 122314752 bytes (116 MiB, 948 LEBs), journal size 6064128 bytes (5 MiB, 47 LEBs)
[    5.982751] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[    5.989406] UBIFS (ubi0:2): media format: w4/r0 (latest is w5/r0), UUID 3BFA64AE-764E-418C-9E10-3BEEB7FF0840, small LPT model
[    6.003887] mount_root: switching to ubifs overlay
[    6.018667] urandom-seed: Seeding with /etc/urandom.seed
[    6.073852] procd: - early -
[    6.077201] procd: - watchdog -
[    6.665873] procd: - watchdog -
[    6.669183] procd: - ubus -
[    6.730913] urandom_read: 3 callbacks suppressed
[    6.730918] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.742883] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.749522] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.756583] procd: - init -
Please press Enter to activate this console.
[    7.066032] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.086134] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.104688] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.114027] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[    7.162928] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    7.176144] urngd: v1.0.2 started.
[    7.190138] xt_time: kernel timezone is -0000
[    7.217190] PPP generic driver version 2.4.2
[    7.222779] NET: Registered protocol family 24
[    7.235602] kmodloader: done loading kernel modules from /etc/modules.d/*
[    7.267275] random: crng init done
[    7.270694] random: 1 urandom warning(s) missed due to ratelimiting
[   11.358094] br-lan: port 1(eth0) entered blocking state
[   11.363348] br-lan: port 1(eth0) entered disabled state
[   11.368790] device eth0 entered promiscuous mode
[   11.395581] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   14.038865] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   14.048789] br-lan: port 1(eth0) entered blocking state
[   14.054051] br-lan: port 1(eth0) entered forwarding state
[   14.060469] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

================
moderator edit: please used code tag to post log



Edited 1 time(s). Last edit at 05/12/2020 04:46PM by bodhi.
Re: NSA325 - help switching from OpenWrt to Debian
May 12, 2020 04:48PM
Tyrannus,

Interrupt serial console at count down and
printenv

Please post the entire serial console log again.

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

First and foremost, thank you for your fast reply and all the content you provided here for our device. You absolutelly rock!

printenv log: (Changed MAC adress values here, but it is populating).

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

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
NSA325> printenv
arcNumber=4495
baudrate=115200
bootcmd=run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800                                                                                                                                                             000
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then boo                                                                                                                                                             tm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a                                                                                                                                                             ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr -                                                                                                                                                              $load_dtb_addr; else bootm$load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=5C:F4:AB:50:2D:B2
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 $d                                                                                                                                                             tb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /b                                                                                                                                                             oot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /bo                                                                                                                                                             ot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
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 di                                                                                                                                                             sknum 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; se                                                                                                                                                             tenv 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";  se                                                                                                                                                             tenv 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 $disknu                                                                                                                                                             m: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_re                                                                                                                                                             ad;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2904/131068 bytes
NSA325>


Thanks again for all your help

=======
moderator edit: please use code tags (Formatted code button on the right top of the text box while you are typing post ).



Edited 1 time(s). Last edit at 05/13/2020 01:04AM by bodhi.
Re: NSA325 - help switching from OpenWrt to Debian
May 13, 2020 01:14AM
Tyrannus,

1. Create the Debian rootfs on USB thumb drive, using the tarball Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 , follow the instruction here:

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

Scroll down to


Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 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 in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

Your installed u-boot is the latest, so don't do step 4.

Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

2. Plug in the USB rootfs to the USB 2.0 port. Power up, interrupt serial console at count down, and

setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'
boot

That's it. Watch the serial console log, until you see the Debian log in prompt. Log in as root/root.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi! It worked!

setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'
boot

The problem now is that every time I reboot it takes me back to Openwrt (auto-boot).

Can you help me change that?

Many thanks.
Re: NSA325 - help switching from OpenWrt to Debian
May 13, 2020 02:16AM
Tyrannus,

Cool!

>
> setenv bootcmd 'run scan_disk; run set_bootargs;
> run bootcmd_exec'
> boot
>
>
> The problem now is that every time I reboot it
> takes me back to Openwrt (auto-boot).
>
> Can you help me change that?

Now after you test this a couple time. Log into Debian, and

fw_printenv
You will see the envs similar to printenv output in u-boot prompt then proceed. If not, dont do anything and post back.

If they look OK, then do fw_setenv to commit the change permanently

fw_setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

And reboot.

========

Later, if you want to boot Openwrt as a rescue system when the USB fails to boot, then a little bit more change in envs is needed.

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

No luck with:
fw_printenv

Getting this:

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password:
Last login: Wed May 13 00:18:17 PDT 2020 on ttyS0
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# fw_printenv
Cannot read bad block mark: Invalid argument
root@debian:~#

Thanks again!
Re: NSA325 - help switching from OpenWrt to Debian
May 13, 2020 02:44AM
Tyrannus,

> root@debian:~# fw_printenv
> Cannot read bad block mark: Invalid argument
> root@debian:~#
> [/code]

OK then the mtdparts is wrong.

Repeat the boot, but this time add another setenv

setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' 
setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

After you boot into Debian, log in and get

cat /proc/mtd

See if there are 2 partitions.

And then
fw_printenv

And see if the envs are sane. And commit the changes if they are

fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' 
fw_setenv bootcmd 'run scan_disk; run set_bootargs; run bootcmd_exec'

If you'd like post the entire serial console here.

=====

Note: your current envs are set to boot OpenWrt and has some different partitioning layout for NAND. So if you ever want to boot OpenWrt again, there is a little more envs modification to make that happens (more so than I thought before). If you only want to boot Debian, then the above 2 fw_setenv are all you need.

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



Edited 1 time(s). Last edit at 05/13/2020 02:45AM by bodhi.
Amazing Bodhi!

After doing the steps you mentioned I am booting straight to Debian!

You are the man. Now I will try and install Open media Vault in debian and be finally happy.

Do you still have your device? thanks for all the help, let me pay you a beer? send me a link.
Re: NSA325 - help switching from OpenWrt to Debian
May 13, 2020 03:53AM
Tyrannus,


> After doing the steps you mentioned I am booting
> straight to Debian!

Cool :)

> You are the man. Now I will try and install Open
> media Vault in debian and be finally happy.
>
> Do you still have your device?

Yes, my NSA325 is running 24/7 as one of the distributed nodes in my kernel build farm, and also is the backup machine for all other NAS in my home network!

> thanks for all the
> help, let me pay you a beer? send me a link.

It's in my signature: bodhi's corner

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Bodhi, Just wondering if I should I install this Kernel:

Linux Kernel 5.6.5 Kirkwood package
https://forum.doozan.com/read.php?2,12096

Now that I am with a working box. Let me know if you think there is an issue if I follow the guide.
Re: NSA325 - help switching from OpenWrt to Debian
May 13, 2020 04:57PM
Tyrannus,

> Linux Kernel 5.6.5 Kirkwood package
> https://forum.doozan.com/read.php?2,12096
>
> Now that I am with a working box. Let me know if
> you think there is an issue if I follow the guide.

Pretty safe to upgrade kernel. But it's good practice to back up before upgrade. 3 files need to be backed up so you can go back to the current kernel: your uImage, uInitrd, and dts/kirkwood-nsa325.dtb files. Or backup the whole /boot folder.

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