Posts Tagged ubuntu

Ubuntu networking bug updating to Jaunty

Posted by on Thursday, 10 September, 2009

We had a customer email in after updating to Jaunty recently. They said the following

Hi guys, I upgraded my VPS a little while back to Ubuntu Jaunty (because I was several versions out of date and the apt repositories had gone away.) I never actually rebooted the machine afterwards though because it wasn’t a good time to potentially interrupt email. I finally got around to doing that, and the VPS won’t come back onto the network. Logging in over the console, it looks like there are no network interfaces configured. A few other things don’t feel right (eg, dmesg tells me that the current tls library or perhaps libc isn’t xen-friendly.) but mostly everything *looks* like it’s ok but doesn’t have a network interface.. services that want to resolve hostnames didn’t start up, etc. Trying to dig into the problem, it looks like there are no modules installed for the kernel, but this is where my expertise runs out.. I don’t know enough about Xen to know if everything was just precompiled into the kernel, or if I blew away my kernel modules during upgrade.

I was curious so logged in via the console .

I ran ifup and got the following errors

root@charon ~ # ifup eth0
ifup: failed to open statefile /var/run/network/ifstate: No such file or directory

so i checked and /var/run/network did not exist. I fixed this

root@charon network # mkdir /var/run/network/
root@charon network # ifup eth0
* if-up.d/mountnfs[eth0]: waiting for interface lo before doing NFS mounts
root@charon network # ifconfig
eth0 Link encap:Ethernet HWaddr aa:00:d6:a1:5e:e4
inet addr:72.33.222.111 Bcast:72.29.222.255 Mask:255.255.255.128
inet6 addr: fe80::a800:d6ff:fea1:5ee4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5447 (5.4 KB) TX bytes:1074 (1.0 KB)

The file system on Ubuntu in /var/run is a virtual filesystem on Ubuntu, I googled and came across this post here https://bugs.launchpad.net/ubuntu/+bug/367171 which clearly logs the bug, and a fix.

The fix i applied which was adding the following into /etc/init.d/networking

[ -d /var/run/network ] || mkdir -p /var/run/network

This checks if the dir exists and creates it if it doesn’t.

This does fix the problem but its a bit of a hack. I noticed a link later on down the post which took me to https://bugs.launchpad.net/ubuntu/+bug/377432 . This link had a bit more technical information. They said look for the following files and remove them.

/etc/udev/rules.d/85-ifupdown.rules

/lib/udev/rules.d/85-ifupdown.rules


Getting m4a to work with rhythmbox (itunes to mp3 conversion)

Posted by on Monday, 6 July, 2009

Note: This tutorial is related to Ubuntu, however the clueful can use it easily enough

My kids old apple bit the dust the other day, so i thought ‘stuff buying another overpriced machine, their linux box can suffice’
They use gnome, and are familiar with rhythmbox – which i might add, works brilliantly with iPods.

So after a few days the kids started moaning that half the music had disappered. I double checked, and it turns out half it bought of iTunes was in m4a format which wasnt readable.
Solutions!
If you are not tied to rhythmbox then jump in and install xmms and xmms-faad packages.

If you are then this is the solution.
Install the Medibuntu sources
sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update

Then install the following packages
sudo apt-get install libavcodec-unstripped-52 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg

Now convert!
ffmpeg -i file.m4a -acodec libmp3lame file.mp3

Now you need to add the id3 tags,
id3tool -t "title of song" -a "album name" -r "Artist" file.mp3

Bingo!


Upgrading older releases of Ubuntu when support ends

Posted by on Tuesday, 30 June, 2009

Many times I’ve seen a VPS running such old versions of Ubuntu that they can no longer use apt at all because its no longer a supported release. For the most part at this stage, i fully recommend doing a reinstall of the machine which is the much easier faster solution. If for whatever reason this is not accepetable (its a server at a datacenter miles away kinda thing and not a VPS) this is what you do.

$ sudo vim /etc/apt/sources.list

and replace the repositories with:

deb http://old-releases.ubuntu.com/ubuntu/ $version main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ $version main restricted
deb http://old-releases.ubuntu.com/ubuntu/ $version-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ $version-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ $version universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ $version universe multiverse
deb http://old-releases.ubuntu.com/ubuntu $version-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu $version-security main restricted

Swapping out the $version for the actual version (ie edgy, intrepid etc) you currently have installed

Update your sources and install the upgrade tool with the following command.

$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get install update-manager-core

Now run the upgrade:

$ sudo do-release-upgrade

The tool will run for a minute, then it may¬† give you an error about your repositories saying they are invalid and would you like to update your repositories. Don’t answer yet. Open a new console and modify /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ $newversion main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ $newversion main restricted
deb http://us.archive.ubuntu.com/ubuntu/ $newversion-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ $newversion-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ $newversion universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ $newversion universe multiverse
deb http://security.ubuntu.com/ubuntu $newversion-security main restricted
deb-src http://security.ubuntu.com/ubuntu $newversion-security main restricted

Then go back to the original prompt and choose y. The tool will then succeed. After your initial upgrade, simply running do-release-upgrade will suffice.

If you are going from one old-release to another expired release then you do not need to edit the sources.list in between.