How to Upgrade Debian Etch to Lenny
Yesterday I decided to take my debian system from Etch to Lenny, stable to testing. Quite a few of the programs I use had some major upgrades that I wanted to get. So, I planned to take an hour or two and convert to Lenny. It took forever! But, from that experience I learned alot, so I’m not too bitter.
First things first, back up any configuration changes, customized files to a removable drive, usb or other. Backup your data, in case your system becomes unbootable. Write down all the programs you use and count on. That way you can make sure that they install/upgrade during the process. All that said, things rarely go bad with a debian upgrade, but better to play it safe, and hey, you got a good backup point for any future modifications. If you are on a production server, or other critical system, take the time to go over the release notes from Debian.
Here we go! Again, first thing, make a backup of your sources.list by entering this at the terminal command prompt. Make sure you are running as super user (su). To get super user mode, I just used the icon already on Debian, under Applications | System Tools | Terminal Server – Super User Mode:
cp /etc/apt/sources.list /etc/apt/sources.list.backup
This is where I would do something different than the articles I have read on upgrading. My thought here is that it would greatly speed up the upgrade and leave a leaner system. I haven’t tested this, but from my experience with this last upgrade, I think it would work.
Do this part if you want to try it out, otherwise you can just leave all your packages as is for all to be upgraded. Go into Synaptic Package Manager and remove all the software and packages you don’t use or need. Then do an update to clear all these items out of your system. A reboot after this is advisable. Remember, this step is optional, otherwise lets just upgrade the whole thing as is, which is the route I took.
Now, lets edit sources.list to change the lines from specifying etch to lenny:
nano /etc/apt/sources.list
Comment out all the etch lines by adding a # at the beginning of the line. Then, below, add these lines:
# Lenny
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
Next, if you have the extra Multimedia repository, you’ll need to change that to pull Lenny content:
# DVD and mulimedia codecs
deb http://www.debian-multimedia.org lenny main
For a final sources.list of:
# Main repository for Stable with non-free extras
# deb http://ftp.uk.debian.org/debian/ etch main contrib non-free
# deb-src http://ftp.uk.debian.org/debian/ etch main contrib non-free
# Security updates for stable
# deb http://security.debian.org/ etch/updates main contrib
# deb-src http://security.debian.org/ etch/updates main contrib
# DVD and mulimedia codecs
deb http://www.debian-multimedia.org lenny main
# Google goodies
deb http://dl.google.com/linux/deb/ stable non-free
# Lenny
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
Save your sources.list. At the command prompt, lets update the list of packages by entering the command:
aptitude update
You’ll notice I’m using aptitude instead of apt. Very important note! Use aptitude to do the upgrade and from this point forward when managing packages from the command line. It’s also important to upgrade the core files for aptitude (and apt) before the upgrade. Do that by entering this at the command line:
aptitude install apt dpkg aptitude
Ok, we’re ready for the upgrade! Enter this command and go get some lunch or take a walk outside.
aptitude full-upgrade
The upgrade will take a long time. Yes. It will. So go have some fun while your shiny new debian is being built. You won’t need to click anything until the very end when it’s being configured. And even then, I went with the default selections.
Once it’s done upgrading, reboot to load the new kernel. Check everything out and hi-5 a friend. The only glitch in my upgrade was that sound was broken. Seems the new kernel doesn’t include the Alsa firmware. I’ve got a fix for it and will post on that shortly.








Want to Leave a Reply?