Welcome! Log In Create A New Profile

Advanced

Zyxel NSA320 : basic support for Debian installation

Posted by davygravy 
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2013 05:20PM
HellG,

as you can see, my stupid entry has gone and I have apologized for the confusion. Now, I also apologize for stealing your time ...

Sorry and thanks for taking the time. However, I believe the uBoot-environment can be much improved so as to be able to boot from either one of the USB-ports, use a separate boot-partition and so on (see my post here).

I was just being stupid here, but hope to contribute something useful now I might finally get going ...

---
Standart ist der Standardfehler
Re: Zyxel NSA320 : basic support for Debian installation
May 14, 2013 04:13AM
Hi guys,

has anybody been able to use the uBoot/rootfs from the first post with the NSA325? It does seem to offer quite a bit more bang and is currently available for 99,90€ ...

Cheers,

chessplayer

---
Standart ist der Standardfehler
eas
Re: Zyxel NSA320 : basic support for Debian installation
May 25, 2013 02:53AM
I haven't, though my impression was that the NSA325 was pretty much the same as the NSA320, but for the faster CPU and USB3 and that people had no trouble using the same kernel on both.
Re: Zyxel NSA320 : basic support for Debian installation
June 03, 2013 02:35PM
Hi guys,

just a brief warning: do NOT use the procedure on the NSA325! Unless I did something completely strange, I managed to brick the NSA325 that way. I do not get any output over the serial connection any more and it is going into an endless boot attempt cycle.

Stiil, I cannot quite believe it, since the original uBoot of the two devices and in particular the mtdparts are so much alike, but there you go ...

---
Standart ist der Standardfehler
Hello everyone,

I ran into a very big problem:

I tried installing uBoot via tftpboot, using the commands given in the readme-file. I got messages about 2 bad blocks, but due to this post http://forum.nas-central.org/viewtopic.php?f=249&t=3939&start=15#p26487 where everything worked out fine, i ignored them, erased the old uBoot and wrote the new one.

From now on, the Zyxel won't boot up. The LEDs don't change (they stay green, red and yellow), the drives start but afterwards don't do anything. I cannot connect to the NAS, not via the Serial Adapter, nor via Netconsole.

Is there anything I can do to save my NAS, e. g. restore uBoot in a clever way?

Thank you so much for your help!
Re: Zyxel NSA320 : basic support for Debian installation
July 31, 2013 11:47PM
mindm49907,

You can use UART booting to boot and then flash a known good uBoot for the NSA320:
http://forum.doozan.com/read.php?3,7852,7852

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

first of all, thank you for your very fast answer! Using UART-Booting, I can boot my Zyxel and access Debian! So not all hope is lost yet, right? :-)

Using UART-Booting, I stopped autoboot and tried to flash uBoot, the same version that already worked wit UART-Booting, again (since UART-Booting doesn't, or is there any possibility?). With uboot.kwb on an USB-Stick, i tried

usb start
fatload usb 0:1 0x800000 uboot.kwb
nand erase 0x0 0x80000
nand write 0x800000 0x0 0x80000

but the answers I got were

NSA320> fatload usb 0:1 0x800000 uboot.kwb
reading uboot.kwb

524288 bytes read
NSA320> nand erase 0x0 0x80000

NAND erase: device 0 offset 0x0, size 0x80000
Skipping bad block at  0x00040000                                          
Skipping bad block at  0x00060000                                          

OK
NSA320> nand write 0x800000 0x0 0x80000  

NAND write: device 0 offset 0x0, size 0x80000
Skip bad block 0x00040000
Skip bad block 0x00060000
 524288 bytes written: OK

again. Due to this post, http://forum.nas-central.org/viewtopic.php?f=249&t=3939&start=15#p27049 it has worked after flashing again and again, but I already have tried many times, and there's no success: the device does not boot up, but shows the same situation as described in my post up there.

Are there any suggestions on how to deal with this problem, or have you maybe experienced the same issue?

Again, thank you very much for your help!
Re: Zyxel NSA320 : basic support for Debian installation
August 01, 2013 08:06AM
as I apparently did at that time:

>EDIT EDIT: saveenv from u-boot prompt cured the CRC!

try that, it worked for me.
Hello gaogao,

thank you for your very fast reply! But unfortunately, this didn't solve the problem for me. The situation didn't change. Connected via

picocom -b 115200 /dev/ttyUSB0

I do not get even one single output (which before the flashing-attempt, worked fine).

I just realized I made a little mistake in my previous post. I used

nand write.e
instead of
nand write
which is mentioned there. Sorry if i got you on the wrong track with this.

Do you have any more suggestions for me?

Thank you people very much!
Re: Zyxel NSA320 : basic support for Debian installation
August 01, 2013 01:57PM
Aren't you able to UART-boot? if you are, type the saveenv before trying to write uboot again.
Re: Zyxel NSA320 : basic support for Debian installation
August 02, 2013 02:27AM
mindm49907,

After UART booted and you've interrupted uBoot, please get the list of envs and post here
> printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello again guys,

sorry for my apparently late reply, but my Saturday's post went missing somehow. Anyway, I tried the saveenv-command after erase, after write.e, and after both commands, but unfortunately it didn't change the situation. Following up, there are the results of printenv:

NSA320> printenv
arcNumber=3956
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
boot_sata2=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rootdelay=10 $mtdparts; ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
bootcmd=run boot_sata1; run boot_sata2; run bootcmd_usb; usb stop; run bootcmd_rescue; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=c8:6c:87:12:34:56
filesize=80000
if_netconsole=ping $serverip
ipaddr=192.168.11.150
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
netmask=255.255.255.0
partition=nand0,2
preboot=run if_netconsole start_netconsole
serverip=192.168.11.149
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=LABEL=USBROOT
usb_rootdelay=10
usb_rootfstype=ext2

Environment size: 1802/131068 bytes

Can you identify anything configured wrong there? If I boot via UART-Booting, everything is working fine.

Thank you guys very much for your help!
Re: Zyxel NSA320 : basic support for Debian installation
August 05, 2013 02:31AM
Hi,

I know for a fact (learned the hard way) that if the server is not reachable (in your case 192.168.11.149), it will seem as if the thing does not boot. After over an hour, it might actually relent and boot ...

So, for some reason, the ZyXel does not just skip that part then, but hangs there seemingly forever. So try either setting the serverip to your router's address (probably 192.168.11.1) or just empty the preboot variable (in both cases, however, you will not be able to use netconsole, unless you have some way of opening a terminal and using netconsole on the router (e.g. with OpenWRT)).

Maybe this helps.

Cheers,

chessplayer

---
Standart ist der Standardfehler
Re: Zyxel NSA320 : basic support for Debian installation
August 05, 2013 03:14AM
chessplayer Wrote:
-------------------------------------------------------
> Hi,
>
> I know for a fact (learned the hard way) that if
> the server is not reachable (in your case
> 192.168.11.149), it will seem as if the thing does
> not boot. After over an hour, it might actually
> relent and boot ...
>
> So, for some reason, the ZyXel does not just skip
> that part then, but hangs there seemingly forever.
> So try either setting the serverip to your
> router's address (probably 192.168.11.1) or just
> empty the preboot variable (in both cases,
> however, you will not be able to use netconsole,
> unless you have some way of opening a terminal and
> using netconsole on the router (e.g. with
> OpenWRT)).
>
> Maybe this helps.
>
> Cheers,
>
> chessplayer

Very informative hints, chessplayer. That's a difficult problem to figure out. Which uBoot version do you have on the NSA320?

OT, is your NSA320 hardisk LED working correctly with the new kernel?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
August 05, 2013 04:58AM
Hi Bodhi,

this is what uBoot is saying:

U-Boot 2011.12 (May 03 2012 - 17:04:23)
ZyXEL NSA320 2-Bay Power Media Server
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0

About the LEDs: no, they are not quite ok. Only the top one and the USB LED show up at all; to start with, they are both green, then the USB LED will turn off and the top one will first flash orange, then green and when booted up will be solid orange (not optmal, but I can live with that).

Kernel is:

└──> uname -a
Linux bigdata-on-arm-bd3 3.8.11-kirkwood-tld-3 #2 PREEMPT Fri Jun 14 07:51:05 PDT 2013 armv5tel GNU/Linux

Maybe at some point I will find the time to meddle with the LEDs, but not any time soon.

Cheers,

chessplayer

---
Standart ist der Standardfehler
Re: Zyxel NSA320 : basic support for Debian installation
August 06, 2013 12:30AM
Hi Chessplayer,

Probably because you need to set /sys/class/leds/xxx/trigger to the correct value at the end of /etc/rc.local to turn it green. It's in /etc/rc.local in my rootfs.

AFAIK, the NSA320 patch should allow the HDD (ide) trigger to be set and the HDD LED will automatically flash whenever disk access occur. This works on Goflex Net.

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



Edited 1 time(s). Last edit at 08/06/2013 12:34AM by bodhi.
Hello again,

I set up the serverip to my router's IP as chessplayer suggested (i also adjusted the ipaddr, accordingly) using UART-Booting, Then I booted via UART-Booting again, and got the message that the server "is alive". I used a Gigabit-cable and connected the Zyxel to a Gigabit-switch. But unfortunately, this configuration won't convince the Zyxel to boot up itself (i. e. without UART-Booting, but with the uboot I installed a few days ago) neither. I also tried to let it run for about two hours, but there were no changes. I still don't get even one single output accessing the device serial via picocom.

What about those bad-block-errors that occure when flashing uboot? Can they be a problem? I read about the possibility of unmarking those blocks, but I don't know if doing this will maybe help me or rather ruin my device completely. Or are there more suggestions for what else I can try to get the Zyxel to boot up itself without having to use UART-Booting?

Thank you people really much for your support!
Re: Zyxel NSA320 : basic support for Debian installation
August 06, 2013 03:01AM
mindm49907,

Since you got 2 bad blocks in the middle of uBoot image, you will need to verify them to see if it was flashed OK. I did the same thing a while back. Let me see if I can get my old log out and work out the steps for you, perhaps tomorrow :) once you've verified a good flash around the bad blocks, uBoot will be bootsstrapped OK. IIRC my experience with it, in your case you will need to erase 6 blocks, not 4 blocks (4 + 2 bad blocks).

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

this would be very great! Thank you in advance, for your time and your support!
Re: Zyxel NSA320 : basic support for Debian installation
August 07, 2013 12:22AM
Here is my cleaned up log when I did the flash around the bad block (the 2nd time to update uBoot). I have one bad block. The uBoot image was built by Davygravy.

And by the way, restamp gave me the guidance way back when I did this the first time! and I updated this Pogo E02 the 2nd time with the new uBoot the same way we did before. Thanks again restamp!

Flashing uBoot on Pogoplug E02 with bad block at 0x60000

#cd /tmp

#flash_erase /dev/mtd0 0 5
Erase Total 5 Units
Performing Flash Erase of length 131072 at offset 0x60000
MTD Erase failure: Input/output error

#nandwrite /dev/mtd0 uboot.pogoplugE02-L2Coff-arcNumFixed.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
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000

#nanddump -nof /tmp/uBoot1.dump -l 0x60000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00060000...

#nanddump -nof /tmp/uBoot2.dump -l 0x20000 -s 0x80000 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00080000 and ending at 0x000a0000...

#cat uBoot1.dump uBoot2.dump > uBoot.dump

#diff -s uboot.pogoplugE02-L2Coff-arcNumFixed.kwb  uBoot.dump
Files uboot.pogoplugE02-L2Coff-arcNumFixed.kwb and uBoot.dump are identical

reboot

What I forgot was you do have UART booting :) so really there is no risk in ignoring the steps to compare the parts of uBoot that were flashed in non-consecutive blocks.

So what I would do in your case is to go ahead get in uBoot with UART booting, and reflash it the same way you did, but erase 6 blocks, instead of 4 blocks:

NSA320> nand erase 0x0 0x80000
to
NSA320> nand erase 0x0 0xc0000

Note that you can also do this in Debian as I did, using fw_env and nand tools.

If you're not sure about something please post.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I bought a zixel nsa320 from ebay for 53 dollars. It said the on button didn't work. Turns out it was fine but the flash was corrupted and according to the serial output the RC6 wasn't completing and building the file system. So I couldn't tftpboot or UART boot (no ethernet).
It booted into the damaged linux and I could use some commands. I finally stumbled onto this wiki page:

http://zyxel.nas-central.org/wiki/Restoring_Firmware

that describes using the usb flash to restore the original firmware. I was able to run it from the usb stick and low and behold before my very eyes it rewrote the filesystem and voila! I had my system running!

So if you want to baseline it and start from scratch try the link. There is a typo in the instructions. You need to use "mnt" instead of "net" in the path. The wiki says "/net/parner. . .". It should be /mnt/parner. . .
Hello again guys,

thank you very much for your answers, and sorry for my late reply. But I have been out of town for a while, and I will be for another week. I'll try right after I'm back, and I'm already very curious what will happen.

Just wanted to tell you I haven't forgotten neither you guys nor my device :-)
Re: Zyxel NSA320 : basic support for Debian installation
August 15, 2013 07:38PM
How is this tarball method different from the install. Obviously it is a static image but can you do the apt-get upgrade to get to the latest kernel?
Re: Zyxel NSA320 : basic support for Debian installation
August 16, 2013 12:30AM
Which tarball?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
August 17, 2013 10:23AM
DavyGravy tarball. I installed his tarball from the initial posting and along with his included new uboot. I was looking at the other methods of using a stick to run the debian install. I have the NSA320.
Re: Zyxel NSA320 : basic support for Debian installation
August 18, 2013 06:35PM
z3bram3n Wrote:
-------------------------------------------------------
> DavyGravy tarball. I installed his tarball from
> the initial posting and along with his included
> new uboot. I was looking at the other methods of
> using a stick to run the debian install. I have
> the NSA320.

After you installed and running, it's the same as any Debian rootfs. Yes, running apt-get update and upgrade/dist-upgrade should update it to the latest packages and kernel. The only manual thing to do is: whenever the upgrade results in a new initrd and/or kernel then use mkimage to generate new uImage and uInitrd in /boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello again people,

bodhi's advice did the trick! Thank all of you very much for your help!

Victory screetch!
Re: Zyxel NSA320 : basic support for Debian installation
August 21, 2013 02:55AM
mindm49907 Wrote:
-------------------------------------------------------
> Hello again people,
>
> [url=http://forum.doozan.com/read.php?2,7806,13250
> #msg-13250]bodhi's advice[/url] did the trick!
> Thank all of you very much for your help!
>
> [url=http://www.youtube.com/watch?v=ENhZToII4pI]Vi
> ctory screetch![/url]

:))
Congrats !!! glad to hear your NSA320 is alive and well.

-bodhi
===========================
[color=#3333FF][url=http://forum.doozan.com/read.php?2,23630]Forum Wiki[/url][/color]
[url=https://mibodhi.blogspot.com]bodhi's corner (buy bodhi a beer)[/url]
Re: Zyxel NSA320 : basic support for Debian installation
August 21, 2013 08:00AM
Is there a way to install Debian on the NSA325 in the meantime ?
Re: Zyxel NSA320 : basic support for Debian installation
August 26, 2013 01:13PM
Would also like to know if debian would work with nsa325
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: