“Waiting for network configuration” fix in Ubuntu
September 12, 2013
If you have a laptop with Ubuntu system on it, which you take with you every now and then, you most likely encountered a pesky bug in the network setup. When booting from cold start the laptop starts to look for a connected ethernet cable, but when you are on the go, there is no such thing, thus it waits 3 minutes at the boot time before deciding to go without network. Many forums have some strange solutions to this problem, I found out what really is wrong, and how to EXACTLY fix it.
If you’re not interested in explanation and are here just for a quick fix ( badum, tshhh ), here’s what you need to do:
Your /etc/network/interfaces looks more or less like so:
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp hwaddress ether 00:my:ad:dr:es:s0
You need to remove the offending line with dhcp in it and the hwaddress line too, so it will look like so:
auto lo iface lo inet loopback auto eth0
After next reboot without ethernet cable plugged in all will be good. Here’s why.
Ubuntu has two network interfaces setup mechanisms. First one is legacy /etc/network/interfaces, it is used by mostly servers that need the all-or-nothing approach to whether an interface is active at the boot time or not, to tell other programs which start at the boot time (like apache server) that there are some interfaces active for their use.
This method assumes dhcp auto-setup and that the cable is constantly plugged into the network adapter. When such thing is not available the dhcp auto-setup keeps on asking for configuration which is not there, thus the wait at the boot time when cable is not plugged in.
After these basics are figured out the next method starts and takes over.
The other method that is used in desktop, the icon with the connections that is in the upper right corner is based in /etc/udev/rules.d/70-persistent-net.rules file that is the part of the udev system. It basically says that if you will see a cable plugged into the computer then do the scan and setup a network interface. It’s more complex than that, but in a nutshell it’s what it does. It does not need the wait for setup information from cable to be “solid”. It just operates on “if there is something there let’s see what we can do with it” approach.
So basically the fix tells the basic method that “there is interface, but leave it alone”, so it does not hang on the wait and lets the udev system to do it’s magic.
It was a very annoying design bug, hope it shines some light on your setup too to make it all normal with your laptop.