Tuesday, April 29, 2008

Hardy Haron Upgrade Difficulties

I upgraded my ubuntu 7.10 to 8.04 yesterday and I ran into a few snags. First of all the number pad on my keyboard wasn't working. That problem was easy to fix. I just had to uncheck "Allow to control the pointer using the keyboard" on the 'Mouse Keys' tab in System->Preferences->Keyboard.

The second problem was that I didn't have an internet connection. I could ping my gateway and I was getting dns, but I could not ping ip's or names on the internet. Oddly my VirtualBox virtual machines were online and I was able to browse the net on them without any problems.

I have yet to get this problem completely fixed, but I have found a workaround. I use bridged network adapters for my virtual machines, so I have a bridge setup that only includes eth0 and I have two VirtualBox adapters setup.

First I had to remove the virtualbox adapters
VBoxDeleteIF vbox0
VBoxDeleteIF vbox1

Next I had to remove the bridge (br0) by editing the /etc/network/interfaces file to look like this:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

After making that change I had to reboot (/etc/init.d/networking restart wasn't enough for some reason)

When everything had booted back up I changed /etc/network/interfaces back to this:
auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
bridge_ports eth0

I saved the file and ran /etc/init.d/networking restart

Finally I recreated the VirtualBox adapters
VBoxAddIF vbox0 pete br0
VBoxAddIF vbox1 pete br0

Everything worked after doing all of this, but if I restart I have to redo everything! :( I hope to find a fix or at least a better workaround for this problem soon.

Tuesday, January 08, 2008

Changing the default runlevel in Ubuntu Server 7.10

It appears that in the most recent versions of Ubuntu upstart has replaced inittab as the mechanism used to change the default runlevel and to start and stop services at boot up and shutdown.

When I installed Ubuntu Server 7.10 the default runlevel was set to 'S' (single user). The single user runlevel isn't very useful with a server as it doesn't start any services on boot up. I needed sshd and httpd among other services to start on boot up. After a time consuming consultation with google I finally figured out how to change the default runlevel. I don't know that this is the best way to do it, but it worked for me.

Basically all I had to do was edit /etc/event.d/rc-default and change the occurances of 'telinit S' to 'telinit 5'