Ubuntu Networking – Starting Network Connection from Ubuntu Recovery

linuxnetworkingUbuntu

I tried to upgrade Ubuntu from Hardy to Intrepid last night, and seem to have killed it.

I can boot into "recovery mode" and the root shell, but it freezes when it tries to start the Gnome environment etc.

In this recovery mode it doesn't seem to be on the network (ie. ifconfig shows the lo bit but not the eth0 bit) And I can't ping or ssh to it.

How can I start networking from this prompt?

cheers

phil

Best Answer

Do you normally get your IP address from DHCP server ?

$ ifconfig eth0 up 
$ sudo dhclient eth0

To set IP address you want (for example 192.168.0.1) type:

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
route add default gw GATEWAY-IP eth0

If you have a problem with gdm during the boot, switch to the real console:

Use the Ctrl-Alt-F1 shortcut keys to switch to the first console.

To switch back to Desktop mode (gdm), use the Ctrl-Alt-F7 shortcut keys.