|
ZyXel NSA325 v2 bricked after bad flash February 12, 2024 10:27AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 12, 2024 01:30PM |
Admin Registered: 14 years ago Posts: 19,931 |
Quote
Unbricking with Serial Console & JTAG console
How to unbrick your box using serial console with kwboot
|
Re: ZyXel NSA325 v2 bricked after bad flash February 13, 2024 11:53AM |
Registered: 1 year ago Posts: 16 |
All it says is to type CTRL... to cancel, and the arrow just keeps blinking.Quote
kwboot -t -B 115200 /dev/ttyS2 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p
|
Re: ZyXel NSA325 v2 bricked after bad flash February 13, 2024 12:34PM |
Admin Registered: 14 years ago Posts: 19,931 |
Quote
I have serial connection (which was what I used to erase it)
Quote
> Am I supposed to connect the 3.3V pin?
|
Re: ZyXel NSA325 v2 bricked after bad flash February 13, 2024 01:30PM |
Admin Registered: 14 years ago Posts: 19,931 |
kwboot -t -B 115200 /dev/ttyS2 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p
|
Re: ZyXel NSA325 v2 bricked after bad flash February 14, 2024 03:30AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 14, 2024 12:29PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 15, 2024 11:02AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 15, 2024 12:05PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 15, 2024 03:29PM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 15, 2024 10:06PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 16, 2024 02:39AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 16, 2024 04:19AM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 16, 2024 12:15PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 17, 2024 11:45AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 17, 2024 02:02PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 07:50AM |
Registered: 1 year ago Posts: 16 |
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 |
Registered: 10 years ago Posts: 481 |
fdisk -l /dev/sd?
lsblk -f /dev/sd?
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 11:25AM |
Registered: 1 year ago Posts: 16 |
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#
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#
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 12:00PM |
Admin Registered: 14 years ago Posts: 19,931 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 12:09PM |
Registered: 1 year ago Posts: 16 |
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>
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 12:25PM |
Admin Registered: 14 years ago Posts: 19,931 |
printenv
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 12:31PM |
Registered: 1 year ago Posts: 16 |
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
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 12:54PM |
Admin Registered: 14 years ago Posts: 19,931 |
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.
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 01:17PM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 01:45PM |
Admin Registered: 14 years ago Posts: 19,931 |
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).
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 02:20PM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash February 18, 2024 07:12PM |
Admin Registered: 14 years ago Posts: 19,931 |
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
|
Re: ZyXel NSA325 v2 bricked after bad flash February 19, 2024 02:06AM |
Registered: 1 year ago Posts: 16 |
|
Re: ZyXel NSA325 v2 bricked after bad flash March 02, 2024 01:03PM |
Registered: 1 year ago Posts: 16 |