Welcome! Log In Create A New Profile

Advanced

NSA 325 V2 Debian Is Possible!

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
March 21, 2019 08:52PM
szucsati Wrote:
-------------------------------------------------------
> First of all, big thank you for all who
> contributed to this project. It's awesome to have
> Debian running on this old hardware.
>
> I have one question (or problem) though. I have
> the latest uBoot installed, should it boot the
> factory software if no rootfs partition is found?
> I was careless and managed to use flash_erase_all
> instead of flash_erase on mtd0, and of cours
> misplaced the memory stick where I saved the
> backup. Could this be why the original Zyxel
> system is not starting?

No, you can no longer boot stock OS with my new uboot (it is too modern for stock OS in this box). Even if stock OS is still intact on NAND.

This is something I have not found free time to work on. I think it is possible, though.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
March 22, 2019 01:51AM
Oh, it's good to know, I don't know why I thought it would. Is there a way to set it up though to fall back to NAND of there's no usb or sata device with rootfs? Or at least to manually configure it to boot from there should one would like to boot stock FW?
And how badly did I mess up the system by erasing the full partition?
Re: NSA 325 V2 Debian Is Possible!
March 22, 2019 02:47AM
szucsati,

> Oh, it's good to know, I don't know why I thought
> it would. Is there a way to set it up though to
> fall back to NAND of there's no usb or sata device
> with rootfs? Or at least to manually configure it
> to boot from there should one would like to boot
> stock FW?

As I said, not possible at the moment. Typically, stock OS is on NAND. The new u-boot won't boot it. When I do get around to work on it, without USB or HDD rootfs, it will fallback to boot either stock OS, or OpenWrt in NAND (but not Debian or Arch).

> And how badly did I mess up the system by erasing
> the full partition?

Pretty bad, stock OS in NAND is gone :) so your box will only boot with USB or HDD.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
March 22, 2019 05:22PM
Well, I should try to find that memory stick then :). At some point I will want to sell this, and would be useful to have the chance to get back to the official (and outdated) software.
Isn't mtd0 only the uBoot partition? If I erased that, wouldn't I still have the OS?

The reason why I wanted to try the official FW was that I just bought this NAS second hand, and I jumped straight to Debian, before testing the speeds. Now I'm getting about 70MBps read and 40MBps write (on an SSD, just for testing). Some benchmarks on the internet showed 100/80, but I also read similar results to mine. So a bit confused there, and wanted to check it myself.

Btw, what you are doing here is absolutely amazing! The software and the guides you put together are excellent, it was totally my fault that I missed a few bits, there's a lot to understand for someone new, but it's all there, just needs reading. And extre thumbs up for your patience towards those who come here with questions!
Re: NSA 325 V2 Debian Is Possible!
March 22, 2019 05:33PM
szucsati,

> Well, I should try to find that memory stick then
> :). At some point I will want to sell this, and
> would be useful to have the chance to get back to
> the official (and outdated) software.
> Isn't mtd0 only the uBoot partition? If I erased
> that, wouldn't I still have the OS?

Yes, it you've erased mtd only, then stock OS is still intact on other mtds. So you only need to restore u-boot image on mtd0 to go back to full stock.

>
> The reason why I wanted to try the official FW was
> that I just bought this NAS second hand, and I
> jumped straight to Debian, before testing the
> speeds. Now I'm getting about 70MBps read and
> 40MBps write (on an SSD, just for testing). Some
> benchmarks on the internet showed 100/80, but I
> also read similar results to mine. So a bit
> confused there, and wanted to check it myself.

Yes, that would be expected. Since stock FW was tuned and tested (often in a way that we don't want to do, i.e. kludge) to maximize the performance (how they were able to sell the box). What I provided here is a basic rootfs and full kernel. I expect users to do the tuning themselves and share the hints here to benefit all.

So if you see the IO or network performance is less than stock FW, you should post the benchmarks, and let other jump in to share theirs. At the end, if nobody figures out the tuning parameters, then I'd try to investigate.

One more thing, a lot of time, it is just how you set up your Samba, NFS, network ... that results in less performance.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/22/2019 05:35PM by bodhi.
Markus Fuger
Re: NSA 325 V2 Debian Is Possible!
May 10, 2019 01:49PM
I am not absolutely sure whether this is the correct thread or if this:https://forum.doozan.com/read.php?2,12096 or https://forum.doozan.com/read.php?3,19093 this wouldn't be better.

My NSA325 is working properly with all the given guides.
I am having a flash drive with 2 partitions
/dev/sda1 ext4 with /boot/ dir and uImage and uInitrd
/dev/sda2 f2fs with the rest of the rootfs file system (and named rootfs)

I do understand the limitation that the USB3 port at the front is not available at boot time - but how would it be after loading the kernel?
I found this thread (https://forum.doozan.com/read.php?3,19093, https://forum.doozan.com/read.php?3,24212, and the boot section from here: https://forum.doozan.com/read.php?2,23630) - but since it is that old I am not sure if using the newer uBoot 2017.07 wouldn't be better.

Here is my question: is it possible to have one (slow) flash drive at the back USB2 for booting with the most basic thing - and then the remaining stuff on a faster drive connected to USB3 at the front. How would I need to set up this configuration?

With kind regards,
Markus
Re: NSA 325 V2 Debian Is Possible!
May 10, 2019 05:04PM
Markus,

> Here is my question: is it possible to have one
> (slow) flash drive at the back USB2 for booting
> with the most basic thing - and then the remaining
> stuff on a faster drive connected to USB3 at the
> front. How would I need to set up this
> configuration?

Yes, definitely. The USB 2 in the back is where you should have /boot. Since the goal here is to use a fast drive for rootfs, you can store the rootfs on the faster USB 3.0 drive in front.

The requirement is:

- The rootfs drive on USB 3 has single partition, and the partition label is rootfs.
- The latest uboot.2017.07-tld-1.nsa325.mtd0.kwb was installed.
- And the u-boot env for bootargs is unchanged from the u-boot installation. If it was changed, then you should make sure the boot device looks like
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
root=LABEL=rootfs is the important arg that tell the kernel where to mount the rootfs.

The kernel will mount the rootfs on the USB 3.0 drive correctly after it booted.

-bodhi
===========================
Forum Wiki
bodhi's corner
Markus Fuger
Re: NSA 325 V2 Debian Is Possible!
May 13, 2019 01:34PM
Thanks bodhi!

it worked great! My initial mistake has been, that I just used the flash drive from the back in the front (which obviously had more partitions)
furthermore I found that f2fs seems to be to "unstable" to be used properly - therefore I am going to revert back to ext4 for the rootfs.

-Markus
Re: NSA 325 V2 Debian Is Possible!
May 13, 2019 05:50PM
Markus,

> it worked great! My initial mistake has been, that
> I just used the flash drive from the back in the
> front (which obviously had more partitions)

Cool!

> furthermore I found that f2fs seems to be to
> "unstable" to be used properly - therefore I am
> going to revert back to ext4 for the rootfs.
>

I think it is OK when you put the f2fs rootfs explicitly in fstab. IIRC, to rely on initrd to mount f2fs is not quite stable (we would need to tweak the initscript).

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/13/2019 07:17PM by bodhi.
fgh
Re: NSA 325 V2 Debian Is Possible!
August 12, 2019 09:21AM
I would like to make use of the copy button to run a simple bash copy command. Tried the script from the first post but didnt work. Does anyone have any other solution?


Also, i would take the opportunity to again thank bodhi so much for helping me out with the installation process. You should know that taking your time as you do here really makes people happy and bring some lights to the world. :-)
Re: NSA 325 V2 Debian Is Possible!
August 12, 2019 02:14PM
Hi fgh,

> I would like to make use of the copy button to run
> a simple bash copy command. Tried the script from
> the first post but didnt work. Does anyone have
> any other solution?

We use the esekeyd on these boxes.

It is listed in the Wiki thread

Quote

Key daemon (button control)

Multimedia keyboard daemon for Linux

> Also, i would take the opportunity to again thank
> bodhi so much for helping me out with the
> installation process. You should know that taking
> your time as you do here really makes people happy
> and bring some lights to the world. :-)

My pleasure :)

-bodhi
===========================
Forum Wiki
bodhi's corner
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: