Tuesday, May 7, 2013

upgrade debian squeeze to wheezy, cowboy style

DISCLAIMER: If your system is important, i.e. if destroying it would cause you to lose money or sleep, stop reading this and go follow the complete instructions.

Recently, the folks over at the Debian Project decided it was time to move the testing channel, Wheezy, up to become the new stable release.  Making the move requires making a bunch of changes to the OS, so I figured it would be a good time to make a bunch more.  (Full instructions from the Debian Project, which I used as a starting place for this guide.  Also, this guy's blog post helped me wade through the extraneous instruction a bit.)

Initial steps were simple.  Open sources.list and replace occurrences of squeeze with wheezy:

vi /etc/apt/sources.list
:%s/squeeze/wheezy/g

If, like me, you had backports added to squeeze, you'll need to take note of the new URL format for wheezy backports.  A simple S&R won't cut it here.  The new format looks like this:


deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free

Of course, remove contrib and non-free if you don't want to use any packages that aren't free software (or require non-free software to function).

I didn't back up anything, because the system I'm upgrading isn't important, but if your system is important, back some stuff up.  This is a pretty big update, and all sorts of things could go wrong, so, once again, if you care about the contents of your hard disks, go do it right.

Typically I would mentally :%s/apt-[a-zA-Z]/aptitude/g, but the big guide seemed a bit preferential toward apt-get, so I went with that for the instructions here.

apt-get update
apt-get upgrade

Not too bad.

apt-get dist-upgrade

Oh god, this thing wants to install so many packages.  At this point I considered backing out and just running off the wheezy repos, leaving the system as is.  But this system was newly installed in February, so I decided to take the plunge.  I'll just uninstall all that junk later, assuming I don't trash the install completely.

This took a long time, probably because the Debian servers are getting slammed.

After an age, I got a fullscreen prompt relating to a change in mdadm.  It wants to know if you need a filesystem on the RAID to boot, which seems like it would usually be a bad idea, but I don't know what kind of constraints people work under.  My box does have a RAID array, but it boots from a filesystem on a different disk, so I changed the value in the text field here from "all" to "none".  I selected "yes" to the next question, on whether to start all arrays after boot.

Towards the end of installation, I was seeing output for initramfs, and my desktop background turned this scary error-shade of green.  May have had to do with using the background slideshow, I'm not sure.

My bash.rc had been edited, and the maintained version had changed, so I was asked to do something about it.  I took the "open a shell" option and copied out my modified version so I could merge it back with the new version later.

After the dist-upgrade completed, as you might expect, Gnome went nuts.  The shut down prompt that opened had Unicode Squares of Confusion instead of text; I gambled on the farthest left button and was greeted with a black screen telling me I had won - the system was rebooting.

It came back with a new and exciting Grub background.  I chose the older 2.6 kernel and booted.  A couple of warnings, nothing that looked too serious, and then an empty black screen.  Waited here for 10 minutes, and then rebooted into recovery mode.

Looking around a bit, I found about what I had expected - X didn't boot properly.  /var/log/Xorg.0.log told me what I needed to know - the kernel I was using was too old.  Time to uninstall that old kernel anyway.  Farewell, Linux 2.6.32, you've treated me well.

aptitude remove linux-image-2.6-686 linux-image-2.6.32-5-686

Next installment: I think I accidentally ran an aptitude install ubuntu.