Welcome! Log In Create A New Profile

Advanced

Debian on NSA310S?

Posted by pengu 
Re: Debian on NSA310S?
June 25, 2015 04:40AM
@ JohnnyUSA:


you don't need the bootable flag if needet I can upload a usable stick image with my settings.



Edited 2 time(s). Last edit at 06/25/2015 04:55AM by pengu.
Re: Debian on NSA310S?
June 25, 2015 04:53AM
you need EXT3 for a single partition, if you want to use another filesystem (EXT4, BTRFS, ..) you need a small kernel partition first and a seperate partition for the rootfs.

we booth running into problems because the stock u-boot isn't scriptable so it can't decide wich stich to use when using more then one stick and the wrong one is coming up
Re: Debian on NSA310S?
June 25, 2015 05:12AM
pengu Wrote:
-------------------------------------------------------
> @ JohnnyUSA:
>
>
> you don't need the bootable flag if needet I can
> upload a usable stick image with my settings.


Please do so until i figure out what's happening wrong on my end.



LE: Ok, it worked! I've checked again every step, every setting and even if last night, as you guys seen from my u-boot env log, entries were correct... today they switched somehow to "fatload" instead of "ext2load". How did they change? Have no clue!!

Now i've switched to ext2load and also did a SYNC on telnet (dunno if it's useful or not) but after the reboot, i have an working debian linux on usb stick.

So, i really dunno what happened.. really dunno how those u-boot settings changed without me actually do something.. but now it's working.



Edited 3 time(s). Last edit at 06/25/2015 05:43AM by JohnnyUSA.
Re: Debian on NSA310S?
June 25, 2015 06:10AM
This is what I said.
you have to use ext2load when using a ext2/3 partition
when using a fat partition like me, you have to use fatload.
Re: Debian on NSA310S?
June 25, 2015 06:13AM
pengu Wrote:
-------------------------------------------------------
> This is what I said.
> you have to use ext2load when using a ext2/3
> partition
> when using a fat partition like me, you have to
> use fatload.

I knew that since i first read your guide. I've setup them like they should but somehow i didn't save the environment.. or something fishy happened.. :(

Now let's test the leds ;)
Re: Debian on NSA310S?
June 26, 2015 02:55AM
Back with some news guys!

After almost 10 hrs of testing stuff it seems i figured out what is/was wrong with Debian being unable to boot from USB.

So, if i remove the power cord from NAS or i use the HALT command in Debian to shutdown the NAS, at power-on, i can't boot anymore into Debian. The only solution i found is to remove the USB, boot into Zyxel OS, login to Zyxel OS telnet, plug the USB back into the NAS, type "sync" and "reboot" on Zyxel OS telnet --> Voila! Debian booting again.

Need to repeat these steps every time i HALT or shutdown the NAS. Any thoughts? Cheers!
Re: Debian on NSA310S?
June 26, 2015 02:59AM
This is no problem here:
When issuing the halt command in debian and power the device on later, it boots fine.
I think this could be kernel related.
You use 3.18.5 as in the rootfs right?
I'm using 4.0.0-tld2 and no problem.
Re: Debian on NSA310S?
June 26, 2015 03:01AM
pengu Wrote:
-------------------------------------------------------
> This is no problem here:
> When issuing the halt command in debian and power
> the device on later, it boots fine.
> I think this could be kernel related.
> You use 3.18.5 as in the rootfs right?
> I'm using 4.0.0-tld2 and no problem.

Ok, gonna switch to 4.0.0-tld2 also and see what's happening ;)
Re: Debian on NSA310S?
June 26, 2015 03:39AM
booting into 3.18.5 kernel is no problem.
after halting the system and starting it later .. also no problem
perhaps your usb stick isn't recognized sometimes.
please adjust usb_rootdelay to a higher value (perhaps 10)
Re: Debian on NSA310S?
June 26, 2015 04:10AM
Ok, i've installed the new kernel --> no change

1. On coldboot (halt/power off the NAS), it doesn't boot from USB.
2. I've changed the usb_rootdelay to 15, nothing, on coldboot doesn't boot from USB

NOTE: It seems i was wrong, i don't have to log to ZyXEL OS telnet and do "sync/reboot" in orded to boot from USB. It's enough to coldboot to ZyXEL OS then plug the USB and do a "reboot" into ZyXEL SSH console and the USB is starting to boot. Strange...



Edited 1 time(s). Last edit at 06/26/2015 04:11AM by JohnnyUSA.
Re: Debian on NSA310S?
June 26, 2015 04:19AM
Do you have another usb stick to test?

you said earlier that netconsole is working.
Can you give some output?
I think this isn't kernel related so some output at U-Boot stage could help

It should be like this:

http://pastebin.com/7uptNXc2



Edited 5 time(s). Last edit at 06/26/2015 04:40AM by pengu.
Re: Debian on NSA310S?
June 26, 2015 05:40AM
pengu Wrote:
-------------------------------------------------------
> Do you have another usb stick to test?
>
> you said earlier that netconsole is working.
> Can you give some output?
> I think this isn't kernel related so some output
> at U-Boot stage could help
>
> It should be like this:
>
> http://pastebin.com/7uptNXc2


No, i said i couldnt manage to get nc to work. I'll try with another usb later on today, also, i've ordered an usb ttl adapter like you've instructed me on PM.



Edited 1 time(s). Last edit at 06/26/2015 07:49AM by JohnnyUSA.
Re: Debian on NSA310S?
June 26, 2015 08:24AM
Ok, i've tested with 3 different USB sticks: one no-name (4gb), one DataTraveler (64gb), one (forgot name - 16gb). None of them booted on NAS coldboot.

They all booted when i first SSH'ed into ZyXEL OS and did a "reboot". I suppose there's nothing we can do at least until my TTL adapter arrives.
Re: Debian on NSA310S?
June 26, 2015 08:56AM
ok .. this looks like a watchdog problem
Re: Debian on NSA310S?
June 27, 2015 12:45AM
@Johnny,

Some USB sticks have problem with coldboot (some also have problem with warmboot, but not coldboot). If you can, get a Sandisk stick (any model) and try that.

nc problem: this is expected with stock u-boots in general. So don't waste time trying. Usually we need custom u-boot to support netconsole.

@pengu,

No, I think the watchdog problem is diffferent. Eventhough it seems suspected that it takes about 30 seconds.

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



Edited 2 time(s). Last edit at 06/27/2015 01:05AM by bodhi.
Re: Debian on NSA310S?
June 27, 2015 04:25AM
yes I can confirm that sandisk sticks were fine and also these nano usb sticks and some intenso, maxflash or similar.

right, it looked like a watchdog problem but it couldn't because your kernel handles it corrctly.
Re: Debian on NSA310S?
June 28, 2015 01:07PM
I've ordered this one today: http://www.ebay.com/itm/SANDISK-Cruzer-Fit-USB-Flash-Drive-16GB-16G-Mini-Nano-New-Lifetime-Warranty-/221686809520?pt=LH_DefaultDomain_3&hash=item339d9043b0

Hope it will do the job. I'm too inlove with my Debian installation and can't stand the fact i have problems at coldboot.
Re: Debian on NSA310S?
June 28, 2015 01:52PM
@Johnny,

That Cruzer Fit will do the job just fine! I use this for all my plugs that boot with USB.

Heads up: If the cold boot problem is still there even with Sandisk drive, you'll need serial console to troubleshoot this. Too bad we don't have newer u-boot for NSA310 yet. So serial console is a sure way to troubleshoot.

But before getting serial console, please post back for another idea I'd like you to try.

@pengu,

Your guess about the watchdog caused me to think about this. Further thought: do we know if the NSA310S has a hardware watchdog like the NSA325?

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



Edited 1 time(s). Last edit at 06/28/2015 02:10PM by bodhi.
Re: Debian on NSA310S?
June 28, 2015 02:11PM
bodhi Wrote:
-------------------------------------------------------
> @Johnny,
>
> That Cruzer Fit will do the job just fine! I use
> this for all my plugs that boot with USB.
>
> Heads up: If the cold boot problem is still there
> even with Sandisk drive, you'll need serial
> console to troubleshoot this. Too bad we don't
> have newer u-boot for NSA310 yet. So serial
> console is a sure way to troubleshoot.

Serial TTL cable will arrive tomorrow and i'll post the output of u-boot on this topic. I think we can make it work and spread the word to other NSA310S owners ;)



Edited 2 time(s). Last edit at 06/28/2015 02:22PM by JohnnyUSA.
Re: Debian on NSA310S?
June 29, 2015 02:59PM
Ok, back with fresh news.

Got my Sandisk Nano Stick and everything is working perfectly. Debian boots at coldboot or reboot.

Now, i've managed to get my USB TTL bla bla and here's the U-Boot output for the other stick that didn't boot on coldboot:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.06.29 20:55:46 =~=~=~=~=~=~=~=~=~=~=~=

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (May 28 2013 - 16:07:08) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  5  4  3  2  1  0 
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
T Device NOT ready
   Request Sense returned 00 00 00
1 Storage Device(s) found
Device NOT ready
   Request Sense returned 00 00 00
** Can't read from device 0 **

** Unable to use usb 0:1 for fatload **
Device NOT ready
   Request Sense returned 00 00 00
** Can't read from device 0 **

** Unable to use usb 0:1 for fatload **
## Booting image at 00800000 ...
Bad Magic Number

NAND read: device 0 offset 0x4640000, size 0xa00000

Another thing that i must solve but don't know how, the Power Off button. tried with ACPID but there's something missing from the kernel.
Re: Debian on NSA310S?
June 29, 2015 03:24PM
It looks like the stick needs more time to come up

What is happening when you press the power button?



Edited 1 time(s). Last edit at 06/29/2015 03:26PM by pengu.
Re: Debian on NSA310S?
June 29, 2015 03:26PM
Johnny,

Cool! so it was just the USB stick problem, like we suspected.

For power button, I like davidedg's use of esekeyd daemon. See instruction here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 29, 2015 03:42PM
@pengu nothing happens, that's why i'm looking for alternative to actually put some use on that button.
@bodhi thanks! gonna try that.

I think we should make something official about pengu's discovery on NSA310S, more ppl should know Debian is working properly. I've had enough time for testing these days, running both Flexget and Sonarr, everything works perfectly fine.



Edited 2 time(s). Last edit at 06/29/2015 04:11PM by JohnnyUSA.
Re: Debian on NSA310S?
June 29, 2015 04:24PM
@pengu,

I would like to announce in the kernel thread that the NSA310S has been tested and supported.

Can you verify (at least on paper) that the specs of NSA310S versus NSA320S are more or less the same regarding the kernel DTS? I know you and Johnny have been running it fine as NSA320S. However, there must be something different between the 2 boxes, and I just want to make sure that the differences are not significant (i.e required changes to the DTS to work for NSA310S).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
June 29, 2015 05:04PM
They are more or less the same.
The only difference is the amout of ram and the second HDD (NSA320s).
(perhaps no / different RTC Chip)
I don't have a nsa320s but in another thread here, I found a link to a NSA320s debian install tutorial.
There I found a picture of the board and it looks similar (except of the mentioned things) to NSA310s one


http://www.madadmin.com/wp-content/uploads/2015/01/nsa320s-alaplap.jpg <- NSA320s

http://i.imgur.com/B4eM6iD.jpg <- NSA310s



Edited 1 time(s). Last edit at 06/29/2015 06:38PM by pengu.
Re: Debian on NSA310S?
June 29, 2015 05:36PM
Seems i was in hurry. Sadly more problems now...

On halt/shutdown my ethernet is somehow dying:

[   23.423067] NET: Registered protocol family 10
[   23.594219] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/5c:f4:ab:df:07:2b
Sending on   LPF/eth0/5c:f4:ab:df:07:2b
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ ok done.

Basically i can log on debian but only from serial console. Ethernet port is blinking ORANGE.
Re: Debian on NSA310S?
June 29, 2015 05:42PM
I didn't see this on my box.
To which device you are connected?

I'm using a D-Link DIR-825 with OpenWrt Chaos Calmer using odhcpd

or is your ethernet cable bad?

could you please do a

mii-tool eth0 or
ethtool eth0?



Edited 1 time(s). Last edit at 06/29/2015 05:46PM by pengu.
Re: Debian on NSA310S?
June 29, 2015 05:45PM
pengu Wrote:
-------------------------------------------------------
> I didn't see this on my box.
> To which device you are connected?
>
> I'm using a D-Link DIR-825 with OpenWrt Chaos
> Calmer using odhcpd


I'm using Linksys WRT160NL with OpenWrt Chaos Calmer r46120 and odhcpd.

LE: my cable is the cable that came with the NAS.

root@debian:~# mii-tool eth0
  No MII transceiver present!.
root@debian:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP AUI BNC MII FIBRE ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: no
root@debian:~#

LE2: If i boot from ZyXEL Stock and do a restart, ethernet works fine on Debian also.



Edited 2 time(s). Last edit at 06/29/2015 06:03PM by JohnnyUSA.
Re: Debian on NSA310S?
June 29, 2015 06:01PM
does this look similar to your output?

 dmesg | grep mv643xx_eth
[    1.825239] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.833225] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address  ....
[   24.167217] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled

is the MAC adress set correctly in your U-Boot env?

fw_printenv | grep ethaddr

on this device it seems to work, but not on the NSA310

this earlier doesn't matter:


[    0.171048] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
The MAC adress is set correctly

As seen in my earlier posted bootlog, no problems here.


[   24.120171] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled                                            
[   24.130021] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                                                                                     
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1                                                                      
Copyright 2004-2014 Internet Systems Consortium.                                                                                                           
All rights reserved.                                                                                                                                       
For info, please visit https://www.isc.org/software/dhcp/                                                                                                  
                                                                                                                                                           
Listening on LPF/eth0/5c:f4:ab:e3:e6:1e                                                                                                                    
Sending on   LPF/eth0/5c:f4:ab:e3:e6:1e                                                                                                                    
Sending on   Socket/fallback                                                                                                                               
DHCPREQUEST on eth0 to 255.255.255.255 port 67                                                                                                             
DHCPREQUEST on eth0 to 255.255.255.255 port 67                                                                                                             
DHCPACK from 192.168.1.1                                                                                                                                   
bound to 192.168.1.126 -- renewal in 16860 seconds.



Edited 4 time(s). Last edit at 06/29/2015 06:14PM by pengu.
Re: Debian on NSA310S?
June 29, 2015 06:10PM
Gonna check all these in a min and edit this post with infos.

This is taken from ZyXEL OS Telnet:
root@NSA310S:/zyxel/sbin# ./fw_printenv | grep ethaddr
ethaddr=5C:F4:AB:DF:07:11

..more to come soon



Edited 2 time(s). Last edit at 06/29/2015 06:24PM by JohnnyUSA.
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: