Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories


Upgrade from lenny to squeeze

Ástþór IPÁstþór IP

Debian has released a stable version of Debian 6.0 (squeeze). If you’re running previous version of Debian, you can easily upgrade.

1. Update all packages currently installed to the latest lenny versions

apt-get update
apt-get upgrade

2. Replace all occurrences of lenny with squeeze in the apt sources file (pico /etc/apt/sources.list). Here’s an example of what the file could look like after the change:

deb http://ftp.uk.debian.org/debian/ squeeze main non-free
deb-src http://ftp.uk.debian.org/debian/ squeeze main non-free
deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib

3. Update apt repository

apt-get update

4. Upgrade apt, dpkg and aptitude packages first

apt-get install apt dpkg aptitude

5. Do a dist-upgrade to upgrade the rest of the system

apt-get dist-upgrade

6. Reboot

reboot

7. Check the debian version

cat /etc/debian_version

It should read version 6.0.0 or greater

Comments 9
  • DarkNightz
    Posted on

    DarkNightz DarkNightz

    Author

    Thank for info, helped me out alot 🙂


  • R S Chakravarti
    Posted on

    R S Chakravarti R S Chakravarti

    Author

    Step 4 is done by the system. First the new versions of apt and dpkg are unpacked and configured. Then other packages are installed using the new apt and dpkg.

    Why is step 1 needed?


  • caleudum
    Posted on

    caleudum caleudum

    Author

    thank you, it is really useful


  • required name
    Posted on

    required name required name

    Author

    about 1st step : if you regularly do update/upgrade, you do not need it, but it does not hurt to do it once more. some people maybe do not do it often.


  • Bryan Henderson
    Posted on

    Bryan Henderson Bryan Henderson

    Author

    Even if I have never done update/upgrade, I don’t see why I need step 1.


  • olivecoder
    Posted on

    olivecoder olivecoder

    Author

    You really can need more than step 1. You need the package system in a clean state, if step 1 show errors you need will fix them.


  • olivecoder
    Posted on

    olivecoder olivecoder

    Author

    You really can need more than step 1. You need the package system in a clean state, if step 1 show errors you will need fix them.


  • Pete Morgan
    Posted on

    Pete Morgan Pete Morgan

    Author

    Mine ended up with an unusable system, LVM doesnt start.. ;-(

    Checking root file system…fsck from util-linux-ng 2.17.2
    root: clean, 17024/489600 files, 132037/977920 blocks
    done.
    [ 13.797619] EXT3 FS on md1, internal journal
    Cleaning up ifupdown….
    Loading kernel modules…[ 14.049580] loop: module loaded
    [ 14.120891] powernow-k8: Found 1 AMD Athlon(tm) X2 Dual Core Processor BE-2350 processors (2 cpu cores) (version 2.20.00)
    [ 14.139182] powernow-k8: 0 : fid 0xd (2100 MHz), vid 0xe
    [ 14.155406] powernow-k8: 1 : fid 0xc (2000 MHz), vid 0xf
    [ 14.166541] powernow-k8: 2 : fid 0xa (1800 MHz), vid 0x11
    [ 14.178544] powernow-k8: 3 : fid 0x2 (1000 MHz), vid 0x16
    done.
    Generating udev events for MD arrays…done.
    Setting up LVM Volume Groups Reading all physical volumes. This may take a while…
    No volume groups found
    No volume groups found
    No volume groups found
    .
    Activating lvm and md swap…done.
    Checking file systems…fsck from util-linux-ng 2.17.2
    /sbin/fsck.xfs: /dev/vg00/usr does not exist
    /sbin/fsck.xfs: /dev/vg00/var does not exist
    /sbin/fsck.xfs: /dev/vg00/home does not exist
    fsck died with exit status 8
    failed (code 8).
    File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. … failed!
    A maintenance shell will now be started. CONTROL-D will terminate this shell and resume system boot. … (warning).
    Give root password for maintenance
    (or type Control-D to continue):


  • John Hyper
    Posted on

    John Hyper John Hyper

    Author

    True that installing apt and dpkg first likely isn’t necessary, and in any case will pull half the very dist-upgrade in dependencies. Still this guide helped me a lot to get the idea.
    Since I encountered special problems – buggy old motherboard that froze in mid dist-upgrade, plus some inconsistencies in the old system -, I had to resort to more trickery and would like to share what prove useful. “dpkg –configure -a” helps to recover from confuse package situations as good as possible, at least good enough to continue and/or try your last package install or upgrade again; additionally I ran into a full root partition due to apparently a lot of packages provisionally kept stored due to the interruptions and multiple dist-upgrade attempts, “apt-get clean” deleted what was not needed and saved me resizing or manually deleting stuff on a best-guess basis. Be it mentioned that in my situation, it wasn’t before I removed and re-installed the “gnome” package (with aptitude, this time) that I got desktop login and synaptic back, but a) this doesn’t seem the most elegant way and b) the problem will probably not happen when dist-upgrading from a healthy gnome, which I didn’t.
    Thanx for the guide, on debian.org upgrading to anything else than stable or newer isn’t covered a lot.