I’m very, very impressed, so far, with the new version of Ubuntu, the Linux distribution created by South Africa’s spacefarer and dot-com rich kid, Mark Shuttleworth. The Hardy Heron, the latest long-term support version of the relatively new OS, is better than ever. The install was the fastest and smoothest I have ever experienced with any operating system, contrary to some earlier versions of Ubuntu, which kept throwing up niggly hitches, some of which would be dealbreakers for newbies.
The usual trouble with an OS upgrade is to decide whether to do a clean install, or choose an upgrade so you can keep what you’ve got. Last time, from the Feisty Fawn to the Gutsy Gibbon, I chose the upgrade, so I thought I’d clear out the cobwebs this time. The serious downside of a clean installation is not so much restoring mail and other settings, which is relatively trivial, but the time-consuming mission of finding, selecting and installing all the applications you had installed before. Granted, since everything is easily accessible in online repositories, it’s not as much of a mission than it would be under another operating system, but still, there are a lot of applications, plugins, utilities, tools, and fonts that accumulate over time. I have occasional use for programs such as QCad, Blender and Wings 3D, for example, and no Ubuntu installation is complete without Nethack and Battle for Wesnoth.
To solve this problem, a trick that worked like a charm is this tip from ArsGeek.
First, get a list of all the packages installed on your system. Type
dpkg --get-selections | grep -v deinstall > ubuntu-files to do so. (Now now, don’t fret. The command line isn’t that intimidating, and this could save you hours.)
Save the resulting file somewhere other than where you’re installing your new system. If you want, you can review it in a text editor and delete things you no longer want. It’s probably also a good idea to remove entries you suspect might break a fresh installation, such as kernel files (search for “linux-“), graphics drivers, or other things you know a new installation will provide anyway. While you’re doing this, you’ll note that the list of packages do not have version numbers, so you can be sure you’ll get the latest versions from the new version’s repositories when you reinstall them.
Install the new OS from CD. Unless you’re resizing partitions, this shouldn’t take long. Watch where it wants to install, though. My install script saw a wide expanse of unspoilt hard disk and promptly headed in that direction. I had to point out that I’d prefer my OS to sit on the primary drive, not my shiny new portable one. Boot. Set up your internet connection, if necessary (some types can’t be picked up automatically).
Then put the ubuntu-files you saved earlier back in your home directory, and type the following in a terminal:
sudo apt-get update
sudo apt-get dist-upgrade
sudo dpkg --set-selections < ubuntu-files
This just primes apt-get, and pumps your complete list of packages back into the package manager, ready for installation. Easiest way to install the selected files is using
sudo dselect, which will offer you a menu of options. Just hit "I" to install the lot, go have a coffee (my list of packages to be download was big, and took two hours), and return to a sparkly new system. Unless you installed Sun Java or Microsoft fonts, in which case you get a few dialog boxes that stop everything and scream "PAPERS!"
Another useful thing to know is how to safely backup your home directory, without having to fiddle around with multiple drag-and-drop operations and the ever-present risk that hidden files might get lost. Hidden files in Linux start with a period, and while many are just simple user configuration settings for various applications, they include things like your browser bookmarks, cookies and, most importantly, your mail file. Ignoring hidden files is dangerous. And the solution is a Unix command that's older than I am:
Create a backup directory somewhere. No, not on the disk or partition to which you're installing. From your home directory run
find . -print | cpio -dumpv destination This will ensure that your hidden files are also backed up, so you can restore the whole lot by doing the same in reverse, or copy selected directories (such as mail) back to your clean installation. Warning: always, always, always double check that your actions had the desired results. It really spoils a shiny new operating system when the first thing you find is that some typo, a full disk, or sheer thoughtlessness, caused you to throw out three years worth of mail archives.
Of course, if you really are terrified by the command line, you have two simpler options:
- just do a version upgrade rather than a clean install, which is quicker and safer, but could leave old settings and data lying around, or
- backup your home directory using a graphical backup tool of your choice, do a clean install, a backup restore, and then just go to add/remove programs (or the synaptic package manager) and select the software you want manually.
The Hardy Heron comes with new versions of most software, but I'm most pleased with the fact that Firefox 3.0 beta 5 has been included in the software repositories, in addition to Firefox 2. Even though version 3 isn't yet final, it reportedly solves a ton of long-standing memory and performance issues. Beagle, the desktop search tool and system hog now also behaves rather more politely.
In all, the entire installation took me maybe 90 minutes, not counting download time. This included restoring all my backed-up data and settings, and installing a boatload (three gig's worth) of applications. The only company that conspired to irritate me during this process was iBurst, the state-protected cartelco (to coin a term), which charges a right fortune (as I wrote on ITWeb) for supposedly always-on wireless broadband. Ubuntu may be free, but it delivers. And this time it did so without any hitch whatsoever. Well done to the Hardy team. Consider me impressed.
Finally, lest anyone think my preference for open source software suggests I've taken leave of my free-market capitalist senses, consider this: would I be a good capitalist if paid through the nose for a vastly inferior and far more limited product, when I can exploit socialists who offer me a world of shiny free stuff instead?