Welcome! Log In Create A New Profile

Advanced

Zyxel NSA325 V2 - error nandwrite

Posted by superdm83 
Zyxel NSA325 V2 - error nandwrite
August 20, 2023 01:25PM
Hello, following this guide: https://forum.doozan.com/read.php?3,135222 loading the uboot in the NAS during nandwrite operation I receive the following error:


/tmp # /root/tools/./flash_erase /dev/mtd0 0 4 
Erasing 128 Kibyte @ 60000 -- 100 % complete 
/tmp # /root/tools/./nandwrite /dev/mtd0 /tmp/uboot.2017.07-tld-1.nsa325.kwb
/tmp/uboot.2017.07-tld-1.nsa325.kwb: No such file or directory
nandwrite: error!: Data was only partially written due to error
           error 9 (Bad file descriptor)
instead of
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

emmm ... :-D ... suggestion ?

The procedure up to this point has gone has expected.

Here the check for bad block:
~/tools # dmesg | grep -i 'bad'
Scanning device for bad blocks
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 200 at 0x000001900000

The NAS is still ON.


SORRY - my fault (again :-D ) ... wrong uboot image.

/tmp # /root/tools/./nandwrite /dev/mtd0 /tmp/uboot.2023.04-tld-1.nsa325.kwb 
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000



Edited 1 time(s). Last edit at 08/20/2023 01:33PM by superdm83.
Re: Zyxel NSA325 V2 - error nandwrite
August 20, 2023 01:48PM
Looks good :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 V2 - error nandwrite
August 20, 2023 03:28PM
-.-

some mistake .... after flashing (no error during the procedure) up to point 9 of the procedure here: https://forum.doozan.com/read.php?3,135222

I reboot the NAS (removing the USB) but the OS does not start -.-

I need to fight with this:
-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... OK
Resetting console stdin/stdout/stderr to serial...
In:    serial
Out:   serial
Err:   serial
pcie0.0: Link up
Net:   eth0: ethernet-controller@72000
Hit any key to stop autoboot:  0 
Initializing devices...
resetting 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... 2 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
resetting 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... 2 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Loading envs from usb 0...
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
Loading envs from usb 1...
** Bad device specification usb 1 **
Couldn't find partition usb 1:1
Can't set block device
Loading envs from usb 2...
** Bad device specification usb 2 **
Couldn't find partition usb 2:1
Can't set block device
Loading envs from usb 3...
** Bad device specification usb 3 **
Couldn't find partition usb 3:1
Can't set block device
Loading envs from sata 0...
Failed to load '/boot/uEnv.txt'
Loading envs from sata 1...
Failed to wait for completion on port 1
ATA operation timed out
Failed to wait for completion on port 1
ATA operation timed out
** Bad device size - sata 1 **
Couldn't find partition sata 1:1
Can't set block device
Loading envs from sata 2...
** Bad device specification sata 2 **
Couldn't find partition sata 2:1
Can't set block device
Loading envs from sata 3...
** Bad device specification sata 3 **
Couldn't find partition sata 3:1
Can't set block device
running scan_disk ...
Scan device usb
resetting 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... 2 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
resetting 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... 2 USB Device(s) found
scanning bus xhci_pci for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
device usb 0:1
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
device usb 1:1
** Bad device specification usb 1 **
Couldn't find partition usb 1:1
Can't set block device
device usb 2:1
** Bad device specification usb 2 **
Couldn't find partition usb 2:1
Can't set block device
device usb 3:1
** Bad device specification usb 3 **
Couldn't find partition usb 3:1
Can't set block device
Scan device sata
device sata 0:1
Failed to load '/boot/uImage'
device sata 1:1
** Bad device size - sata 1 **
Couldn't find partition sata 1:1
Can't set block device
device sata 2:1
** Bad device specification sata 2 **
Couldn't find partition sata 2:1
Can't set block device
device sata 3:1
** Bad device specification sata 3 **
Couldn't find partition sata 3:1
Can't set block device
loading uImage ...
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
resetting ...


If I connect the USB it is recognized and the OS on the USB is loaded.
superdm@NS-0001:~$ ssh root@192.168.1.74
root@192.168.1.74's password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 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: Sun Aug 20 14:02:28 2023 from 192.168.1.57
debian
192.168.1.74 
ZyXEL NSA325
Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
Debian 11.7
Sun Aug 20 14:04:49 PDT 2023 up 1 minute
root@debian:~#

I continue to study ....



Edited 2 time(s). Last edit at 08/20/2023 04:05PM by superdm83.
Re: Zyxel NSA325 V2 - error nandwrite
August 20, 2023 04:32PM
Did you create an Ext3 partition on the HDD and populate it with the rootfs tarball (the same way you did for the USB rootfs)?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA325 V2 - error nandwrite
August 21, 2023 01:48AM
... doh ... of course not !!

I'll lock on the forum for some tutorial/example about.
Due to my limited knowledge sometimes reading the various thread it's a little bit hard understand what they refer to..sorry.

Thanks



Edited 1 time(s). Last edit at 08/21/2023 01:54AM by superdm83.
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: