How To Upgrade Debian Etch To Lenny
How To Upgrade Debian Etch To LennyDebian Etch is soon to be unsupported by the Debian team, therefore all Debian Linux Servers need to be upgraded to Debian Lenny. I work for Netzen (an IT Support company) and have upgraded many Linux servers to Debian Lenny over the past month, so I am providing this guide on how to upgrade Debian Etch to Debian Lenny to the HowtoForge community.
BackupBackup! I took a full backup of the server which is stored off the server I am backing up of course! I also take an additional backup of /etc which I store locally in /root this is just in case I make a mistake during the the upgrade process and over write a config file, or dpkg / aptitude makes a misstake some how and botches my configs. Worth pointing out that none of these two things have never happened, but “only the paranoid survive”.
SSH / ScreenWhen I upgrade my servers remotely over SSH I always run the upgrade in screen, that way if you lose connection to your server you will still be able to reconnect to the screen session. To run screen type: screen To reconnect to a screen session: screen -rd Or if you don't have screen installed: aptitude install screen
Upgrade your existing Etch installBefore upgrading to Lenny, make sure your box is fully up to date using your existing apt sources for Etch, to do this: aptitude update && aptitude dist-upgrade If the updates you have applied include a kernel upgrade I would advise rebooting the server at this stage.
Check disk space for installMake sure you have enough space for the upgrade.
Edit apt sources for LennyEdit your /etc/apt/sources.list file to use lenny instead of etch repositories, this is normally a case of replacing the word etch with lenny, however take a moment to make sure you don’t have any other entries in your sources.list file. If you have any backports or 3rd party repositories I would comment them out during the upgrade. FYI here are the mirrors I used during upgrades: deb http://ftp.uk.debian.org/debian/ lenny main contrib non-free deb-src http://ftp.uk.debian.org/debian/ lenny main contrib non-free deb http://security.debian.org/ lenny/updates main contrib non-free deb-src http://security.debian.org/ lenny/updates main contrib non-free
Upgrade Apt & AptitudeThe first things to upgrade are apt & aptitude, this will pull a few dependencies and will automatically upgrade libc6 and locales and will pull in SELinux support libraries (libselinux1). Some services may need restarting (you will get asked to restart various services several times during the upgrade process). aptitude update && aptitude install apt && aptitude install aptitude The first time the lenny version of aptitude search "?false"
Minimal System UpgradeOk now we have aptitude updated it’s time to do what Debian call a “minimal system upgrade” which basically upgrades all packages that do not require other packages to be removed or installed. To do this enter: aptitude safe-upgrade Quick note from Debian “The next step will vary depending on the set of packages that you have installed. These release notes give general advice about which method should be used, but if in doubt, it is recommended that you examine the package removals proposed by each method before proceeding.” However in my case it was fine and I proceeded, however you might want to check with the Debian Obsolete Packages. This step is probably going to take a while and is going to pull down a lot of packages from the mirrors, but you will need to remain at the terminal as your going to have to tell aptitude what to do with various config files as your system upgrade progresses, the default is to use your existing configs. Which is what I did for the majority of my configs however if you want to make use of new features you will more than likely have to use the new configs or edit your existing configs to make use of the feature.
Upgrade the rest of the SystemOk, when that’s finished it is now time to upgrade the rest of the system! Please enter: aptitude dist-upgrade Again, your going to need to hang around and tell aptitude what to do with your config files.
Upgrade the KernelOk when that’s done you are almost finished, we need to check that aptitude upgraded your kernel during the update, in my case it didn’t. Enter the following to check: dpkg -l "linux-image*" | grep ^ii If you don’t see any output then you will have to install a new kernel image by hand, as I had to. Your best option is to find out what kernel you are currently running using: uname -r cartman:~# uname -r Then do a search using aptitude for a similar kernel using: apt-cache search linux-image-2.6- | grep -v transition cartman:~# apt-cache search linux-image-2.6- | grep -v transition So in this case I would install linux-image-2.6-686 using: aptitude linux-image-2.6-686 I then rebooted my server and it booted fine, however I had remote access via KVMoIP standing by just in case there was a problem during boot. In the Official Debian notes they recommend re running “/sbin/lilo” and reviewing the contents of your /etc/kernel-img.conf to make sure that you have do_bootloader = Yes. That way the bootloader will always be rerun after a kernel upgrade. Let me know how you get on, feel free to link back to this page and
post in the comments if you experience problems during your upgrade and
I will do my best to get back to you in a timely manor, however please
remember I do already have a day job
DisclaimerI take care to make sure the information I post on my blog is accurate, however there could be mistakes, if your break your server following guides found on this website, it is your fault this guide and others found here come with no guarantee. Please use at your own risk.
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
One number. one voicemail. Seize the lead with Sprint. Learn more
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video
Sprint 4G - The Ultimate Mobile Broadband
Click here
SAP-Business Objects Crystal Reports Server
Complete reporting without hidden costs. Free Trial







Recent comments
20 hours 45 min ago
1 day 31 min ago
1 day 5 hours ago
1 day 8 hours ago
2 days 12 hours ago
2 days 12 hours ago
2 days 12 hours ago
2 days 12 hours ago
2 days 12 hours ago
2 days 21 hours ago