This doesn't occur very frequently. It did used to happen about 30% of the time, and then I opened the computer and found that the wifi PCI card wasn't screwed in properly. I did the screw up, and now it works correctly almost always (about 95% of the time). It annoys me when the computer starts without network capability, because I can't use it and it means I have to sit through another 103 seconds of reboot, like I did this afternoon.
I got a couple of photos today - the first one "Waiting for network configuration..." that lets me know that I'll have to wait for the process to end and then reboot the computer when it's finished, and the second one "Waiting up to 60 more seconds for network configuration...".
These messages appear while waiting for all interfaces marked as 'auto' in /etc/network/interfaces to come up. On most Ubuntu systems, that's only loopback (127.0.0.1); everything else is done later, via NetworkManager.
This usually happens if you've added something marked as both 'auto' and 'dhcp' in that file, and the DHCP server doesn't immediately respond. You'll see this screen until it does.
It might also happen if the device is "missing," for instance if the PCI card isn't seated properly and isn't recognized, or is defective.
So first, look in /etc/network/interfaces and determine what, aside from lo, is marked as auto (alternatively, use this command to print all the auto interfaces:
ifquery --list --allow auto
)Probably, it'll just be your "wifi PCI card," but maybe it's another leftover device you're not using anymore? A wired Ethernet card with no cable plugged in? Remove the 'auto' from anything you don't want to come up at boot (and have to wait for).
If it is just your wireless card, did you mean to configure it this way instead of using NetworkManager? If not, I'd suggest the latter, especially for a wifi interface. Remove the 'auto' and reboot (or just run
ifdown [interface]
or evenifdown -a
), log into the graphical desktop, and use the applet in your panel to set up the connection.If you don't want to use NM for whatever reason, you probably still don't want to wait for the wireless at boot. In this case you'd remove the 'auto' again, and use the
ifup [interface]
command to bring it up later. To still do it automatically at boot (but not wait for it), ideally you would create your own upstart script in /etc/init that runs right after static-network-up. If you don't want to figure out how to do that, you could always just slap that command in /etc/rc.local, however.[interface]
, by the way, is probably going to bewlan0
, but you should verify this by looking at the output ofifconfig -a
, when it's working.On to the actual failure, the next time it happens you're going to have to look at /var/log/syslog to find out exactly why. Since you say it works after you reboot, it's probably not going to be a DHCP server issue. More likely, it's an issue with the device. You might see lines like this:
Check to see whether the device even appears in the output of
ifconfig -a
. If it does, you can manually retryifup [interface]
(or justifup -a
if you never removed the autos) to see if it works without rebooting. If not, start looking at the kernel boot messages (dmesg | less
) for anything relevant. Normally there's something printed when the device is first detected, for example:Look at your own when it's working to see what it should look like. Then, compare to when it's broken. Are there any errors? Or, is the wireless stuff missing altogether? That, to me, just screams poorly seated or defective card. Make very sure it is fully and firmly in the PCI slot.
If you found other kinds of errors, in syslog or in dmesg, you should probably file a bug. Save everything relevant you found in these logs and output of commands. When you are able to connect, run the command
ubuntu-bug networking
to create the bug, then attach whatever you saved.The fact that tightening a screw has an impact on the frequency of the problem indicates (at least to me) that this is a hardware connectivity issue. I would remove the card, carefully clean the contacts on the card and replace it. If this doesn't resolve the problem It doesn't automatically indicate that the card is bad. Try the card in a different slot (or different system) as the slot could be defective, not the card.
This problem has never occurred again since I upgraded from Ubuntu 14.04 to Ubuntu 16.04 ten days ago.
This is the first time that such an upgrade has worked successfully for me. Previous upgrade attempts, from 10.04 to 12.04, and 13.04 to 14.04, didn't work, and had to be followed up with installing from a freshly downloaded image, and then several hours of configuration of the system.