Welcome! Log In Create A New Profile

Advanced

Debian on NSA325 V1/V2

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
May 26, 2017 06:32AM
lolinger,

> Noted that no cpufreq folder is created unter /sys
> /devices/system/cpu/cpu0. Therefore the CPU-clock
> is 1,6GHz all time. I am using latest rootfs and k
> ernel image.
> cpufreq-info gives the following error:
> analyzing CPU 0:
> no or unknown cpufreq-driver active
>
> What's happening? The kirkwood cpufreq-driver is n
> ot supported by the kernel?

It is not supported by the kernel. Most of original Kirkwood plugs have very low power consumption at idle so that was never considered.

Since we have now several Kirkwood NAS that could use the feature, I will add it to the next release if so requested.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 26, 2017 09:52AM
I'd be very happy if you could do that.
Don't forget that there are countries with very high energy prices.



Edited 1 time(s). Last edit at 05/26/2017 09:53AM by lolinger.
Re: NSA 325 V2 Debian Is Possible!
May 26, 2017 09:28PM
lolinger,

> Don't forget that there are countries with very hi
> gh energy prices.

Indeed! I will add that to the kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
July 09, 2017 02:16AM
Well,

uBoot is stuck after loading the Kernel with linux-4.11.3-kirkwood-tld-2. The kernel does not boot up after loading. I am still using linux-4.10.9-kirkwood-tld-1 which works fine for me but without cpufreq of course.
I boot with DTB files included in the kernel and EXT2 for boot partition.



Edited 1 time(s). Last edit at 07/09/2017 02:18AM by lolinger.
Re: NSA 325 V2 Debian Is Possible!
July 09, 2017 03:30AM
lolinger,

> uBoot is stuck after loading the Kernel with linux
> -4.11.3-kirkwood-tld-2. The kernel does not boot u
> p after loading. I am still using linux-4.10.9-kir
> kwood-tld-1 which works fine for me but without cp
> ufreq of course.
> I boot with DTB files included in the kernel and E
> XT2 for boot partition.

Do you have serial console? and what did you try to set in Debian before rebooting?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
July 09, 2017 05:20AM
Yeah, I have a serial console.
After U-Boot is done with loading the kernel and ramdisk, nothing happens.
Re: NSA 325 V2 Debian Is Possible!
July 09, 2017 05:39AM
lolinger,

The cpufreq is working on a few of my boxes with linux-4.11.3-kirkwood-tld-2.

If you don't post your serial console boot log then I have no idea what's wrong with your NSA325 :)

If you'd like me to help figure out, then power up, interrupt serial console and
printenv
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
andreasnsa
Re: NSA 325 V2 Debian Is Possible!
July 12, 2017 03:47PM
Same problem here with fresh install on NSA325v2 with rootfs Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2. After installing linux-4.11.3-kirkwood-tld-2-bodhi.tar.bz2 and reboot the NSA is stuck in Loading Kernel. With 4.10.9 its working.
Re: NSA 325 V2 Debian Is Possible!
July 12, 2017 05:56PM
andreasnsa & lolinger,

I'm running my NSA325v2 with this latest kernel linux-4.11.3-kirkwood-tld-2 for a while. And just rebooted it a couple days ago. So not sure what is the problem in your box.

1. Which u-boot are you running in your box? my latest release, or stock?
2. If running my u-boot image, do you have netconsole? Please post that log.
3. Do you have serial console, and if yes, please post the serial boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
crstil1979
Re: NSA 325 V2 Debian Is Possible!
July 22, 2017 06:52AM
hello... i would like to update my uboot... i.m confused, what have to do now?
i haven't managed to run debian....
my bootenv is mess
i'm in this point.......



U-Boot 2014.07-tld-4 (Aug 02 2015 - 00:40:12)
ZyXEL NSA325 2-Bay Power Media Server

SoC: Kirkwood 88F6282_??
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0 [PRIME]
MV88E1318 PHY initialized on egiga0
Unknown command 'button' - try 'help'
Unknown command 'button' - try 'help'
Unknown command 'button' - try 'help'
Hit any key to stop autoboot: 0

NAND read: invalid mtd device 'nand_mtd'
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA325>
Re: NSA 325 V2 Debian Is Possible!
July 22, 2017 04:43PM
crstil1979,

Quote

U-Boot 2014.07-tld-4 (Aug 02 2015 - 00:40:12)

This is relatively new version. So to set the envs correctly and boot into Debian :

1. Create the Debian rootfs if you have not done so, using Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (or use your existing rootfs if you already have one before that boots OK):

http://forum.doozan.com/read.php?2,12096

2. And then follow the instruciton in this post to create the default envs file uEnv.txt:

http://forum.doozan.com/read.php?2,14351,23556#msg-23556

3. Boot and watch serial console. Post the bootlog here if you have problem booting completely into Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
August 03, 2017 05:50AM
everything goes ok
Now i have updated with ubout 2016 and i have run debian 4.4.0
Also i managed to install omv 3.0.86
But.... when i insert sata hdd the boot proccess stop
What is going wrong?
Attachments:
open | download - log.txt (17.5 KB)
Re: NSA 325 V2 Debian Is Possible!
August 03, 2017 04:57PM
cratsil1979,

Because you have multiple drives during boot, and the default envs on uboot-2014.07 did not take care of that automatically. So the kernel does not know which drive is the system drive.

Try again with this newer script uboot.2016.05-tld-1.environment.scr in this post:

http://forum.doozan.com/read.php?3,29362,29390#msg-29390

Even though it was for u-boot-2016.05, it should work the same way for your current installed u-boot-2014.07.

------

By the way, once you booted into Debian, you should install the latest u-boot

Quote

Last Updated 19 June 2016

I've uploaded 2016.05-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S, NSA310, and HP-T5325.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Chris
Re: NSA 325 V2 Debian Is Possible!
January 14, 2018 07:27AM
Hey guys!

Thanks for all your effort bringing debian to our nsa325v2 devices!

I followed the "tutorial" at nas-central wiki, and i was able to boot from usb. But at one point, the process stops with the following message @ the serial console:

Begin: Running /scripts/local-premount ... done.
[   24.717084] JBD2: Unrecognised features on journal
[   24.721962] EXT4-fs (sda2): error loading journal
mount: mounting /dev/disk/by-label/rootfs on /root failed: Invalid argument
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
modprobe: module i8042 not found in modules.dep
[   24.846061] uhci_hcd: USB Universal Host Controller Interface driver
[   24.858172] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   24.870597] usbcore: registered new interface driver usbhid
[   24.876194] usbhid: USB HID core driver


BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)

What did i do wrong?

Thanks in advance!
Greetings, Chris
Re: NSA 325 V2 Debian Is Possible!
January 14, 2018 10:26PM
Chris,

Power up, interrupt serial console and

printenv
boot


and post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
July 19, 2018 06:17AM
Hi.
When I was looking for information how to flash a custom firmware on NSA325v2, I encountered these 2 topics:
http://zyxel.nas-central.org/w/index.php?title=Debian_on_325
http://forum.nas-central.org/viewtopic.php?f=249&t=15633

But my question is, is these tutorials still valid? I mean, they are pretty old and they are referring to Debian 3.14 and OMV 0.x (and probably Debian is currently @ 4.xx and OMV is 4.1.3 - http://www.openmediavault.org/download.html).

I have a pretty basic knowledge about Linux, shells, uboot etc.
Is there some newer step-by-step tutorial for noobs?

I was looking into this topic, several pages, but the longer I read, the more complicated things are... Am I supposed to flash "uboot" first (whatever it is) in order to boot newer version of OMV?

I would not like to brick my device, so I prefer to ask first...
Re: NSA 325 V2 Debian Is Possible!
July 19, 2018 04:38PM
raven66,

> http://zyxel.nas-central.org/w/index.php?title=Debian_on_325
> http://forum.nas-central.org/viewtopic.php?f=249&t=15633

> But my question is, is these tutorials still
> valid? I mean, they are pretty old and they are
> referring to Debian 3.14 and OMV 0.x (and probably
> Debian is currently @ 4.xx and OMV is 4.1.3 -
> http://www.openmediavault.org/download.html).
>

These instruction above are a little old, I could not load some images for whatever reason.

> > I have a pretty basic knowledge about Linux,
> shells, uboot etc.
> Is there some newer step-by-step tutorial for
> noobs?

Not really. I wrote detailed instructions, but they are meant for someone with a basic knowledge of Linux, not total noobs. You can take a look at these 2 posts:

Latest released rootfs: Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017):
https://forum.doozan.com/read.php?2,12096

Latest release U-boot:
https://forum.doozan.com/read.php?3,12381

> I was looking into this topic, several pages, but
> the longer I read, the more complicated things
> are... Am I supposed to flash "uboot" first
> (whatever it is) in order to boot newer version of
> OMV?
>

Stock U-boot could run the rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2. However, the setup is as risky as installing new u-boot image anyway. So you might as well install both u-boot and rootfs.

So look at the 2 linked posts and see if you are comfortable. Ask questions if you are unclear about something.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
July 20, 2018 03:15AM
Thanks. I will look into it.
Re: NSA 325 V2 Debian Is Possible!
September 17, 2018 09:01AM
Running latest debian on one of my NSA325 for many years but there is one thing that now really becomes a problem: USB3 performance with NTFS drive.
Copy of large files to/from external HDD with NTFS format via network (SMB) is painfully slow with ~8 MB/s.
With the internal disks (ext4) I achieve much better speed (read ~70MB/s, write ~50MB/s).
So NTFS is the bottleneck. But with stock F/W from Zyxel the transfer speed to an external HDD with NTFS file format is the same as to the internal disks. Zyxel even recommend NTFS as file format for external drives.
How to find out what cost so much performance and tweak it?
Re: NSA 325 V2 Debian Is Possible!
September 17, 2018 10:11AM
sebr,

> How to find out what cost so much performance and
> tweak it?

- See which version ntfs-3g that is used by the stock FW. And which is used by Debian.
- Compare the mount options after the disk is mounted in both cases.


Also try remount with big_writes option. This should bump the performance quite a bit.

Assuming it is mounted at /media/sdb1.
mount -o remount,noatime,big_writes /media/sdb1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 17, 2018 10:21AM
Quote

Copy of large files to/from external HDD with NTFS format via network (SMB)

This also a big factor: SMB.

Compare your smb.conf with ones in Wiki thread:

https://forum.doozan.com/read.php?2,23630

Quote

Samba

Samba smb.conf for a simple set up
HowTo setup Samba/CIFS shares

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 17, 2018 11:27AM
Thanks for the hint!
With
noatime, nodiratime and big_writes
I was able to improve speed for read and write to ~23MB/s!

Now I will look through the SMB configuration.
I wonder what Zyxel did to achieve the good performance...
Mikeinnc
Re: NSA 325 V2 Debian Is Possible!
October 21, 2018 09:50PM
Hello - I apologise if this has been answered before, but I can't seem to find comments that confirm, or otherwise, that the methods discussed here will work with a NSA325v1 box? I've built a FAT USB and loaded the files from the early pages of this discussion, and when I boot with the USB stick in place, it appears to work, and I assume the correct environment variables get loaded (oh, and yes, I have serial access so can see all that happens). I've also built a Linux USB stick with two partitions - the first is 100M and has the files from the /boot directory in it. It also has the boot flag set and is formatted with ext2. The second partition is formatted ext3, and has the entire rootfs extracted from Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 into it - all as root (oh, and I've used this version as I have found it is sufficiently 'old' that it may be better for a v1 box?) When I reboot with the Linux stick in one of the two USB ports at the rear, I get to a point where the I'm told:

(Re)start USB......
USB:  Scanning bus for devices... 3 USB device(s} found
Waiting for storage device(s) to settle before scanning...
T


and then it reboots.......again and again. Always the same!

Any clues gratefully received! Thanks - Mike
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 01:00AM
Mikeinnc,

> Hello - I apologise if this has been answered
> before, but I can't seem to find comments that
> confirm, or otherwise, that the methods discussed
> here will work with a NSA325v1 box? I've built a
> FAT USB and loaded the files from the early pages
> of this discussion, and when I boot with the USB
> stick in place, it appears to work, and I assume
> the correct environment variables get loaded (oh,
> and yes, I have serial access so can see all that
> happens).

The NSA325 v1/v2 is already supported with new u-boot uboot.2017.07-tld-1.nsa325.bodhi.tar and Debian rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

There is no need to do anything different. This is the working thread so a lot were experimentals.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Mikeinnc
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 03:13AM
Thanks Bodhi. You say:

Quote
Bodhi
The NSA325 v1/v2 is already supported with new u-boot uboot.2017.07-tld-1.nsa325.bodhi.tar and Debian rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

There is no need to do anything different. This is the working thread so a lot were experimental.

So do you mean that this thread - the one we are reading now - or either of the two threads you mention are experimental? Does this imply that I'm unlikely to get a working system without updating the u-boot and using the 4.12.1 version? And have you any idea why my USB stick just will *not* boot the box, although all the environment variables appear to be correctly set? Is that a - v1 - u-boot thing? What 'anything different' don't I need to do since it doesn't work? Is that, perhaps, what you mean by 'experimental'?

Thanks again for your help!
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 04:13AM
Mikeinnc,

> So do you mean that this thread - the one we are
> reading now - or either of the two threads you
> mention are experimental? Does this imply that I'm
> unlikely to get a working system without updating
> the u-boot and using the 4.12.1 version?

I meant the working thread does not have the final installation procedure. It will work if you read through and try to boot with stock u-boot. But that's just a lot of works. While the new u-boot and rootfs are available. So really there is no reason not to install new u-boot and create a new rootfs on USB or HDD.

> And have
> you any idea why my USB stick just will *not* boot
> the box, although all the environment variables
> appear to be correctly set? Is that a - v1 -
> u-boot thing? What 'anything different' don't I
> need to do since it doesn't work? Is that,
> perhaps, what you mean by 'experimental'?
>

Not that reason. Stock u-boot is quite primitive. So the error you got:
Re)start USB......
USB:  Scanning bus for devices... 3 USB device(s} found
Waiting for storage device(s) to settle before scanning...
T
Note the last character "T". Usually there are many T's following the 1st one. But it all means is stock u-boot failed to spin up the USB drive.

With new u-boot, we have no problem like that. And it will provide all modern feature such as Ext4, GPT partition,....to name just a few. So I really think it's a waste of effort to stay with stock u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Mikeinnc
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 04:52AM
Ahh, that all makes a lot of sense now! It's interesting that you say 'failed to spin up the USB drive' as the "drive" is actually a 16GB USB 'stick', so, of course, there's no 'spin'! That's what has surprised me - I am sure I have the 'stick' formatted; partitioned, and labelled correctly, yet no matter what I seem to do, or what version I have loaded, I always just get that single T after the device is scanned. (Oh, and I have even tried with an alternative USB stick - it's still the same.) It takes a few seconds before the T appears, almost as though the device is trying to do 'something', but then just reboots. Strange.

But, as you say, if this was an 'experimental' thread, maybe that's where the problem lies. It seems weird that some respondents in the thread appear to have made it work - maybe it's what they aren't saying that's important. Unfortunately, that often appears to be the case!! So, I'll start afresh - use the new u-boot and rootfs and see if I can successfully navigate the process.......

Thanks for your advice - it is very welcome.

Mike
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 06:02AM
Mike,

“Spin up” was my lazy typing :) (“initialize” is more appropriate) USB flash has no spinning rust like with HDD of course!

The USB detection prcessing was timed out with a T like that in uboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Mikeinnc
Re: NSA 325 V2 Debian Is Possible!
October 22, 2018 08:22PM
bodhi Wrote:
-------------------------------------------------------
> Mike,
>
> The USB detection prcessing was timed out with a T like that in uboot.

You don't realise how important that - probably throwaway line!! - became in my quest! So, if that's what that annoying 'T' means, it gave me a clue as to what the initial problem might be. Yes, I'd tried two USB sticks, but - stupidly! - both of the same 'type' (and for reference, they are Verbatim [insert colour here] 'StorNGo' 16GB sticks). This morning, after that lightbulb moment on reading your comment, I tried formatting; partitioning and loading a totally different 8GB USB stick. And it worked!!!! Yes, OK, an old Debian version and original u-boot, but the very fact it worked has given me a great deal of renewed confidence that it is possible. So, now I can move on to your suggestions of updating u-boot and using a later version knowing it's not impossible. Thanks so much!
mikeinnc
Re: NSA 325 V2 Debian Is Possible!
October 23, 2018 03:36AM
Hi Bodhi

Sorry to bother you, but reading the - excellent! - instructions about flashing a new u-boot, I've come across a couple of queries.

You suggest saving the current uBoot image that is in mtd0. I used the 'nanddump' command, exactly as you wrote it

nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0


but get two errors. The first is that there is no '--noecc' option for the command. The second is similar - there is no '--omitoob' option. There IS an option '--omitbad'. So:

(1) is '--noecc' critical? (Is it ecc memory?)

(2) should the '--omitoob' option be '--omitbad' or is it really referring to 'out of band' memory (oob)? And, again, is the lack of the option a showstopper?

The next issue refers to bad blocks. I have two - at 0x0000048c0000 #582 and 0x0000050a0000 #645.

(3) how do I work out which block and which mtd number these are present in? Is there an easy formula? Are these OK - ie can I go ahead?

Thanks - again! - for all your help. I'm learning fast!! :-)
Author:

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: