I think this started happening a couple of months ago when I upgraded from 10.04 to 12.04.
Whenever I reboot, network-manager does not start. I have to manually run
sudo start network-manager, and then everything works fine.
Things I have already tried (rebooting after each attempted fix):
- Verified that all of the /etc/rc*.d/*network-manager links exist the way they should.
- Since network-manager's upstart config file mentions
local-filesystems, and my fstab had a reference to a USB HDD that is not connected, I commented that line out of the fstab.
sudo dpkg-reconfigure network-managerand then
sudo apt-get install --reinstall network-manager
- Looked in syslog for hints, didn't see anything that jumped out.
I don't think I've modified
/etc/init/network-manager.conf, but here it is for reference:
# network-manager - network connection manager # # The Network Manager daemon manages the system's network connections, # automatically switching between the best available. description "network connection manager" start on (local-filesystems and started dbus and static-network-up) stop on stopping dbus expect fork respawn script # set $LANG so that messages appearing on the GUI will be translated. See LP: 875017 if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE LC_MESSAGES LC_ALL fi exec NetworkManager end script
The 'start on' section lets you know which events need to be emitted before upstart will start network-manager.
In this case it's:
Odds are the first two have already been emitted if you have booted to a desktop.
static-network-up is emitted by the
/etc/network/if-up.d/upstart script, crucially, the event will not be emitted unless every interface configured as 'auto' in
In my case I had a left over entry for eth0 in
/etc/network/interfaceswhich was configured to use DHCP, but since there was no ethernet plugged into eth0 DHCP could never succeed.
You can tell upstart to emit events and can use this to check if it is the static-network-up event that's missing.
man initctl(you need to run the emit command with sudo so it's no harm to run
man initctlto verify commands posted on the internet first)
sudo initctl emit static-network-up(you might need to Ctrl+C this after a while)
initctl status network-manager(to check if it started)
If this solves your problem check
/etc/network/interfaces, comment out everything other than:
Then reboot and hopefully network-manager will start as expected.