Welcome! Log In Create A New Profile

Advanced

ZyXel NSA325 v2 bricked after bad flash

Posted by FIS 
FIS
ZyXel NSA325 v2 bricked after bad flash
February 12, 2024 10:27AM
Hello.

I have an older NSA325v2 I decided I wanted to get Debian on. I found some different posts here on the forums and decided to give it a go. To cut it short, I wanted to update the u-boot and somehow managed to erase the nand, and now it won't do anything.
I have serial connection (which was what I used to erase it) but is there a way to rescue it?
I am a complete noob on much of the stuff, but I try my best to understand.
Re: ZyXel NSA325 v2 bricked after bad flash
February 12, 2024 01:30PM
FIS,

>
> I have an older NSA325v2 I decided I wanted to get
> Debian on. I found some different posts here on
> the forums and decided to give it a go. To cut it
> short, I wanted to update the u-boot and somehow
> managed to erase the nand, and now it won't do
> anything.
> I have serial connection (which was what I used to
> erase it) but is there a way to rescue it?

Yes, you can run kwboot to boot this box using serial console. See instruction in the Wiki thread

Quote

Unbricking with Serial Console & JTAG console

How to unbrick your box using serial console with kwboot

Download the u-boot tartball from the u-boot release thread. And use the NSA325 2017.07 u-boot image uboot.2017.07-tld-1.nsa325.mtd0.kwb

====

After you successfully kwboot the new u-boot, create the Debian rootfs using Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on USB stick. Running kwboot with 2017.07-tld-1.nsa325.mtd0.kwb will boot into this Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 13, 2024 11:53AM
Running the kwboot command does nothing for me.
Quote
kwboot -t -B 115200 /dev/ttyS2 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p
All it says is to type CTRL... to cancel, and the arrow just keeps blinking.

I've tried swapping RX and TX.

Am I supposed to connect the 3.3V pin? I don't see why as the unit is powered by it's own but I am running out of ideas.
Re: ZyXel NSA325 v2 bricked after bad flash
February 13, 2024 12:34PM
Quote

I have serial connection (which was what I used to erase it)

Even the NAND is completely erased, kwboot should work for this box.

Quote

> Am I supposed to connect the 3.3V pin?

No. If you had connected the 3.3V pin before, then that could have fried the serial port.

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

Some ideas:

- Make sure the serial connection wires are away from the power cord. Sometime it could cause interference.

- Try typing the kwboot command but not executing it. Power up, and immediately run the kwboot command. Try this with varied wait time (immediately, 1/2 second, 1 second, so on...).

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

This board also has JTAG, but its header is unpopulated. If kwboot is not working no matter what you try, then look into JTAG solution. But you will need to solder the header to the NSA325 board and a JTAG debugger (the rPi can be used as JTAG debugger).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: ZyXel NSA325 v2 bricked after bad flash
February 13, 2024 01:30PM
I've just noticed your kwboot command:

kwboot -t -B 115200 /dev/ttyS2 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p

Why it is /dev/ttyS2? Usually it is /dev/ttyUSB0 on most Linux host, or /dev/ttyAMA0 on the rPi. See:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

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



Edited 1 time(s). Last edit at 02/13/2024 01:48PM by bodhi.
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 14, 2024 03:30AM
Just a quick update.

Managed to get the u-boot booteing after installing Ubuntu on a laptop. Before this I ran kwboot from Windows 10, thus ttyS2.
Never connected the 3,3v pin so serial is not fried. But for some reason Windows would get stuck/do nothing when running the kwboot command. Figured Linux would be better and after a few tries it booted!
Now I got stuck after formatting a USB to ext3, for some reason I get no write access to it. No Linux expert so will have to figure it out before I get Debian running.

Thanks for the help so far, probably wont have time to try more for a few days, but I'm learning quite alot from this!

Quick side question: I use a Arduino Uno R3 as my serial port. This one uses 5V for serial. Are the TX and RX voltage also 5V? I've been using a step up/down converter (5V to 3,3V) for TX and RX, but is that really needed, or would it only be needed if I were to use the 3,3V pin?
Re: ZyXel NSA325 v2 bricked after bad flash
February 14, 2024 12:29PM
> Before this I ran
> kwboot from Windows 10, thus ttyS2.

Not a good idea. Which kwboot binary were you using? was it compiled on Windows?

> Never connected the 3,3v pin so serial is not
> fried. But for some reason Windows would get
> stuck/do nothing when running the kwboot command.

I would avoid using Windows apps for things Linux-related. Just install a Linux VM for that. One exception is Windows putty, which works well for serial console.

As long as you don't connect 3.3V (from the converter) wire to any pin on the NSA325 header, you could make mistake with other wires and no harm done. And use a multi-meter to measure voltage when in doubt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 15, 2024 11:02AM
No idea what binary it was. Found it here https://forum.doozan.com/read.php?2,61344,134363#msg-134363
I figured Linux would be the best option for this, but now I have tons of trouble getting a USB formatted correctly with Ubuntu. And if I do get one formatted the tar xjf command freezes/does nothing to extract the debian files.

What version of Linux would you recommend?
Re: ZyXel NSA325 v2 bricked after bad flash
February 15, 2024 12:05PM
FIS,

> No idea what binary it was. Found it here
> https://forum.doozan.com/read.php?2,61344,134363#msg-134363

I see. I think it was not tested thouroughly because not many people use Windows.

> What version of Linux would you recommend?

I would recommend Linux Mint. But Mint is a Ubuntu derivative. So Ubuntu is fine.

Basically, you need to format the drive at command line (don't use GUI). Open a terminal, become root, and use fdisk to create a single partition on the USB drive. And then use mkfs.ext3 to format it. And then run the tar command to extract the archive.

I don't know your Linux level of experience. If you are unfamiliar with what I said above, I can write a detailed instruction for you.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 15, 2024 03:29PM
For some reason I'm having serious trouble creating the partition and getting debian on the USB.
I've already tried on my laptop with Ubuntu installed, and on my main computer with VM and what I think is Linux Jammy?
Anyway trying to get another VM setup with Linux Mint as we speak. Also tried two different USB sticks, and they are both a hassle.

Pretty sure I've got the command for terminal needed. I run it as root and use both fdisk for partitioning and mkfs for formatting.
What I have not yet found is how I flash the u-boot to the nand, because I have to reuse kwboot every time I turn it off now. And is the uboot.2023.04-tld-1.nsa325.bodhi.tar image better to use as it's newer? Does it matter?
Re: ZyXel NSA325 v2 bricked after bad flash
February 15, 2024 10:06PM
> What I have not yet found is how I flash the
> u-boot to the nand, because I have to reuse kwboot
> every time I turn it off now. And is the
> uboot.2023.04-tld-1.nsa325.bodhi.tar image better
> to use as it's newer? Does it matter?

Log into Debian, follow the instruction in the u-boot release post to install to NAND. And for the initial installation, it does not matter which version, 2017.07 or 2023.04.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 16, 2024 02:39AM
Ahh, ok so Debian would be installed onto the nand, I thought it would be running of the USB, having uboot on nand. Is the reason you need uboot just to get it to run it off the USB for the first time? I just don't see why one couldn't make a debian image and flash directly, but again I'm no expert on this.
Re: ZyXel NSA325 v2 bricked after bad flash
February 16, 2024 04:19AM
FIS Wrote:
-------------------------------------------------------
> Ahh, ok so Debian would be installed onto the
> nand, I thought it would be running of the USB,
> having uboot on nand. Is the reason you need uboot
> just to get it to run it off the USB for the first
> time? I just don't see why one couldn't make a
> debian image and flash directly, but again I'm no
> expert on this.

No. U-boot is on NAND, rootfs is on USB.

- kwboot the new uboot
- attach the new USB Debian rootfs
- boot into Debian
- log in and install the new u-boot to NAND to make it permanent.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: ZyXel NSA325 v2 bricked after bad flash
February 16, 2024 12:15PM
FIS,

If you still have trouble creating the USB rootfs, copy and paste here the entire terminal session log on the Linux host when you did this. Perhaps I will be able to see some mis-step.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 17, 2024 11:45AM
I think I managed to get one USB drive created, the other one keeps saying that the USB is read-only file system.
But, I cannot get it to boot of the USB.
Re: ZyXel NSA325 v2 bricked after bad flash
February 17, 2024 02:02PM
FIS,

> But, I cannot get it to boot of the USB.

Please post the entire log of the kwboot session when you try to boot the USB Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 07:50AM
root@pc-E1-510:/home/pc/Desktop# kwboot  -t -B 115200 /dev/ttyUSB0 -b uboot.2023.04-tld-1.nsa325.kwb -p
kwboot version 2022.01+dfsg-2ubuntu2.5
Patching image boot signature to UART
Aligning image header to Xmodem block size
Sending boot message. Please reboot the target...-
Waiting 2s and flushing tty
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (520596 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 27 % [......................................................................]
 29 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 65 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 70 % [......................................................................]
 72 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 77 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [......................................................................]
 99 % [........                                                              ]
Done
Finishing transfer
[Type Ctrl-\ + c to quit]


U-Boot 2023.04-tld-1 (Jun 24 2023 - 17:50:21 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
Model: ZyXEL NSA325
DRAM:  512 MiB
Core:  19 devices, 15 uclasses, devicetree: separate
NAND:  128 MiB
Loading Environment from NAND... *** Warning - bad CRC, using default environment

Resetting console stdin/stdout/stderr to serial...
In:    serial
Out:   serial
Err:   serial
pcie0.0: Link up
Net:   
Warning: ethernet-controller@72000 (eth0) using random MAC address - c2:07:df:a9:7c:b8
eth0: ethernet-controller@72000
Hit any key to stop autoboot:  0 
starting USB...
Bus ehci@50000: USB EHCI 1.00
Bus xhci_pci: Register 4000820 NbrPorts 4
Starting the controller
USB XHCI 0.96
scanning bus ehci@50000 for devices... 3 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
            Type: Removable Hard Disk
            Capacity: 7392.0 MB = 7.2 GB (15138816 x 512)
... is now current device
Scanning usb 0:1...

Device 0: unknown device
ethernet-controller@72000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
NSA325> 
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 10:48AM
Please re-create your boot device and post a log of the creation process as for some reason U-Boot is not finding a readable partition. Are you creating on a Linux distribution? If so when completed please run the command:

fdisk -l /dev/sd?

Replacing the ? with the device indicator (i.e. either a, b, c ...) depending on how the USB drive was identified by Linux.
Also helpful would be the output of:

lsblk -f /dev/sd?

Again replacing the ? with the device indicator.

Ray
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 11:25AM
Been trying to get a working one for hours now :s
root@pc-E1-510:/home/pc/Desktop# fdisk -l
Disk /dev/sda: 149,05 GiB, 160041885696 bytes, 312581808 sectors
Disk model: Hitachi HTS72321
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x80d2f3ee

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            2048    104447    102400   50M  7 HPFS/NTFS/exFAT
/dev/sda2          104448 131558976 131454529 62,7G  7 HPFS/NTFS/exFAT
/dev/sda3       311531520 312575999   1044480  510M 27 Hidden NTFS WinRE
/dev/sda4       131559422 311531519 179972098 85,8G  5 Extended
/dev/sda5  *    191311872 192362495   1050624  513M ef EFI (FAT-12/16/32)
/dev/sda6       192364544 311531519 119166976 56,8G 83 Linux
/dev/sda7       131559424 191311871  59752448 28,5G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdc: 7,22 GiB, 7751073792 bytes, 15138816 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
root@pc-E1-510:/home/pc/Desktop# lsblk -f /dev/sdc
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sdc  ext3   1.0         ef5ec8cc-6751-4dae-a804-8398be611035                
root@pc-E1-510:/home/pc/Desktop# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The device contains 'ext3' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x084f2dc6.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-15138815, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-15138815, default 15138815): 

Created a new partition 1 of type 'Linux' and of size 7,2 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@pc-E1-510:/home/pc/Desktop# fdisk -l
Disk /dev/sda: 149,05 GiB, 160041885696 bytes, 312581808 sectors
Disk model: Hitachi HTS72321
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x80d2f3ee

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            2048    104447    102400   50M  7 HPFS/NTFS/exFAT
/dev/sda2          104448 131558976 131454529 62,7G  7 HPFS/NTFS/exFAT
/dev/sda3       311531520 312575999   1044480  510M 27 Hidden NTFS WinRE
/dev/sda4       131559422 311531519 179972098 85,8G  5 Extended
/dev/sda5  *    191311872 192362495   1050624  513M ef EFI (FAT-12/16/32)
/dev/sda6       192364544 311531519 119166976 56,8G 83 Linux
/dev/sda7       131559424 191311871  59752448 28,5G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdc: 7,22 GiB, 7751073792 bytes, 15138816 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x084f2dc6

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 15138815 15136768  7,2G 83 Linux
root@pc-E1-510:/home/pc/Desktop# mkfs.ext3 /dev/sdc1 -L rootfs
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 1892096 4k blocks and 473280 inodes
Filesystem UUID: 905e1126-1580-4872-845a-4a156d8f44ab
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

root@pc-E1-510:/home/pc/Desktop# fdisk -l /dev/sdc
Disk /dev/sdc: 7,22 GiB, 7751073792 bytes, 15138816 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x084f2dc6

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 15138815 15136768  7,2G 83 Linux
root@pc-E1-510:/home/pc/Desktop# lsblk -f /dev/sdc
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sdc                                                                         
└─sdc1
     ext3   1.0   rootfs
                        905e1126-1580-4872-845a-4a156d8f44ab                
root@pc-E1-510:/home/pc/Desktop#

Looks ok so far?

Edit: Forgot to mention, but running Linux Mint 21.3 Virginia now.

Next I extract the package.
oot@pc-E1-510:~# cd /home/pc/Desktop
root@pc-E1-510:/home/pc/Desktop# cp Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 /media/pc/rootfs
root@pc-E1-510:/home/pc/Desktop# cd /media/pc/rootfs
root@pc-E1-510:/media/pc/rootfs# tar xjf Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@pc-E1-510:/media/pc/rootfs#

I also skip step 4 in the guide.



Edited 2 time(s). Last edit at 02/18/2024 11:44AM by FIS.
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 12:00PM
FIS,

Your USB rootfs creation steps looks good. And there is no problem with your USB stick.

Try again with this combination:

- kwboot the u-boot 2017.07-tld-1 version
- attach the USB rootfs to one of the two USB 2.0 ports in the back
- And boot

I will explain it after you got it to boot this time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 12:09PM
root@pc-E1-510:/home/pc/Desktop# kwboot  -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p
kwboot version 2022.01+dfsg-2ubuntu2.5
Patching image boot signature to UART
Aligning image header to Xmodem block size
Sending boot message. Please reboot the target...-
Waiting 2s and flushing tty
Sending boot image header (512 bytes)...
 25 % [....                                                                  ]
Done
Sending boot image data (502572 bytes)...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 12 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 98 % [......................................................................]
 99 % [.......                                                               ]
Done
Finishing transfer
[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 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

USB device 0: 
    Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
            Type: Removable Hard Disk
            Capacity: 7392.0 MB = 7.2 GB (15138816 x 512)
... is now current device
Unknown command 'part' - try 'help'
Unknown command 'part' - try 'help'
Scanning usb 0:1...
Unknown command 'sata' - try 'help'
Unknown command 'pci' - try 'help'
No link on egiga0
NSA325>

I've tried with both uboots already.
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 12:25PM
> I've tried with both uboots already.

Looks like your envs are messed up! did you save the envs at all?

kwboot again, interrupt the countdown and,
printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 12:31PM
NSA325> printenv
arch=arm
baudrate=115200
board=nsa325
board_name=nsa325
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_pci_enum=pci enum
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=usb0 sata0 dhcp 
bootcmd=run distro_bootcmd
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;
bootcmd_sata0=devnum=0; run sata_boot
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=10
bootfile=boot.scr.uimg
bootfstype=ext4
console=ttyS0,115200
cpu=arm926ejs
devices=usb
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
distro_bootpart_uuid=084f2dc6-01
ethact=egiga0
ethaddr=5c:f4:ab:f4:06:5b
fdt_addr_r=0x2c00000
fdtcontroladdr=1fb516e0
fdtfile=kirkwood-nsa325.dtb
kernel_addr_r=0x800000
loadaddr=0x800000
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
ramdisk_addr_r=0x01100000
sata_boot=if sata dev ${devnum}; then devtype=sata; run scan_dev_for_boot_part; fi
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then part uuid ${devtype} ${devnum}:${distro_bootpart} distro_bootpart_uuid ; run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x200000
soc=kirkwood
stderr=serial
stdin=serial
stdout=serial
ubifs_boot=if ubi part ${bootubipart} ${bootubioff} && ubifsmount ubi0:${bootubivol}; then devtype=ubi; devnum=ubi0; bootfstype=ubifs; distro_bootpart=${bootubivol}; run scan_dev_for_boot; ubifsumount; fi
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=zyxel
ver=U-Boot 2023.04-tld-1 (Jun 24 2023 - 17:50:21 -0700)\
ZyXEL NSA325 2-Bay Power Media Server

Environment size: 2971/131068 bytes

I've not seen any step in the guides to change the envs?
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 12:54PM
FIS,

> I've not seen any step in the guides to change the
> envs?

During booting with kwboot we should not save the envs. But you apparently did save the envs while booting 2023.04-tld-1 version. Perhaps without knowing it would cause problem, you ran the command saveenv at u-boot prompt. Am I correct?

Now the envs are no longer consistent. It is not appropriate for 2017.07-tld-1 version. And to boot with 2023.04-tld-1 version, you need to do an extra step in installation.

So to get it to boot, you need to do this to boot the rootfs correctly. As described in section C2 in the installation instruction for 2023.04-tld-1 stated:

Quote
https://forum.doozan.com/read.php?3,135222

C.2. Distro Boot

C.2.1 (Optional) Booting all distros

In this new u-boot, I've implemented the Distro Boot capability. So any distro (such as Ubuntu, Alpine, Fedora, etc.) can be booted as long as they conform to the Distro Boot standard. However, for the purpose of booting our Debian Kirkwood kernel released here for this box, it is not relevant and should be ignored.

C.2.2 Using boot.scr to recover from damaged or corrupted envs NAND block

Included in the tarball uboot.2023.04-tld-1.nsa325.bodhi.tar is the script file uboot.2023.04-tld-1.nsa325.boot.scr. This is a Distro-Boot-compliant boot script. It can be used to recover from a damaged/corrupted envs NAND block, or if the envs NAND block has never been flashed (same as corrupted).

So for whatever reason, if in serial console, U-Boot reported the CRC error while loading the envs, using the boot.scr will provide a minimalist booting envs and enable booting into Debian. And then the default envs image can be flashed.

- Mount the USB rootfs on another Linux box. Assuming it is mounted at /media/sdb1.

cd /media/sdb1/boot
cp -a uboot.2023.04-tld-1.nsa325.boot.scr boot.scr
sync

- Unmount and then bring it back to the NSA325. Power up and let it boot automatically. The boot.scr should come into play, and allow booting to Debian.

So after you create the boot.scr on the rootfs /boot,

- Attached the USB rootfs
- kwboot with the uboot.2023.04-tld-1 version
- And let it boot automatically, the boot.scr will come into play and boot to Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 01:17PM
You are correct, I've saved the envs.. Sorry.

I created the boot.scr now and it seems to be working!

Now instead of me doing more bad things, would the next correct step be to flash?
https://forum.doozan.com/read.php?3,135222
"B. Flashing Instruction:"
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 01:45PM
> You are correct, I've saved the envs.. Sorry.

Not at all. We all have been there done that :)

> I created the boot.scr now and it seems to be
> working!

Cool!

> Now instead of me doing more bad things, would the
> next correct step be to flash?
> https://forum.doozan.com/read.php?3,135222
> "B. Flashing Instruction:"

Yes, I would flash 2023.04-tld-1, since it will provide USB 3.0 booting (the front port).

Quote

In addition to the capabilties provided by u-boot 2017.07-tld-1 for NSA325 , this 2023.04-tld-1 NSA325 u-boot has the following new capabilties:

- Supports for USB 3.0. You can now boot with the rootfs attached to the USB 3.0 port in front.
- Netconsole enhancement. (See Note C.1.2).
- Distro boot (see Note C.2 after the Installation Steps for usage).

And you have no fear now, since you know you have a rescue path with kwboot. And you don't need Step A.2. (Flashing tools), because you are in Debian and all those tools are included. Just follow the instruction verbatim, if you can't do certain step, post the question.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 02:20PM
I've sucessfully flashed the new uboot!
Will try and find a USB that I can use permanent for this setup, so I hope cloning the working one will work.

Is there an easy way to get a working webinterface for configuring NFS share, or would it all have to be via SSH/Serial?
Re: ZyXel NSA325 v2 bricked after bad flash
February 18, 2024 07:12PM
> Is there an easy way to get a working webinterface
> for configuring NFS share, or would it all have to
> be via SSH/Serial?

We set it up manually through SSH.

Quote
https://forum.doozan.com/read.php?2,23630 (Wiki thread)

NFS

NFS - HowTo set up NFS shares (and boot NFS rootfs), see also Debian 12 (bookworm) settings
Boot your Dockstar (and other plugs) using NFS rootfs, see also Debian 12 (bookworm) settings
Increase NFSD max_block_size
Reduce NFS threads

You can also try Cockpit web interface (available in Debian repo). It seems OK, but I have not tried it.

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



Edited 1 time(s). Last edit at 02/18/2024 08:07PM by bodhi.
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
February 19, 2024 02:06AM
I'm looking at OpenMediaVault. Seems they don't like older systems, but I managed to get OMV 7 installed by modifying a script I found. Took 40 minutes to install, but it seems to be working. Will have to set up the HDD drives first and test some before I can say for sure it's a working solution.
FIS
Re: ZyXel NSA325 v2 bricked after bad flash
March 02, 2024 01:03PM
Things have been running since my last post! Not the quickest but it's enough as a NAS. Thank you for all the help!
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: