Turnkey Linux: udev hangs on upgrade – fix
I use Turnkey Linux for some machines when I need a quick server appliance and I don’t have time to build one from scratch. Turnkey provides the OVF templates for their virtual machines. This allows you to deploy a virtual machine quickly to ESX/ESXi using VMWare vSphere.
I’ve ran in to a few problems installing Turnkey LAMP (and other) servers, mainly the fact that udev hangs on update. Here’s how to get around that.
If you download the LAMP VM (or most of the ubuntu based ones) from Turnkey Linux (as of 09-SEPT-2011) and power up the VM, it will as you for an initial password and ask you if you would like to update the machine. If you choose to update the machine on its initial power up, it will install some essential updates and start up a management interface. It won’t install all of the updates that are available. To do that, you need to open a virtual terminal or exit the management interface and drop to the command line. If you’re running the VM in VMWare workstation, you’ll need to hit CTRL+ALT+Space, then release Space while still holding CTRL+ ALT and hit the F key that corresponds to the virtual terminal you want to start.
Updating
Once you drop to the command line, you’ll want to download the latest updates.
# apt-get update
You should have a good bit of updates since Ubuntu’s 10.04 release. Ubuntu 10.04 is currently the version used as a base for all Turnkey Linux machines.
Aptitude is not installed by default and if you want to use it, you’ll have to specifically install it. The examples in this article will use apt-get.
During the update process, apt-get will hang on processing and will just hang for a long period of time. When it does this, you’ll need to start another virtual terminal.
Udev Hangs
Udev will hang and you can log in with another ssh session or create another virtual terminal to kill the process.
Use the following commands to find the offending process and kill it. Once you kill the process, updates will continue.
# ps -aux | grep "restart udev"
# kill -15 < process-number >
If you have any issues with updates or you see an error. You can repair the package management system with the following command.
dpkg --configure -a