11

Every time I restart my Ubuntu Server 11.10 I can't ssh into it because ETH0 doesn't come up automatically. I never had this problem before upgrading to 11.10. I have to login to the server and start the ETH0 manually. I would appreciate it any help. Thanks.

Here is my /etc/network/interfaces file:

#The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface

iface eth0 inet static
    address 192.168.1.102
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0
    gateway 192.168.1.1
2
  • 1
    Hi Joel, there was a change made in 11.10 to make sure that the system doesn't go into runlevel 2 before all interfaces have come up. Can you add to the question the output of ls -lR /run/network ? Thanks!
    – SpamapS
    Nov 9, 2011 at 17:43
  • I have the same problem, upgrade to 11.10 and eth0 does not start
    – user35625
    Nov 27, 2011 at 16:12

6 Answers 6

9

Joel, add a line with auto eth0 before the iface eth0 inet static line, that should bring it up on boot.

4
  • SpamapS, the command didn't run..joel@Snoopy:/etc/network$ sudo ls -lR /run/network ls: cannot access /run/network: No such file or directory.... then i deleted the /network and it ran but the output was too long to paste here.
    – LLR
    Nov 10, 2011 at 1:31
  • 1
    If you run "sudo ifconfig eth0 up" when you log in on console, it brings up the interface? Can you grep for eth0 in /var/log/syslog or dmesg and paste any interesting output that you get?
    – deej
    Nov 10, 2011 at 4:07
  • @deej +1, fixed me up. Jun 18, 2012 at 23:54
  • I'd commented this out after configuring an Ubuntu 14.04 VM; uncommented this, and it worked great. Thanks!
    – sws
    Jul 29, 2014 at 15:25
2

I had, and solved, a similar problem--perhaps my solution will work for you. The problem in my case was that in /etc/network/interfaces I had both eth0 and vin to auto as shown below:

# The primary network interface
auto eth0
iface eth0 inet dhcp

# The INside Virtual Network
auto vin
iface vin inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

After I commented out the first line, changing it to

#auto vin

the eth0 worked.

1

Well, as it says, it could not find /run/network. That's why it doesn't start with /etc/init.d/networking start

I have the same problem, just a few days ago and still trace the failure since the directory gets destroyed every reboot.

If you simply create the /run/network directory you'll be able to start the network with a configured ethX but you'll lose it again next reboot. I haven't figured out what service is so persistent to destroy my work every time. Try it, creating a directory can't hurt too much.

1
  • It's not that anyone or anything is deleting your directory. /run is usually stored in RAM (filesystem type tmpfs) so it isn't persistent over reboots.
    – bseibold
    Jan 18, 2013 at 23:27
1

Found a link with the answer.

It seems the move from /var/run to /run did not work during the upgrade process.

I fixed with this:

cd /var
mv run _run
ln -s /run .
0

Just ran across this webpage http://pingbin.com/2011/02/ubuntu-eth0-missing-after-reboot/ it seems to make a lot of sense, check it out.

1
  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Mahesh
    Aug 11, 2012 at 12:21
0

After restart eth0 does not come up. My problem was auto eth0 in /etc/network/interfaces was commented:

#auto eth0

Removed the # and it's OK.

1
  • Welcome to Ask Ubuntu! Your answer while possible may be a bit late as the OP already accepted the other answer. Your help is of course appreciated, however you might be better served by focusing your efforts on the unanswered questions
    – Wayne_Yux
    Jul 8, 2016 at 9:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .