Welcome! Log In Create A New Profile

Advanced

Zyxel NSA325 Newbie question for update uBoot

Posted by Hans Peter 
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 10:28AM
bodhi Wrote:
-------------------------------------------------------
> See this post:
>
> https://forum.doozan.com/read.php?2,82824,82854#msg-82854
>
> Basically, you will run the kwboot command on the
> rPi command line (instead of running
> minicom/picocom/screen to connect).

Haha! I had started to reassemble the box already. I had surrendered to the NSA. But this kwboot-thing really worked. :-)

So where do I go from here? My Debian USB kernel panics:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 11:38AM
fgh,


> Haha! I had started to reassemble the box already.
> I had surrendered to the NSA. But this
> kwboot-thing really worked. :-)

Very good :) that means your u-boot flashing has error somewhere that was not apparent.


>
> So where do I go from here? My Debian USB kernel
> panics:
> Kernel panic - not syncing: VFS: Unable to mount
> root fs on unknown-block(0,0)

This error could be a result of one of a few possible different reasons. The most likely reason is because your Ext3 partition was not labed rootfs. Check that first. If it was not labeled rootfs, then do that on the rPi and try booting again.

If it was labeled rootfs and when you boot and you still see this error, do the following.

Run kwboot like you did. Interrupt the u-boot countdown, and,

printenv
boot

Let it boot until stop witth that VFS error. And then capture the entire serial console log (from kwboot command until the last line on the screen), and post it here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 12:01PM
root@rufus:/home/fgh# lsblk -f
NAME        FSTYPE LABEL  UUID                                 MOUNTPOINT
sda
└─sda1      ext3   rootfs 426e95df-411a-4b91-8467-628b4aae9481


root@rufus:/home/fgh# kwboot  -t -B 115200 /dev/ttyS0 -b /home/fgh/uboot.2017.07                                                                              -tld
1.nsa325.mtd0.kwb -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
------
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


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=2097
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=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: 2860/131068 bytes
NSA325>


NSA325> 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: ide_preinit failed
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            3930112         0323f80f-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 **

no IDE devices available
Unknown command 'mmc' - try 'help'
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 ...
3836140 bytes read in 1031 ms (3.5 MiB/s)
loading uInitrd ...
7245696 bytes read in 1120 ms (6.2 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10444 bytes read in 3613 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2019-08-02   9:41:35 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3836076 Bytes = 3.7 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 1f424000, end 1fb0cf40 ... OK
   Loading Device Tree to 1f41e000, end 1f4238cb ... OK
Using machid 0x831 from environment

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 NSA325
[    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
[    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: 506336K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 17952K 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.000006] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000036] Switching to timer-based delay loop, resolution 5ns
[    0.000419] Console: colour dummy device 80x30
[    0.000448] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000467] pid_max: default: 32768 minimum: 301
[    0.000631] Security Framework initialized
[    0.000728] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000744] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001509] CPU: Testing write buffer coherency: ok
[    0.002379] Setting up static identity map for 0x100000 - 0x100058
[    0.002613] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005183] devtmpfs: initialized
[    0.009207] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009230] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009552] prandom: seed boundary self test passed
[    0.012409] prandom: 100 self tests passed
[    0.012424] pinctrl core: initialized pinctrl subsystem
[    0.013403] NET: Registered protocol family 16
[    0.013687] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.015052] cpuidle: using governor ladder
[    0.015114] cpuidle: using governor menu
[    0.015409] Feroceon L2: Enabling L2
[    0.015447] Feroceon L2: Cache support initialised.
[    0.015746] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.019917] No ATAGs?
[    0.027131] vgaarb: loaded
[    0.027382] SCSI subsystem initialized
[    0.027766] usbcore: registered new interface driver usbfs
[    0.027819] usbcore: registered new interface driver hub
[    0.027860] usbcore: registered new device driver usb
[    0.028585] clocksource: Switched to clocksource orion_clocksource
[    0.097653] VFS: Disk quotas dquot_6.6.0
[    0.097727] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.105889] NET: Registered protocol family 2
[    0.106497] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.106554] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.106605] TCP: Hash tables configured (established 4096 bind 4096)
[    0.106673] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.106696] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.106841] NET: Registered protocol family 1
[    0.107178] RPC: Registered named UNIX socket transport module.
[    0.107188] RPC: Registered udp transport module.
[    0.107194] RPC: Registered tcp transport module.
[    0.107199] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.107445] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.108087] audit: initializing netlink subsys (disabled)
[    0.108418] Initialise system trusted keyrings
[    0.108462] Key type blacklist registered
[    0.108541] audit: type=2000 audit(0.099:1): state=initialized audit_enabled=0 res=1
[    0.108677] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.108744] zbud: loaded
[    0.109522] NFS: Registering the id_resolver key type
[    0.109544] Key type id_resolver registered
[    0.109550] Key type id_legacy registered
[    0.109569] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.109578] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.109739] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.109890] fuse init (API version 7.26)
[    0.110163] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.110327] orangefs_init: module version upstream loaded
[    0.110336] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.558589] random: fast init done
[    4.461517] Key type asymmetric registered
[    4.461530] Asymmetric key parser 'x509' registered
[    4.461584] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.461593] io scheduler noop registered
[    4.461600] io scheduler deadline registered
[    4.461675] io scheduler cfq registered (default)
[    4.462652] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.464136] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    4.464154] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.464164] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.464174] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.464429] PCI: bus0: Fast back to back transfers disabled
[    4.464448] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.488727] PCI: bus1: Fast back to back transfers disabled
[    4.488897] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    4.488912] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    4.488933] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.488946] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    4.489023] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    4.489101] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    4.489528] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.549160] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.549354] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.609144] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    4.609531] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.610616] console [ttyS0] disabled
[    4.610674] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    5.278651] console [ttyS0] enabled
[    5.288694] loop: module loaded
[    5.292336] sata_mv f1080000.sata: slots 32 ports 2
[    5.299408] scsi host0: sata_mv
[    5.302930] scsi host1: sata_mv
[    5.306285] ata1: SATA max UDMA/133 irq 32
[    5.310442] ata2: SATA max UDMA/133 irq 32
[    5.315183] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    5.321652] nand: Eon NAND 128MiB 3,3V 8-bit
[    5.325938] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.333566] Scanning device for bad blocks
[    5.342518] Bad eraseblock 100 at 0x000000c80000
[    5.351939] Bad eraseblock 200 at 0x000001900000
[    5.395912] 9 ofpart partitions found on MTD device orion_nand
[    5.401781] Creating 9 MTD partitions on "orion_nand":
[    5.406947] 0x000000000000-0x000000100000 : "uboot"
[    5.412911] 0x000000100000-0x000000180000 : "uboot_env"
[    5.419239] 0x000000180000-0x000000200000 : "key_store"
[    5.425420] 0x000000200000-0x000000280000 : "info"
[    5.431154] 0x000000280000-0x000000c80000 : "etc"
[    5.436788] 0x000000c80000-0x000001680000 : "kernel_1"
[    5.442942] 0x000001680000-0x000004640000 : "rootfs1"
[    5.449227] 0x000004640000-0x000005040000 : "kernel_2"
[    5.455408] 0x000005040000-0x000008000000 : "rootfs2"
[    5.462644] libphy: Fixed MDIO Bus: probed
[    5.467344] libphy: orion_mdio_bus: probed
[    5.472245] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    5.579026] mv643xx_eth: Set the PHY to fix link down
[    5.579620] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    5.593587] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.600197] ehci-pci: EHCI PCI platform driver
[    5.604708] ehci-orion: EHCI orion driver
[    5.608932] orion-ehci f1050000.ehci: EHCI Host Controller
[    5.614496] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    5.622342] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    5.648603] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    5.654660] ata1: SATA link down (SStatus 0 SControl F300)
[    5.660521] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    5.667344] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.674620] usb usb1: Product: EHCI Host Controller
[    5.679532] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    5.686256] usb usb1: SerialNumber: f1050000.ehci
[    5.691507] hub 1-0:1.0: USB hub found
[    5.695300] hub 1-0:1.0: 1 port detected
[    5.699754] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    5.705020] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    5.712811] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x00000004
[    5.721432] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    5.728253] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.735528] usb usb2: Product: xHCI Host Controller
[    5.740441] usb usb2: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    5.747165] usb usb2: SerialNumber: 0000:01:00.0
[    5.752336] hub 2-0:1.0: USB hub found
[    5.756133] hub 2-0:1.0: 2 ports detected
[    5.760606] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    5.765863] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    5.773413] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.781678] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    5.788500] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.795774] usb usb3: Product: xHCI Host Controller
[    5.800687] usb usb3: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    5.807412] usb usb3: SerialNumber: 0000:01:00.0
[    5.812645] hub 3-0:1.0: USB hub found
[    5.816447] hub 3-0:1.0: 2 ports detected
[    5.821115] usbcore: registered new interface driver usb-storage
[    5.827400] mousedev: PS/2 mouse device common for all mice
[    5.833299] i2c /dev entries driver
[    5.839428] rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
[    5.847020] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    5.856598] hidraw: raw HID events driver (C) Jiri Kosina
[    5.862387] drop_monitor: Initializing network drop monitor service
[    5.869035] NET: Registered protocol family 17
[    5.873568] Key type dns_resolver registered
[    5.878400] registered taskstats version 1
[    5.882573] Loading compiled-in X.509 certificates
[    5.887433] zswap: loaded using pool lzo/zbud
[    5.893696] Key type big_key registered
[    5.899062] Key type encrypted registered
[    5.905405] rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
[    5.912907] rtc-pcf8563 0-0051: hctosys: unable to read the hardware clock
[    5.990793] ata2: SATA link down (SStatus 0 SControl F300)
[    6.006562] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.014120] Please append a correct "root=" boot option; here are the available partitions:
[    6.022549] 1f00            1024 mtdblock0
[    6.022553]  (driver?)
[    6.029156] 1f01             512 mtdblock1
[    6.029160]  (driver?)
[    6.035720] 1f02             512 mtdblock2
[    6.035723]  (driver?)
[    6.042305] 1f03             512 mtdblock3
[    6.042309]  (driver?)
[    6.048885] 1f04           10240 mtdblock4
[    6.048888]  (driver?)
[    6.055453] 1f05           10240 mtdblock5
[    6.055456]  (driver?)
[    6.059682] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    6.068907] 1f06           48896 mtdblock6
[    6.068911]  (driver?)
[    6.075474] 1f07           10240 mtdblock7
[    6.075477]  (driver?)
[    6.082059] 1f08           48896 mtdblock8
[    6.082063]  (driver?)
[    6.088647] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.096944] CPU: 0 PID: 1 Comm: swapper Not tainted 4.12.1-kirkwood-tld-1 #1
[    6.104020] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[    6.110336] [<c010ea54>] (unwind_backtrace) from [<c010ab48>] (show_stack+0x10/0x14)
[    6.118126] [<c010ab48>] (show_stack) from [<c01dba9c>] (panic+0xb0/0x250)
[    6.125038] [<c01dba9c>] (panic) from [<c0c01274>] (mount_block_root+0x204/0x27c)
[    6.132559] [<c0c01274>] (mount_block_root) from [<c0c013d8>] (mount_root+0xec/0x118)
[    6.140424] [<c0c013d8>] (mount_root) from [<c0c01528>] (prepare_namespace+0x124/0x184)
[    6.148464] [<c0c01528>] (prepare_namespace) from [<c0c00e90>] (kernel_init_freeable+0x210/0x260)
[    6.157381] [<c0c00e90>] (kernel_init_freeable) from [<c0833200>] (kernel_init+0x8/0x10c)
[    6.165600] [<c0833200>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
[    6.173207] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.300094] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.306836] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.328597] usb 1-1: Product: USB2.0 Hub
[    6.339230] hub 1-1:1.0: USB hub found
[    6.348604] hub 1-1:1.0: 4 ports detected
[    6.678601] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[    6.855592] usb 1-1.3: New USB device found, idVendor=058f, idProduct=6387
[    6.868609] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.875952] usb 1-1.3: Product: Mass Storage
[    6.898596] usb 1-1.3: Manufacturer: Generic
[    6.902879] usb 1-1.3: SerialNumber: A8AE4119
[    6.918998] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    6.938785] scsi host2: usb-storage 1-1.3:1.0
[    8.020297] scsi 2:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
[    8.040502] sd 2:0:0:0: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.88 GiB)
[    8.058630] sd 2:0:0:0: [sda] Write Protect is off
[    8.063462] sd 2:0:0:0: [sda] Mode Sense: 23 00 00 00
[    8.078621] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    8.103330]  sda: sda1
[    8.108998] sd 2:0:0:0: [sda] Attached SCSI removable disk
[  114.248634] random: crng init done



Edited 2 time(s). Last edit at 08/07/2019 12:07PM by fgh.
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 01:08PM
There are 2 problems.

1. The rootfs you've created.
2. The u-boot env settings

Here are 2 steps to corerct the problem.

1. rootfs

Since you are booting with new u-boot, step 4a is the correct one to take.

Quote

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD). Again, this step 4b is for stock U-Boot only.

So to correct this, you need to reverse step 4b (that you've apparently chose to do while creatign the rootfs).

Mount the USB rootfs on rPi. Assuming it is mounted as /media/sdb1

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

and unmount the USB.

2. Boot with kwboot like you did before. Interrupt u-boot at countdown, and

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

and then boot
boot

This time it should boot into Debian and mount the rootfs correctly.

=====

Once you can boot with kwboot this way. Login into Debian. And reflash u-boot. And make sure you adjust the env dtb_file permanently:

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

After this you can boot normally with serial console using minicom or picocom.

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



Edited 3 time(s). Last edit at 08/07/2019 01:22PM by bodhi.
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 02:18PM
EDIT: Nevermind;
root@debian:/# aptitude search mtd-utils


login as: root
root@192.168.1.248's password:
Linux debian 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Dec 31 16:02:08 1969
root@debian:~#


I am so happy right now! Partly because the machine is somewhat up and running but not least because you are so very kind helping me out!!

But the questions keep coming....
How do i reflash u-boot from Debian? flash_erase nor nandwrite are to be found

Quote

JoniDaBoni Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> worked like a charm. I am now in the middle of the
> uboot flash procedure. But the result of step 6 is
> not as expected:
>
>
> root@debian:/# flash_erase /dev/mtd0 0 4
> Erasing 128 Kibyte @ 7f563f5c00000064 --  4 %
> complete 
>
>
> What should I do???



Edited 1 time(s). Last edit at 08/07/2019 03:02PM by fgh.
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 03:34PM
So now after trying to reflash uboot kwboot doesnt fully work eather. It boots into u-boot but no countdown and running 'boot' doesnt do much?

NSA325> boot
NSA325>
Re: Zyxel NSA325 Newbie question for update uBoot
August 07, 2019 11:24PM
fgh,

Quote

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Dec 31 16:02:08 1969
root@debian:~#

Cool! so your rootfs is good to go.


But looks like your u-boot flashing was not correctly done. Something in the envs is wrong righ now.

NSA325> boot
NSA325>


Was this prompt from regular serial console or from kwboot console? If it was from serial consoe then the uboot image itself was flashed OK.


Let's get some info and then we can adjust the envs.

Power up. When you see the NSA325 u-boot promtp,

ver
printenv

Copy and paste the entire serial console log (everything include the serial consle or kwboot command, the u-boot banner, until the last line on the screen).

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



Edited 2 time(s). Last edit at 08/07/2019 11:27PM by bodhi.
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
August 08, 2019 05:11AM
bodhi,

Something went wrong when i tried to flash u-boot from Debian the first time so I ended up with messed up envs just as you stated here above.

I manage to restore working envs following your post here https://forum.doozan.com/read.php?3,29362,29390#msg-29390. Then after a new attempt of flashing u-boot in Debian following https://forum.doozan.com/read.php?3,12381, step 6 and 7 Debian is now booting just fine!

From this point. Is it now safe to update to latest kernel following chapter Updated 01 Jul 2019: in https://forum.doozan.com/read.php?2,12096?
Re: Zyxel NSA325 Newbie question for update uBoot
August 08, 2019 05:24AM
Yes, it is safe to upgrade the kernel to the latest version.

Before updating kernel, you might want to back up the roofs;

https://forum.doozan.com/read.php?2,12096,24034#msg-24034

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 Newbie question for update uBoot
December 21, 2019 01:50AM
This seems to be the best way for me to do this:)
Do I need a serial cable to flash or is it just for recovering if something goes wrong?
I'm comfortable with terminal and SSH.
Re: Zyxel NSA325 Newbie question for update uBoot
December 21, 2019 03:21AM
perern,

> Do I need a serial cable to flash or is it just
> for recovering if something goes wrong?
> I'm comfortable with terminal and SSH.

It is for recovery purpose. With any procedure that messes with NAND, i.e. u-boot, it is safest to have a recovery plan that you can test to see it works first, before installing u-boot.

With that said, we know this box works with kwboot and serial console. So I'd say you could flash it with some minimum risk. But there is a very small probability that kwboot does not work with your box. So I cannot say one way or the other, it is your risk to take :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 Newbie question for update uBoot
December 23, 2019 07:44AM
I managed to mess up something :)
Is there a way to reset everything on the nand part of the NAS? sudo, wget and rsync isn't working anymore and I would like to completely reset it if it's possible.
Re: Zyxel NSA325 Newbie question for update uBoot
December 23, 2019 06:37PM
perern Wrote:
-------------------------------------------------------
> I managed to mess up something :)
> Is there a way to reset everything on the nand
> part of the NAS? sudo, wget and rsync isn't
> working anymore and I would like to completely
> reset it if it's possible.

With serial console, it is possible. Without serial console, it depends how messed up your system is.

Are you currently logged in inside stock OS? Do you have a log of what you did?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 Newbie question for update uBoot
December 23, 2019 08:04PM
I figured it out a few hours ago, I installed tweaks and everything is back to normal.
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
April 14, 2020 01:07PM
I have had a lot of problem with the usb-stick beeing unbootable after powerfailure. And now my NSA325 is off-site and doesnt show up anymore. I have a tar.bz2-backup of the entire USB-stick, is it possible to rewrite the stick from Windows? Also, if I may ask, would it be more stable to replace the USB-stick with an external USB-HDD for OS/boot?
Re: Zyxel NSA325 Newbie question for update uBoot
April 14, 2020 05:29PM
fgh,

> I have had a lot of problem with the usb-stick
> beeing unbootable after powerfailure.

Do you use Ext3 for rootfs?

> And now my
> NSA325 is off-site and doesnt show up anymore. I
> have a tar.bz2-backup of the entire USB-stick, is
> it possible to rewrite the stick from Windows?

You can install CyWin and run tar. However, for your purpose, if the remote site does not have Linux, you can create an image of USB rootfs (similar to RasPi installation image) and then use Windows tool to write the image to the USB whenever it is corrupted beyond repair. Your USB rootfs should have small capacity, just enough to house the rootfs, because that image size is equal to capacity of the disk.

> Also, if I may ask, would it be more stable to
> replace the USB-stick with an external USB-HDD for
> OS/boot?

It would be better for sure. HDD is going to last a long time, unlike the USB flash.

OTOH, if the power outage problem occurs frequently and your rootfs was corrupted beyond repair, then there is something to be improved. My Ext3 rootfs on USB flash don't have problem booting after an power outage.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
fgh
Re: Zyxel NSA325 Newbie question for update uBoot
April 16, 2020 01:34PM
bodhi Wrote:
-------------------------------------------------------
> fgh,
>
> > I have had a lot of problem with the usb-stick
> > beeing unbootable after powerfailure.
>
> Do you use Ext3 for rootfs?

Yes.

>
> > And now my
> > NSA325 is off-site and doesnt show up anymore.
> I
> > have a tar.bz2-backup of the entire USB-stick,
> is
> > it possible to rewrite the stick from Windows?
>
> You can install CyWin and run tar. However, for
> your purpose, if the remote site does not have
> Linux, you can create an image of USB rootfs
> (similar to RasPi installation image) and then use
> Windows tool to write the image to the USB
> whenever it is corrupted beyond repair. Your USB
> rootfs should have small capacity, just enough to
> house the rootfs, because that image size is equal
> to capacity of the disk.
>

How do i create such an .iso or .img? Untared my rootfs tar and created an iso with genisoimage but with no luck.


> > Also, if I may ask, would it be more stable to
> > replace the USB-stick with an external USB-HDD
> for
> > OS/boot?
>
> It would be better for sure. HDD is going to last
> a long time, unlike the USB flash.
>
> OTOH, if the power outage problem occurs
> frequently and your rootfs was corrupted beyond
> repair, then there is something to be improved. My
> Ext3 rootfs on USB flash don't have problem
> booting after an power outage.

Yes, i guess that cheap non-branded usb-stick just cant handle it. Ill replace it with an old external usb-disk I have as soon as I get around.

Tanks for helping me out!
Re: Zyxel NSA325 Newbie question for update uBoot
April 16, 2020 06:34PM
fgh,

> Yes, i guess that cheap non-branded usb-stick just
> cant handle it. Ill replace it with an old
> external usb-disk I have as soon as I get around.

Or you could use a USB flash drive, Sandisk brand. That will make it easier to manage.

I need to look in my note to see how I created the img. It's been a long time ago. You can also search in Linux Mint or rPI forum.

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



Edited 1 time(s). Last edit at 04/16/2020 06:34PM by bodhi.
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: