Problem installing OpenWrt on NSA325v2

Hi everyone, over the last couple of days I spent my time upgrading my old Zyxel NSA325v2 NAS to OpenWrt.

After resolving the initial issues of the USB not being recognized, followed by the file not being read, I managed to write the u-boot.kwb (specifically the 24.10.5 release) and the -factory.bin for my NAS.

Everything went well during the boot process until the kernel started, resulting in a kernel panic, more specific:

not syncing: VFS: Unable to mount root fs on unknown-block(254,0)

I tried to investigate it myself but couldn't find a solution. I even tried reflashing everything from scratch, but it didn't help.

Any clues?

Here's the boot log:

U-Boot 2020.04 (Dec 17 2025 - 21:08:22 +0000)
Zyxel NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
NAND:  128 MiB
MMC:   
Loading Environment from NAND... OK
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 mtd3
ubi0: scanning is finished
ubi0: attached mtd3 (name "ubi", 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: 1/0, WL threshold: 4096, image sequence number: 1760891865
ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
No size specified -> Using max size (3225600)
Read 3225600 bytes from volume kernel to 00800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-6.6.110
   Created:      2025-10-19  16:37:45 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3133564 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.110 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 13.35
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508092K/524288K available (7224K kernel code, 594K rwdata, 1076K rodata, 1024K init, 2)
[    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: 95563022s
[    0.000001] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000028] Switching to timer-based delay loop, resolution 5ns
[    0.000138] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lp)
[    0.000159] CPU: Testing write buffer coherency: ok
[    0.000243] pid_max: default: 32768 minimum: 301
[    0.007550] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.007574] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.014547] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.014750] Setting up static identity map for 0x100000 - 0x10003c
[    0.015002] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.020432] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 s
[    0.020458] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.022367] pinctrl core: initialized pinctrl subsystem
[    0.024744] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.025090] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026295] thermal_sys: Registered thermal governor 'step_wise'
[    0.026335] cpuidle: using governor ladder
[    0.026624] Feroceon L2: Enabling L2
[    0.026651] Feroceon L2: Cache support initialised.
[    0.031451] No ATAGs?
[    0.036421] SCSI subsystem initialized
[    0.037082] usbcore: registered new interface driver usbfs
[    0.037123] usbcore: registered new interface driver hub
[    0.037160] usbcore: registered new device driver usb
[    0.038577] clocksource: Switched to clocksource orion_clocksource
[    0.046251] NET: Registered PF_INET protocol family
[    0.046427] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.048134] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.048159] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.048172] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.048224] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.048792] TCP: Hash tables configured (established 4096 bind 4096)
[    0.049230] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.049399] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.049422] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.050050] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.050088] PCI: CLS 0 bytes, default 32
[    0.053011] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.054176] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.054185] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.059549] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.061416] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.062481] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.062992] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.063358] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    0.063393] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    0.063415] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x01000000
[    0.063429] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x01000000
[    0.063803] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.063815] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.063828] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x0004)
[    0.063837] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.063844] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.063915] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.065035] PCI: bus0: Fast back to back transfers disabled
[    0.065046] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.065161] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    0.065193] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    0.065316] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.065350] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 000)
[    0.065518] PCI: bus1: Fast back to back transfers disabled
[    0.065527] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.065558] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.065572] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.065592] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.065603] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.065652] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.065664] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    0.074065] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.076831] printk: console [ttyS0] disabled
[    0.077118] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.077151] printk: console [ttyS0] enabled
[    0.707931] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    0.714344] nand: Eon NAND 128MiB 3,3V 8-bit
[    0.718641] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.726285] Scanning device for bad blocks
[    0.735219] Bad eraseblock 100 at 0x000000c80000
[    0.744624] Bad eraseblock 200 at 0x000001900000
[    0.788470] 3 fixed-partitions partitions found on MTD device orion_nand
[    0.795213] Creating 3 MTD partitions on "orion_nand":
[    0.800384] 0x000000000000-0x0000000c0000 : "uboot"
[    0.823589] 0x0000000c0000-0x000000140000 : "uboot_env"
[    0.830103] 0x000000140000-0x000008000000 : "ubi"
[    0.848656] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.858788] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 4c:9e:ff:bf:5a:66
[    0.867766] i2c_dev: i2c /dev entries driver
[    0.873509] orion_wdt: Initial timeout 21 sec
[    0.888719] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.897279] NET: Registered PF_INET6 protocol family
[    0.904307] Segment Routing with IPv6
[    0.908050] In-situ OAM (IOAM) with IPv6
[    0.912129] NET: Registered PF_PACKET protocol family
[    0.917226] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts .
[    0.930488] 8021q: 802.1Q VLAN Support v1.8
[    0.971509] UBI: auto-attach mtd2
[    0.974860] ubi0: attaching mtd2
[    1.147992] ubi0: scanning is finished
[    1.163605] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[    1.169159] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.176066] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.182807] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.189633] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[    1.195756] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.203018] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1760891865
[    1.212200] ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
[    1.221801] ubi0: background thread "ubi_bgt0d" started, PID 369
[    1.228242] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.233778] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.240945] clk: Disabling unused clocks
[    1.248528] unable to read id index table
[    1.252673] List of all partitions:
[    1.256184] 1f00             768 mtdblock0 
[    1.256190]  (driver?)
[    1.262773] 1f01             512 mtdblock1 
[    1.262780]  (driver?)
[    1.269347] 1f02          129792 mtdblock2 
[    1.269353]  (driver?)
[    1.275913] fe00            2898 ubiblock0_1 
[    1.275918]  (driver?)
[    1.282660] No filesystem could mount root, tried: 
[    1.282664]  squashfs
[    1.287560] 
[    1.291338] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0)
[    1.299815] Rebooting in 1 seconds..

And my env variables from printenv:

baudrate=115200
bootcmd=run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=4C:9E:FF:BF:5A:66
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
stderr=serial
stdin=serial
stdout=serial

Thank you for your time and patience!

SOLVED (maybe?)

Apparently, writing to NAND with:

nand write 0x2000000 ubi 0x600000

is what caused the issue, supposedly because it writes a total of 6 MB, while the file size of the latest release is slightly larger than that (around 6.4 MB).

This results in part of the file being missing and not written to NAND. Again, these are just my thoughts, so more experienced users are welcome to correct me if I'm wrong.

I resolved the issue by using the filesize variable as follows:

nand write 0x2000000 ubi ${filesize}

Which differs from what is specified in Table of Hardware guide here.

Also, note the difference in the ${filesize} variable between my guide and the more complete one for the NSA310B.

Lastly, I thought that I could do something similar for the bootloader, so I went back and re-flashed u-boot.kwb with the same ${filesize}, but received an error. This is the specific command:

nand write 0x1000000 0x00000 ${filesize}

So, be careful. Maybe I missed something, but even after rewriting with:

nand write 0x1000000 0x00000 0x100000

It still messed up the U-Boot image and bricked my board.

I resolved by loading the U-Boot image into RAM using kwboot and repeating the following steps when writing to NAND:

  1. Using a fixed size to write u-boot.kwb
    nand write 0x1000000 0x00000 0x100000
  2. Using ${filesize} to write OperWrt (in my case nsa325.bin)
    nand write 0x2000000 ubi ${filesize}

As of now, the NAS is booting correctly, and I can access the web interface via browser (still haven't tried to logging in, but would that really be an issue?). I also still need to connect some hard drives, but anything from this point onwards shouldn't be related to the firmware flash itself.

Once again, I would like to ask the experienced users to correct me if I have misjudged anything in this analysis. Other recommendations are also welcome.

I'll leave this topic open for a little longer, so that more people can join in and share their observations.
Thank you!

1 Like

Here's a quick update on this topic:

As of now, the NAS is booting correctly, and I can access the web interface via browser (still haven't tried to logging in, but would that really be an issue?). I also still need to connect some hard drives, but anything from this point onwards shouldn't be related to the firmware flash itself.

I had no problem accessing the web interface. I performed some basic configurations, installed packages and tested out functionalities such as mounting external storage and transferring files.

I configured the two disks in RAID 1, and Samba4 is working as expected with a per-user security access. I plan to configure SFTP as well.

At this point, I'm pretty confident to say that everything looks good and that the NAS is up and running quite well.