17
3
Problem
Ubuntu 9.10 Desktop Edition (and possibly previous versions as well, I haven't tested them) has no network connections after boot until at least 1 user logs in. This means any services that require networking (e.g. openssh-server) are not available until someone logs in locally either via gdm, kdm, or a TTY.
Background
Ubuntu 9.10 Desktop Edition uses the NetworkManager service to take commands from the nm-applet in Gnome (or its equivalent in KDE). As I understand it, while NetworkManager is running at boot, it is not issued any commands to connect until you login for the first time because nm-applet isn't running until you login and your Gnome session starts (or similar for KDE). I'm not sure what prompts NetworkManager to connect to the network when you login via a TTY.
There are several relevant variables involved in starting up the network connections including:
- Wired vs Wireless (and the resulting drivers, SSID, passwords, and priorities)
- Static vs DHCP
- Multiple interfaces
Constraints
- Support Ubuntu 9.10 Karmic Koala (bonus points for additional supported versions)
- Support wired eth0 interface
- Receive an IP address via DHCP
- Receive DNS information via DHCP (obviously the DHCP server must provide this information)
- Enable networking at the proper time (e.g. some time after file systems are loaded but before network services like ssh start)
- Switching distros or versions (e.g. to Server Edition) is not an acceptable solution
- Switching to a Static IP configuration is not an acceptable solution
Question
- How to start networking on a wired interface before logon in Ubuntu Desktop Edition?
Ahh, that was just a typo when I made the question, but that is what I have tried. That said, doing /etc/init.d/networking restart gives:
"* Reconfiguring network interfaces..." but the interface is not brought up, much less get an IP. Doing a reboot does not bring up the interface either with these settings. – Burly – 2010-04-02T15:00:13.860
I suppose the:
auth eth0
instead of:
auto eth0
in your post is still a typo you've done only in the post, right? – goedson – 2010-04-06T11:13:51.837
I've just did a fresh install of Ubuntu 9.10, edited /etc/network/interfaces as noted above, and issuing
sudo /etc/init.d/networking restart
did get eth0 up and configured via DHCP. – goedson – 2010-04-06T11:45:56.347Oh my, Mega-fail! :facepalm: I didn't have the original typo you mentioned, but I DO have the 'auth' instead of 'auto' on the first line. I believe you have to modify your answer in order for me to change my vote because it's been too long (wth?). I've removed the "What I've Tried" section from the question to avoid confusion since I typo'd hard.
Perhaps add something like: "Add the following into
/etc/network/interfaces
to prevent NetworkManager from managing the interface and bring it up via dhcp"I have to check and see if this fix will bring it up at boot with NM installed... – Burly – 2010-04-06T18:40:39.323
I've changed the answer so it's clear what is the solution. – goedson – 2010-04-07T11:02:24.017