eth0 doesn't work

Das Original Benutzerinterface Neutrino-SD incl. zapit, sectionsd, yWeb etc...
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

eth0 doesn't work

Beitrag von Gastone »

hello to all, and sorry for the language
i have just compiled a cvs image with Neutrino (first time, and started at 23:15 german time 2009-04-28, and used on usb device a with dm7000/feb 2009 boxman image on flash), and apparently i cannot get the eth0 interface up
i have tried to enable the network at boot and/or start/restart it from the panel, but no success, the router confirm to me that i have no link

what's wrong?
thanks in advance for any reply
regards
dietmarw
Contributor
Beiträge: 1833
Registriert: Mittwoch 10. April 2002, 15:39

Re: eth0 doesn't work

Beitrag von dietmarw »

Gastone hat geschrieben:...boxman image on flash...
why dont ask boxman?

this forum is for tuxbox cvs and images.. boxman isnt..
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

Re: eth0 doesn't work

Beitrag von Gastone »

thanks for the reply
so there is that problem because i'm running it on usb (and enigma on flash) or for something not correct in the image on flash (and using a recent cvs (enigma) one i can get it working)?
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: eth0 doesn't work

Beitrag von seife »

how did you check out CVS (exact command lines, please)?
how did you configure/build the image (exact command....)?
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

Re: eth0 doesn't work

Beitrag von Gastone »

Ave seife (thx for all the latest cvs additions, i hope to see the ntpd in the webif soon)

i used this one

Code: Alles auswählen

export CVS_RSH=ssh
cvs -d anoncvs@cvs.tuxbox.org:/cvs/tuxbox -z3 co -P -rdreambox .
cd cdk
chmod ugo+x prepare_neutrino
./prepare_neutrino
make checkout_neutrino
make dreamboximage_neutrinoroot
make rebuild-flash
make flash-compress
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: eth0 doesn't work

Beitrag von seife »

The old dreambox branch way doing things....
no Idea what's going wrong.

Do you have /etc/network/interfaces as a symlink to /var/etc/network/interfaces? Does /var/etc/network directory exist?

And no, I will not implement any menu or webfrontend stuff for ntpd.
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

Re: eth0 doesn't work

Beitrag von Gastone »

seife hat geschrieben:The old dreambox branch way doing things....
no Idea what's going wrong.
Do you have /etc/network/interfaces as a symlink to /var/etc/network/interfaces? Does /var/etc/network directory exist?
And no, I will not implement any menu or webfrontend stuff for ntpd.
i cannot login there (without a working lan), the serial connection does not wokrs as well

yep , i'm happy to see the ntp added (and thx), does not matter if with a web interface or not, but i hope to see that one too ;)
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: eth0 doesn't work

Beitrag von seife »

you can also check with tuxbox-commander
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

Re: eth0 doesn't work

Beitrag von Gastone »

/var/etc/network/interfaces exist (auto lo, iface lo inet loopback, auto eth0 , iface eth0 inet dhcp, hostname dreambox)
there is a /etc/network link too
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: eth0 doesn't work

Beitrag von seife »

no idea what's going wrong. Check the serial boot log if there is some error from ifup or remove /var/run/ifstate (/var/run should be a symlink to /tmp) and then run "ifup -a" from tuxbox commander. This is something you need to debug yourself as I don't have a dm7000 where I could run it from USB.
Gastone
Interessierter
Interessierter
Beiträge: 40
Registriert: Donnerstag 30. April 2009, 18:49

Re: eth0 doesn't work

Beitrag von Gastone »

thanks again for the reply
unlucky the serial does not works too, i looked in the settings menu, and the only option that can be related to it is the one in driver&boot: show boot info; is that one right?
but with that enable i cannot see any log from ttys0 (assuming that the the connection is 115200 as enigma, and using always a null modem cable)

np, was just for curiosity, i'll wait some time, then i'll retry it


edit:
executing ifup -a (without touch anything)
i have:
udhcpc (v1.2) started
sending discover
sending discover
sending discover
no lease, failing

wow: no lease..................
so i tried with a static ip and worked: is only a (neutrino) dhcp issue! (my dhcp server works very good usually)
ps: is inusual that using the dhcp mode in network settings i have the router port led off

thx to you and to all the cvs developpers
regards

ri-edit:
i forced a udhcpc command:

Code: Alles auswählen

\w > udhcpc 
udhcpc (v1.2.1) started
/share/udhcpc/default.script: /share/udhcpc/default.script: 37: /sbin/ifconfig: not found
Sending discover...
Sending select for 192.168.1.202...
Lease of 192.168.1.202 obtained, lease time -1
/share/udhcpc/default.script: /share/udhcpc/default.script: 37: /sbin/ifconfig: not found
/share/udhcpc/default.script: /share/udhcpc/default.script: 37: /sbin/route: not found
/share/udhcpc/default.script: /share/udhcpc/default.script: 37: /sbin/route: not found
\w > 
maybe can help
192.168.1.202 is the right ip that must be assigned (by mac address rule on the router, it is not a "random ip" assigned by the dhcp server)

Code: Alles auswählen

\w > cat /var/etc/network/interfaces 
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
	address 192.168.1.101
	broadcast 192.168.1.255
	gateway 192.168.1.1
	netmask 255.255.255.0

\w > ls -la /sbin
drwxr-xr-x    2 root     root         4096 Apr 28 22:29 .
drwxr-xr-x   13 root     root         4096 Apr 29 20:01 ..
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 chroot -> ../bin/busybox
-rwxr-xr-x    1 root     root         9848 Apr 28 22:29 fcp
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 halt -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 ifdown -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 ifup -> ../bin/busybox
-rwxr-xr-x    1 root     root        66508 Apr 28 22:29 in.ftpd
lrwxr-xr-x    1 root     root            7 Apr 29 20:01 in.telnetd -> telnetd
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 inetd -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 init -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 insmod -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 klogd -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 lsmod -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 mkswap -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 modprobe -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 poweroff -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 rdate -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 reboot -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 rmmod -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 swapoff -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 swapon -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 syslogd -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 telnetd -> ../bin/busybox
lrwxr-xr-x    1 root     root           14 Apr 29 20:01 udhcpc -> ../bin/busybox
\w > 


\w > cat /share/udhcpc/default.script
#!/bin/sh

[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/etc/resolv.conf"

case "$1" in
	deconfig)
		/sbin/ifconfig eth0 up
		;;

	renew|bound)
		/sbin/ifconfig eth0 $ip netmask $subnet

		if [ -n "$router" ] ; then
			while /sbin/route del default ; do
				:
			done
			
			for i in $router ; do
				/sbin/route add default gw $i
			done
		fi

		if [ -n "$hostname" ]; then
			hostname $hostname
		fi

		echo "# Generated by udhcpc" > $RESOLV_CONF
		if [ -n "$domain" ] ; then
			echo search $domain >> $RESOLV_CONF
		fi
		for i in $dns ; do
			echo nameserver $i >> $RESOLV_CONF
		done
		;;
esac

exit 0