I have previously posted about my own Karmic upgrade problems. In my case, the system crashed in the middle of the upgrade (due to my own fault, nothing to do with the upgrade itself as far as I know), causing my half-upgraded system to be unable to mount the root filesystem and dropping me into a maintenance shell.

I’ve always tried to promote Linux use among friends and family which means I also provide support as required. Yesterday, a friend of mine brought me her laptop with a similar problem to the one I had: in her case, she thinks that she lost her internet connection in the middle of the Jaunty to Karmic upgrade. In any case, her half-upgraded system would neither boot nor allow a root prompt. The error message on the console was:

mountall: symbol lookup error: mountall: undefined symbol: udev_monitor_filter_add_match_subsystem_devtype
init: mountall main process (310) terminated with status 127

I tried a couple of things: first, I used an old Jaunty disk to boot the machine, mounted the old root filesystem and attempted to use chroot so that I could complete the upgrade.

mkdir /media/disk
mount /dev/sda5 /media/disk
chroot /media/disk

Unfortunately, this didn’t work because I had no network devices available in the chroot jail, and I couldn’t find any obvious way to sort that out. Similarly, I downloaded a new iso of Ubuntu Karmic hoping to use it as the apt source for the upgrade, but I couldn’t access the cd drive either, even using apt-cdrom to set it up. As before, a bit more effort might have sorted this out, but I decided to solve the problem by doing a complete re-install of Karmic over top of the previous one.

I backed up the /etc and /home directories to an external hard drive first to be safe. To my delight, the reinstall worked fine and didn’t clobber any of the existing user data on the drive. During the partioning step, I selected the manual option. I changed /dev/sda5 (which in this case was the old Ubuntu root filesystem) to mount as “/” but didn’t check the box for it to be formatted. In the “import settings” step, I also told the installer to import user settings from the old Ubuntu install. When I rebooted, everything was up to date, and the user settings and documents were all in place as expected. Good to know!

As a final note, I should add that when I set up this system for my friend, I configured Dropbox and told her how to use it. That meant that I could’ve easily restored everything even if I’d had to do a complete format and reinstall. On my own machine, I’ve placed a symbolic link to /etc in my Dropbox folder (it doesn’t take up much space) along with linked versions of all of my important dot files — that means that, with a little effort, I can reimage and restore at any time. I will set up all my friends the same way from now on.