2

I'm running lastest Raspbmc on Raspberry Pi B+. NetworkManager is removed and purged. I have USB wireless dongle which works perfectly and starts on boot. After reboot only lo and ra0 interfaces are started.

If I run ifup eth0 interface gets up and works perfectly. No errors in syslog.

Here is my /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.11.12.13
    netmask 255.255.255.0

allow-hotplug ra0
iface ra0 inet dhcp
wpa-conf /etc/wpa.conf

What else should I check?

  • Apart from NetworkManager what else is calling ifup. Perhaps try a grep ifup * in /etc/init.d – joan Nov 16 '14 at 22:41
  • Wireless dongle is configured in /etc/network/interfaces so it works but eth0 is ignored and I can't figure why. /etc/init.d/networking script calls ifup but raspbian/raspbmc uses upstart. – untitled Nov 17 '14 at 0:50
  • Is anything attached to the Ethernet port? I don't get an entry until I connect the port to another (running) machine. – joan Nov 17 '14 at 8:55
  • I tried without cable, tried to set to DHCP and connect cable to router. None of these helped. – untitled Nov 17 '14 at 23:18
2

Just make a script to run at startup with crontab.

First create a shell script: sudo nano /etc/netup.sh Then add:

#!/bin/bash ifup eth0

Then make it executable: sudo chmod +x /etc/netup.sh.

After that, run: sudo crontab -e. It should open nano. Now add this: @boot /etc/netup.sh.

This solution is hackish, but it should work. Also, why would you use the USB wifi dongle and the ethernet interface?

  • It's a workaround but I would like to make it work in regular way. I'll use it as hotspot so I need wireless and ethernet. – untitled Nov 16 '14 at 22:11
  • I ended in @Logern solution. – untitled Nov 17 '14 at 23:17
  • It seems that @boot was not allowed (i.e. bad time specifier). Renaming @boot to @reboot fixed this issue. – gillesC Aug 26 '18 at 15:31
2

Had the same problem. If it's not working put the "auto eth0" (without the quotes) line just in front of everything... usually in front of "auto lo" line.

0

This solution only works if you're seeing an odd network interface device like env{hwdaddress} when running $ ifconfig -a instead of eth0

I'm running a Raspberry Pi 3 with Ubuntu 16.04 preinstalled server armhf. Long story short, running $ apt=get update added Predictable Network Interface Names

Edit the following file:
$ vim /lib/udev/rules/73-usb-net-by-mac.rules

You should see:
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \ ATTR{address}=="?[014589cd]:*", \ TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \ IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
Change the NAME at the end as follows:
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \ ATTR{address}=="?[014589cd]:*", \ TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \ IMPORT{builtin}="net_id", NAME="eth0" Save Changes

Reboot. Everything should be working now assuming everything is pointing to eth0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.