Welcome! Log In Create A New Profile

Advanced

Problem booting NSA320 with Linux Kernel 4.12.1-kirkwood-tld-1

Posted by Geah Heh 
Bodhi,

I followed your instructions to flash your uBoot image to my NSA320's NAND, and installed your 2017-07 version of kernel and root FS to a USB-powered SSD. The SSD contained a single EXT4 primary partition which is labeled as rootfs per your instruction. I then cold rebooted the device. uBoot seemed to work perfectly fine, which then picked up the kernel on the SSD. I however encountered a kernel panic during the booting process, the error message (superficially) appeared to be related to a missing /run/net-*.config file. I tried to touch a blank /run/net-1.config file to the SSD with no avail. I am posting the boot message below and would much appreciate if you could advise which part I may have done wrong and how should I correct it.

Note in the message below the box failed to get a DHCP IP address, not because the network card / module failed, but simply because I had the patch cable disconnected. In a different instance the box got the DHCP IP address perfectly fine.

Thanks!


===============================================

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:46:11 -0700)
ZyXEL NSA320 2-Bay Power Media Server

SoC:   Kirkwood 88F6281_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
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: OK
  Device 0: Model: WDC WD30EZRX-00MMMB0 Firm: 80.00A80 Ser#:  WD-WCAWZ2135552
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
  Device 1: Model: WDC WD30EZRX-00DC0B0 Firm: 80.00A80 Ser#:  WD-WCC1T0083436
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            231997953       85897bcc-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

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

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:   0c38e79c-ef49-4266-a7a4-4da12d6f7814
  2     0x000f4000      0x15d509fff     "eexxtt44"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   15d4fedb-052b-4192-9dd5-15e64500ee68


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

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x000f3fff      "mitraswap"
        attrs:  0x0000000000000000
        type:   0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
        type:   swap
        guid:   5b1bc3dd-da12-4654-b7e3-9dabbd5c7337
  2     0x000f4000      0x15d509fff     "eexxtt44"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        type:   data
        guid:   b90af540-140e-4324-b27c-52b1fd15cff4
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3821592 bytes read in 809 ms (4.5 MiB/s)
loading uInitrd ...
7245696 bytes read in 779 ms (8.9 MiB/s)
loading DTB /boot/dts/kirkwood-nsa320.dtb ...
13691 bytes read in 2675 ms (4.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 0f917000, end 0fffff40 ... OK
   Loading Device Tree to 0f910000, end 0f91657a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    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 NSA320
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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
[    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: 499256K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 25032K 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 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000042] Switching to timer-based delay loop, resolution 5ns
[    0.000512] Console: colour dummy device 80x30
[    0.000546] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000569] pid_max: default: 32768 minimum: 301
[    0.000768] Security Framework initialized
[    0.000892] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000911] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001759] CPU: Testing write buffer coherency: ok
[    0.002747] Setting up static identity map for 0x100000 - 0x100058
[    0.003039] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006304] devtmpfs: initialized
[    0.011451] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011478] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.011859] prandom: seed boundary self test passed
[    0.015595] prandom: 100 self tests passed
[    0.015606] pinctrl core: initialized pinctrl subsystem
[    0.016763] NET: Registered protocol family 16
[    0.017309] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018913] cpuidle: using governor ladder
[    0.018984] cpuidle: using governor menu
[    0.019513] Feroceon L2: Enabling L2
[    0.019559] Feroceon L2: Cache support initialised.
[    0.019951] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.025545] No ATAGs?
[    0.035179] vgaarb: loaded
[    0.035501] SCSI subsystem initialized
[    0.035978] usbcore: registered new interface driver usbfs
[    0.036056] usbcore: registered new interface driver hub
[    0.036148] usbcore: registered new device driver usb
[    0.037219] clocksource: Switched to clocksource orion_clocksource
[    0.125966] VFS: Disk quotas dquot_6.6.0
[    0.126047] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.136699] NET: Registered protocol family 2
[    0.137472] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.137533] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.137586] TCP: Hash tables configured (established 4096 bind 4096)
[    0.137672] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.137697] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.137872] NET: Registered protocol family 1
[    0.138277] RPC: Registered named UNIX socket transport module.
[    0.138289] RPC: Registered udp transport module.
[    0.138296] RPC: Registered tcp transport module.
[    0.138303] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.138536] Unpacking initramfs...
[    0.793049] Freeing initrd memory: 7076K
[    0.793264] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.794091] audit: initializing netlink subsys (disabled)
[    0.794528] Initialise system trusted keyrings
[    0.794589] Key type blacklist registered
[    0.794681] audit: type=2000 audit(0.787:1): state=initialized audit_enabled=0 res=1
[    0.794778] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.794848] zbud: loaded
[    0.795808] NFS: Registering the id_resolver key type
[    0.795838] Key type id_resolver registered
[    0.795846] Key type id_legacy registered
[    0.795871] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.795882] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.796078] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.796274] fuse init (API version 7.26)
[    0.796610] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.796824] orangefs_init: module version upstream loaded
[    0.796836] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.557230] random: fast init done
[    6.642366] Key type asymmetric registered
[    6.642383] Asymmetric key parser 'x509' registered
[    6.642449] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    6.642460] io scheduler noop registered
[    6.642468] io scheduler deadline registered
[    6.642554] io scheduler cfq registered (default)
[    6.643812] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.645688] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    6.645710] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    6.645723] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.645737] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.646073] PCI: bus0: Fast back to back transfers disabled
[    6.646098] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.646262] PCI: bus1: Fast back to back transfers enabled
[    6.646337] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.646905] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.707953] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.708182] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.767948] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.768401] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.769734] console [ttyS0] disabled
[    6.769799] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.435698] console [ttyS0] enabled
[    7.447627] loop: module loaded
[    7.451357] sata_mv f1080000.sata: slots 32 ports 2
[    7.459105] scsi host0: sata_mv
[    7.462709] scsi host1: sata_mv
[    7.466103] ata1: SATA max UDMA/133 irq 33
[    7.470270] ata2: SATA max UDMA/133 irq 33
[    7.475153] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    7.481636] nand: Samsung NAND 128MiB 3,3V 8-bit
[    7.486280] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.493912] Scanning device for bad blocks
[    7.596591] 9 ofpart partitions found on MTD device orion_nand
[    7.602469] Creating 9 MTD partitions on "orion_nand":
[    7.607662] 0x000000000000-0x000000100000 : "uboot"
[    7.613881] 0x000000100000-0x000000180000 : "uboot_env"
[    7.620511] 0x000000180000-0x000000200000 : "key_store"
[    7.627076] 0x000000200000-0x000000280000 : "info"
[    7.633031] 0x000000280000-0x000000c80000 : "etc"
[    7.638979] 0x000000c80000-0x000001680000 : "kernel_1"
[    7.645356] 0x000001680000-0x000004640000 : "rootfs1"
[    7.651998] 0x000004640000-0x000005040000 : "kernel_2"
[    7.658509] 0x000005040000-0x000008000000 : "rootfs2"
[    7.666378] libphy: Fixed MDIO Bus: probed
[    7.671394] libphy: orion_mdio_bus: probed
[    7.680487] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.787714] mv643xx_eth: Set the PHY to fix link down
[    7.788387] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address c8:6c:87:f8:3e:b9
[    7.802382] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.809060] ehci-pci: EHCI PCI platform driver
[    7.813579] ehci-orion: EHCI orion driver
[    7.817843] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.823385] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.831266] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    7.867252] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.873525] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.880375] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.887647] usb usb1: Product: EHCI Host Controller
[    7.892545] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    7.899295] usb usb1: SerialNumber: f1050000.ehci
[    7.904650] hub 1-0:1.0: USB hub found
[    7.908515] hub 1-0:1.0: 1 port detected
[    7.913074] usbcore: registered new interface driver usb-storage
[    7.919504] mousedev: PS/2 mouse device common for all mice
[    7.925670] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    7.932776] i2c /dev entries driver
[    7.942837] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
[    7.952850] hidraw: raw HID events driver (C) Jiri Kosina
[    7.958694] drop_monitor: Initializing network drop monitor service
[    7.965218] NET: Registered protocol family 17
[    7.969788] Key type dns_resolver registered
[    7.974932] registered taskstats version 1
[    7.979110] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    7.985802] Loading compiled-in X.509 certificates
[    7.990823] zswap: loaded using pool lzo/zbud
[    8.005164] Key type big_key registered
[    8.017429] ata1.00: ATA-8: WDC WD30EZRX-00MMMB0, 80.00A80, max UDMA/133
[    8.024167] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.032415] Key type encrypted registered
[    8.033744] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    8.079581] ata1.00: configured for UDMA/133
[    8.094460] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00M 0A80 PQ: 0 ANSI: 5
[    8.103812] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    8.112126] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    8.117534] sd 0:0:0:0: [sda] Write Protect is off
[    8.122474] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.181286]  sda: sda1 sda2
[    8.185952] sd 0:0:0:0: [sda] Attached SCSI disk
[    8.277257] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.469027] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    8.475780] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.482983] usb 1-1: Product: USB2.0 Hub
[    8.487833] hub 1-1:1.0: USB hub found
[    8.491901] hub 1-1:1.0: 4 ports detected
[    8.617259] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    8.628122] ata2.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
[    8.634865] ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.644257] ata2.00: configured for UDMA/133
[    8.659131] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
[    8.668391] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    8.676171] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    8.681856] sd 1:0:0:0: [sdb] Write Protect is off
[    8.686796] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.817248] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    9.048650] usb 1-1.2: New USB device found, idVendor=152d, idProduct=1561
[    9.055573] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.062953] usb 1-1.2: Product: SABRENT
[    9.066806] usb 1-1.2: Manufacturer: SABRENT
[    9.071118] usb 1-1.2: SerialNumber: DB9876543214E
[    9.404043]  sdb: sdb1 sdb2
[    9.408639] sd 1:0:0:0: [sdb] Attached SCSI disk
[    9.416155] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    9.967404] scsi host2: uas
[    9.971832] scsi 2:0:0:0: Direct-Access     SABRENT                   0204 PQ: 0 ANSI: 6
[    9.985121] usbcore: registered new interface driver uas
[   10.050192] sd 2:0:0:0: [sdc] 234441648 512-byte logical blocks: (120 GB/112 GiB)
[   10.064357] sd 2:0:0:0: [sdc] 4096-byte physical blocks
[   10.075562] sd 2:0:0:0: [sdc] Write Protect is off
[   10.086060] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   10.617087]  sdc: sdc1
[   10.624792] sd 2:0:0:0: [sdc] Attached SCSI disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/nfs-top ... done.
Begin: Running /scripts/nfs-premount ... done.
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 2 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 3 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 4 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 6 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 9 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 16 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 25 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 36 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
[   20.948939] mv643xx_eth: Set the PHY back to auto-negotiation mode
[  128.022644] random: crng init done
IP-Config: no response after 64 secs - giving up
IP-Config: eth0 hardware address c8:6c:87:f8:3e:b9 mtu 1500 DHCP RARP
IP-Config: no response after 100 secs - giving up
/init: .: line 230: can't open '/run/net-*.conf'
[  285.847350] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[  285.847350]
[  285.856536] CPU: 0 PID: 1 Comm: init Not tainted 4.12.1-kirkwood-tld-1 #1
[  285.863348] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[  285.869676] [<c010ea54>] (unwind_backtrace) from [<c010ab48>] (show_stack+0x10/0x14)
[  285.877464] [<c010ab48>] (show_stack) from [<c01dba9c>] (panic+0xb0/0x250)
[  285.884378] [<c01dba9c>] (panic) from [<c011a3e8>] (do_exit+0x5e0/0xa64)
[  285.891113] [<c011a3e8>] (do_exit) from [<c011bc18>] (do_group_exit+0x4c/0xec)
[  285.898376] [<c011bc18>] (do_group_exit) from [<c011bcc8>] (__wake_up_parent+0x0/0x18)
[  285.906341] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[  285.906341]


--------

Moderator: please used code tags to post logs



Edited 2 time(s). Last edit at 04/13/2018 10:29PM by bodhi.
Re: Problem booting NSA320 with Linux Kernel 4.12.1-kirkwood-tld-1
April 13, 2018 10:37PM
Geah Heh,

Your bootargs env was set incorrectly. It got concated with old info:

[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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

So power up, interrupt serial console and reset it to the correct value:
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params'

And then boot:

boot

Observe serial console and see if everything is normal. If not, please post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you so much, Bodhi. I got your concept and made two changes during prior to booting, which seemed to work now!

My changes are as following
NSA320> setenv 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)'
NSA320> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params'

The reason for above, is that, by inspecting your highlighted text above, it realized those obsolete configs were copied / pasted during uBoot flashing, where you instructed me to restore the mtdparts and ethaddr values from the old environment (see your instruction at https://forum.doozan.com/read.php?3,12381), whereas, somehow my old fw_printenv output was as below

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
kernel_addr=480000
MODEL_ID=DD01
PRODUCT_NAME=NSA-320
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
ethaddr=C8:6C:87:F8:3E:B9

I suspect the highlighted part was due to wired text wrapping (a different line of text mistakenly saved as part of the mtdparts).

Anyhow, I was able to rescue the box and log as root/root now.

The last question is, how should I make the above-mentioned two changes permanent? Should I use fw_setenv to write these values, or should I change any part of the SSD?

Thanks again!
Re: Problem booting NSA320 with Linux Kernel 4.12.1-kirkwood-tld-1
April 13, 2018 10:57PM
Geah Heh,

Cool!

You should set them permanently using fw_setenv.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Update: I just ventured to use fw_setenv to change the two-mentioned fields, however, I got the below error despite I was root:

Can't open /dev/mtd0: Permission denied
Error: can't write fw_env to flash
Update 2: Tried to regenerate SSH host key, changed root password, logged out and back in, and tried fw_setenv again, still got the permission denied error. What could be wrong? Thanks again!
Re: Problem booting NSA320 with Linux Kernel 4.12.1-kirkwood-tld-1
April 14, 2018 12:07AM
Geah Heh,

Ah! I forgot.

1. With the new kernel, the mtd driver must be orion_nand
2. The env needs an extra mtdparts

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

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks again, Bodhi. It looked as if the problem is at all rooted from my bad mtdparts definition and the syntax I used to update the firmware environment. It turned out that my previous attempts in ways (or similar to) below DID NOT work:

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

whereas the command you provided below worked perfectly:

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

After the update, my current mtdparts definition looks like:

root@debian:~# fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)


Now the box appears totally up. I am going to further venture in apt upgrades and update to your latest kernel as well. Thanks again for your great contribution to the community!
Re: Problem booting NSA320 with Linux Kernel 4.12.1-kirkwood-tld-1
April 14, 2018 04:34AM
Geah Heh,

> Now the box appears totally up. I am going to
> further venture in apt upgrades and update to your
> latest kernel as well. Thanks again for your great
> contribution to the community!

Cool!

The mtdparts syntax is a little bit confusing. But that was the established precedent in u-boot env and Linux kernel so I did not want to use a better variable name for u-boot env to differentiate:
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)

In the above, the 1st mtdparts is the u-boot env, the 2nd mtdparts is the Linux kernel command line keyword for an argument (which tells the kernel what is the mtdparts definition). They just happen to be the same :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks again for the detailed explanation. As an old school Linux HPC user, I have never ventured to the embedded Linux world until most recently. I'm glad that I learned something new from you. I did more readings on mtd/band/firmware management, which appears very interesting. Now that I've successfully installed open media vault to this zyxel NAS and restored its existing radio using mdadm I think I'll mess up some of my old routers and NAS more down the road. ..
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: