Re: Debian on NSA310S?
July 01, 2015 05:22PM
pengu Wrote:
-------------------------------------------------------
> oops .. could be my fauld ..
>
> aaaah .. please delete or move away
> /etc/udev/rules.d/70-persistent-net.rules


Did that and rebooted. Same problems as on my rootfs, that makes me wonder... could it be the router only to blame?

i keep seeing:

Listening on LPF/eth0/5c:f4:ab:df:07:2b
Sending on   LPF/eth0/5c:f4:ab:df:07:2b

that's IPv6, how can i disable the IPv6 in Debian?

tried on sysctl.conf but it's working until i halt/reboot.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
Re: Debian on NSA310S?
July 01, 2015 05:24PM
the only machine that gets an IPv6 adress heare this one from where I type
so I think it isn't used
Re: Debian on NSA310S?
July 01, 2015 05:27PM
Well, i see the same message as on my rootfs

[   16.494152] NET: Registered protocol family 10
[   16.674185] 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 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

that means, there's nothing wrong with the rootfs. there must be something either with u-boot envs?! or.. my router..
Re: Debian on NSA310S?
July 01, 2015 05:30PM
you have a special configuration on your router?
my dhcp uses default settings
Re: Debian on NSA310S?
July 01, 2015 05:33PM
pengu Wrote:
-------------------------------------------------------
> you have a special configuration on your router?
> my dhcp uses default settings


It's default on my side also:

1. http://s27.postimg.org/ibrp0yl0j/image.png
2. http://s7.postimg.org/7l3abdvh7/image.png
3. http://s24.postimg.org/vgmadjmc5/image.png
Re: Debian on NSA310S?
July 01, 2015 05:35PM
Johnny,

My guess is your router. I don't think u-boot envs can affect this. My WAG is the fact that you need to unplug the power cord, that's causing the NIC to clear some data. After you did a shutdown -h now, does the Eternet port still blink green or yellow?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 01, 2015 05:36PM
bodhi Wrote:
-------------------------------------------------------
> Johnny,
>
> My guess is your router. I don't think u-boot envs
> can affect this. My WAG is the fact that you need
> to unplug the power cord, that's causing the NIC
> to clear some data. After you did a shutdown -h
> now, does the Eternet port still blink green or
> yellow?

bodhi,

it's yellow.

LE: but again... why on stock Zyxel OS it's working? That's the question that is driving me mad lol



Edited 3 time(s). Last edit at 07/01/2015 05:42PM by JohnnyUSA.
Re: Debian on NSA310S?
July 01, 2015 05:51PM
JohnnyUSA Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > Johnny,
> >
> > My guess is your router. I don't think u-boot
> envs
> > can affect this. My WAG is the fact that you
> need
> > to unplug the power cord, that's causing the
> NIC
> > to clear some data. After you did a shutdown -h
> > now, does the Eternet port still blink green or
> > yellow?
>
> bodhi,
>
> it's yellow.
>
> LE: but again... why on stock Zyxel OS it's
> working? That's the question that is driving me
> mad lol

I know :) But I think the real question is not stock OS related, because it's working for pengu. So the difference is your router settings and perhaps your network environment (including cable).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 01, 2015 05:56PM
Johnny,

Which serial log is your shutdown log? does it show the network interfaces were deconfigured?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 01, 2015 05:59PM
bodhi Wrote:
-------------------------------------------------------
> Johnny,
>
> Which serial log is your shutdown log? does it
> show the network interfaces were deconfigured?


bodhi,

how do i look for that? I'm tired and my brain is almost on fire :)

LE: i think i know what you wanted, here it is:

root@debian:~# shutdown -h now


Broadcast message from root@debian (ttyS0) (Thu Jul  2 02:01:40 2015):




The system is going down for system halt NOW!


INIT: Switching to run
INIT: Sending processes the TERM signal

[info] Using makefile-style concurrent boot in runlevel 0.
[....] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon[ ok .
[....] Stopping busybox' klogd implementation: klogd1344 (klogd)
Stopped klogd (pid 1344).
[ ok .
[....] Stopping MD monitoring service: mdadm --monitor[ ok .
[....] Stopping NFS kernel daemon: mountd nfsd[ ok .
[....] Unexporting directories for NFS kernel daemon...[ ok .
[....] Stopping NetBIOS name server: nmbd[ ok .
Stopping foobar
nzbget.conf(49): Invalid value for option "InterDir" (/media/hdd/.tmp/nzbget/inter/): could not create directory /media/hdd/.tmp: 
nzbget.conf(70): Invalid value for option "TempDir" (/media/hdd/.tmp/nzbget/tmp/): could not create directory /media/hdd/.tmp: 
nzbget.conf(67): Invalid value for option "QueueDir" (/media/hdd/.tmp/nzbget/queue/): could not create directory /media/hdd/.tmp: 
nzbget.conf(61): Invalid value for option "NzbDir" (/media/hdd/.tmp/nzbget/nzb/): could not create directory /media/hdd/.tmp: 
Request sent
server returned: Stopping server
[....] Stopping busybox' syslogd implementation: syslogd1346 (syslogd)
[ ok .
[....] Stopping Samba AD DC daemon: samba[ ok .
[....] Stopping SMB/CIFS daemon: smbd[ ok .
Stopping NzbDrone
No process in pidfile '/var/run/nzbdrone/nzbdrone.pid' found running; none killed.
[....] Asking all remaining processes to terminate...[ ok done.
[....] All processes ended within 1 seconds...[ ok done.
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"

[....] Stopping rpcbind daemon...[ ok .
[....] Stopping NFS common utilities: idmapd statd[ ok .
[....] Deconfiguring network interfaces...Removed stale PID file
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
DHCPRELEASE on eth0 to 192.168.1.1 port 67
invoke-rc.d: -----------------------------------------------------
invoke-rc.d: WARNING: 'invoke-rc.d smbd reload' called
invoke-rc.d: during shutdown sequence.
invoke-rc.d: enabling safe mode: initscript policy layer disabled
invoke-rc.d: -----------------------------------------------------
Reloading /etc/samba/smb.conf: smbd.
[ ok done.
[....] Unmounting temporary filesystems...[ ok done.
[....] Deactivating swap...[ ok done.
[  287.495700] EXT4-fs (sda3): re-mounted. Opts: (null)
[info] Will now halt.
logger: Will halt - now
[  289.654142] reboot: Power down



Edited 1 time(s). Last edit at 07/01/2015 06:03PM by JohnnyUSA.
Re: Debian on NSA310S?
July 01, 2015 06:09PM
Johnny,

> how do i look for that? I'm tired and my brain is
> almost on fire :)

Take a break! You can always pull the power cord as a work around :)

>
> LE: i think i know what you wanted

Yes. Your shutdown events log is slightly different from mine. I need to study it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 01, 2015 06:13PM
bodhi,
sure thing, take your time, i'm heading to sleep so have a good night also, tomorrow i'll work on troubleshoiting the router and what @pengu instructed me on PM.

I'll keep you updated guys, bare with me.
Re: Debian on NSA310S?
July 02, 2015 12:24PM
@Johnny,

Please try the halt script below.

But save it first:
cp -a /etc/init.d/halt /etc/init.d/halt.orig

Replace the entire halt script content with this:
#! /bin/sh -x
### BEGIN INIT INFO
# Provides:          halt
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO

NETDOWN=yes

PATH=/sbin:/usr/sbin:/bin:/usr/bin
[ -f /etc/default/halt ] && . /etc/default/halt

. /lib/lsb/init-functions

do_stop () {
	if [ "$INIT_HALT" = "" ]
	then
		case "$HALT" in
		  [Pp]*)
			INIT_HALT=POWEROFF
			;;
		  [Hh]*)
			INIT_HALT=HALT
			;;
		  *)
			INIT_HALT=POWEROFF
			;;
		esac
	fi

	# See if we need to cut the power.
	if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
	then
		/etc/init.d/ups-monitor poweroff
	fi

	# Don't shut down drives if we're using RAID.
	hddown="-h"
	if grep -qs '^md.*active' /proc/mdstat
	then
		hddown=""
	fi

	# If INIT_HALT=HALT don't poweroff.
	poweroff="-p"
	if [ "$INIT_HALT" = "HALT" ]
	then
		poweroff=""
	fi

	# Make it possible to not shut down network interfaces,
	# needed to use wake-on-lan
	netdown="-i"
	if [ "$NETDOWN" = "no" ]; then
		netdown=""
	fi

	log_action_msg "Will now halt"
        logger -s "Will halt - now"

	halt -d -f $netdown $poweroff $hddown
}

case "$1" in
  start|status)
	# No-op
	;;
  restart|reload|force-reload)
	echo "Error: argument '$1' not supported" >&2
	exit 3
	;;
  stop)
	do_stop
	;;
  *)
	echo "Usage: $0 start|stop" >&2
	exit 3
	;;
esac

:

And then
sync
shutdown -h now

Capture the shutdown log from serial console. If the problem still presents then post the shutdown log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 02, 2015 01:15PM
bodhi,

the problem is still there.

here's the shutdown log:
http://pastebin.com/24qC4vGe

Cheers!
Re: Debian on NSA310S?
July 02, 2015 01:51PM
Johnny,

One more try. Instead of "shutdown -h now" try:
shutdown -H now
if that option did not take, try
shutdown -h -H now
And capture the serial log.

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



Edited 1 time(s). Last edit at 07/02/2015 01:51PM by bodhi.
Re: Debian on NSA310S?
July 02, 2015 02:08PM
bodhi,

first didn't work, second did work, here's the log:
http://pastebin.com/7WkNJVJQ

but it didn't shutdown the NAS, usb led remained lid and if I've tried to press the power button nothing happens. I needed to unplug the power and plug it back in to make the NAS boot again.

still no ethernet at boot.



Edited 2 time(s). Last edit at 07/02/2015 02:11PM by JohnnyUSA.
Re: Debian on NSA310S?
July 02, 2015 04:02PM
Johnny,

I've just wanted to test a theory by doing that. I did not have high hope that the test was going to work.

The thing that puzzles me is pengu system is working fine without doing any thing extra. I was thinking along the line of what bobafet said above. The possible difference between stock OS and my Debian build is: there might be a kludge in stock OS to configure the ethernet (i.e. their u-boot did not have this, so they have to do it in the OS).

If pengu's system were showing the same problem as yours, then I would have suggested to look at possible problem with this (in the kernel DTS file for NSA320S):
gpio_poweroff {
                compatible = "gpio-poweroff";
                pinctrl-0 = <&pmx_pwr_off>;
                pinctrl-names = "default";
                gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;

Now I think these are the remaining possbile differences between yours and pengu's system:

- router settings and network cabling
- apt-get update/upgrade (this could effect the startup and shutdown behavior, and that's what I was thinking above)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 02, 2015 04:47PM
bodhi,

Yeah, i was thinking the same about ZyXEL OS also, somehow they manage to revive the ethernet port on boot. Sadly i have no idea how they do it.

Now about your last alternatives, i've tried with 3 different cables in different ports, no luck. You have a point on the router tho and even if we have the same Firmware on it (OpenWRT) the router models differ so, basically i can't test this alternative since i dont have his router.

All in all, thanks for your impressive assistance, both you and @pengu, i gave up hope, at least for now, im out of ideas also.

Cheers!



Edited 1 time(s). Last edit at 07/02/2015 04:54PM by JohnnyUSA.
Re: Debian on NSA310S?
July 08, 2015 01:41PM
I'll get a NSA320s in the next fiew days so I can confirm this (or not I hope so)
Re: Debian on NSA310S?
July 08, 2015 03:35PM
pengu Wrote:
-------------------------------------------------------
> I'll get a NSA320s in the next fiew days so I can
> confirm this (or not I hope so)


I'm still waiting for a miracle :)
Re: Debian on NSA310S?
July 09, 2015 06:48AM
I was thinking and thinking and i must ask you guys if it's possible to implement on stock FW some command to actually reboot the machine into debian_FW once the network is initialised on stock_FW?

Like in:

Power Down ---> Boot ZyxelOS ---> LinkUP --> Reboot onto DebianOS.

Dunno if it's possible through a script or something. Also, i admit, not so elegant approach but.. if doable, could be a nice workaround until we get to the root of the problem.
Re: Debian on NSA310S?
July 09, 2015 04:26PM
JohnnyUSA Wrote:
-------------------------------------------------------
> I was thinking and thinking and i must ask you
> guys if it's possible to implement on stock FW
> some command to actually reboot the machine into
> debian_FW once the network is initialised on
> stock_FW?
>
> Like in:
>
> Power Down ---> Boot ZyxelOS ---> LinkUP -->
> Reboot onto DebianOS.
>
> Dunno if it's possible through a script or
> something. Also, i admit, not so elegant approach
> but.. if doable, could be a nice workaround until
> we get to the root of the problem.

Johnny,

I don't recall we did this test: reboot, interrupt u-boot on serial console, try pinging your router. Did we cover this?

Also, while you're at the serial console prompt, please get the available commands and post here:
> help

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



Edited 1 time(s). Last edit at 07/09/2015 04:28PM by bodhi.
Re: Debian on NSA310S?
July 10, 2015 08:46AM
bodhi,

here's the ping tried from uboot:

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
Marvell>>
Marvell>> ping 192.168.1.1
egiga0 no link
Using egiga0 device
ping failed; host 192.168.1.1 is not alive

and 'help' typed in uboot:
Marvell>> help
?       - alias for 'help'
SatR - sample at reset sub-system, relevent for DB only
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootext2    dev:boot_part1,boot_part2 addr boot_image linux_dev_name
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bubt    - Burn an image on the Boot Nand Flash.
chpart  - change active partition
cmp     - memory compare
cmpm    - Compare Memory
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
date    - get/set/reset date & time
dclk    - Display the MV device CLKs.
dhcp    - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
eeprom  - EEPROM sub-system
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fi      - Find value in the memory.
flinfo  - print FLASH memory information
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
g       - start application at cached address 'addr'(default addr 0x40000)
go      - start application at address 'addr'
help    - print online help
icrc32  - checksum calculation
ide     - IDE sub-system
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imm[.b, .s, .w, .l]     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
ir      - reading and changing MV internal register values.
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - Diasplay address decode windows
md      - memory display
me      - PCI master enable
mm      - memory modify (auto-incrementing)
mmcinit - init mmc card
mp      - map PCI BAR
mtdparts- define flash/nand partitions
mtest   - simple RAM test
mw      - memory write (fill)
nand                   - NAND sub-system
nboot   - boot from NAND device
nbubt   - Burn a boot loader image on the Boot Nand Flash.
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
phyRead - Read PCI-E Phy register
pciePhyWrite    - Write PCI-E Phy register
phyRead - Read Phy register
phyWrite        - Write Phy register
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
printinfo- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
rcvr    - Satrt recovery process (Distress Beacon with TFTP server)
reset   - Perform RESET of the CPU
resetenv        - Return all environment variable to default.
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
saveinfo - save environment variables to persistent storage
se      - PCI Slave enable
setenv  - set environment variables
setinfo  - set environment variables
sflash  - read, write or erase the external SPI Flash.
sg      - scanning the PHYs status
sp      - Scan PCI bus.
switchRegRead   - Read switch register
switchRegWrite  - Write switch register
Temp    - read chip Tj temp
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version



Edited 1 time(s). Last edit at 07/10/2015 09:08AM by JohnnyUSA.
Re: Debian on NSA310S?
July 10, 2015 01:05PM
pinging within U-Boot is no problem on NSA310s,
let's see what's on NSA320s
in a view days I'll see
Re: Debian on NSA310S?
July 10, 2015 02:41PM
Jonny,

Pls list your current u-boot envs in serial console.

Are you connecting the Nsa310S ethernet cable directly to one of the router ports?

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



Edited 1 time(s). Last edit at 07/10/2015 02:42PM by bodhi.
Re: Debian on NSA310S?
July 10, 2015 04:11PM
bohdi,

u-boot envs from serial:
http://pastebin.com/26Gfw0Rp

Yes, the cable is connected directly to my router port.
Re: Debian on NSA310S?
July 10, 2015 04:32PM
Johny,

setenv gatewayip 192.168.1.1
ping 8.8.8.8
ping 192.168.1.1
See what the result is.

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



Edited 1 time(s). Last edit at 07/10/2015 04:34PM by bodhi.
Re: Debian on NSA310S?
July 10, 2015 04:38PM
bodhi,

here's the result:
Marvell>> setenv gatewayip 192.168.1.1
Marvell>> ping 8.8.8.8
egiga0 no link
Using egiga0 device
ping failed; host 8.8.8.8 is not alive

Marvell>> ping 192.168.1.1
egiga0 no link
Using egiga0 device
ping failed; host 192.168.1.1 is not alive



Edited 1 time(s). Last edit at 07/10/2015 04:46PM by JohnnyUSA.
Re: Debian on NSA310S?
July 10, 2015 05:06PM
Johnny & pengu,

OK. I think there is a mistmatch in the Ethernet chip.

According to pengu's picture for the NSA310S, this is the chip:
Marvell® Alaska® 88E1318

But our DTS for the NSA320S is
Marvell® Alaska® 88E1510

@pengu, could you double check your picture was the correct one? thanks.


@Johnny, whether the differences did cause this reboot problem, I think we need to find out with a new DTB for NSA310S. We'll need this any way, so I will compile a new one and let you test it :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA310S?
July 10, 2015 05:07PM
bodhi,

can't wait to test it ;)



Edited 1 time(s). Last edit at 07/10/2015 05:08PM 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: