Debian Upgrade Howto

Share your own howto's etc. Not for support questions!

Debian Upgrade Howto

Postby mark » 2004-03-30 16:57

This howto is licensed under the terms of the GNU FDL (Free Documentation License).
It has been written in the hope that it will be useful to the community but it comes with no warranty; use it at your own risk.

When you have installed Debian Woody on your system, you have one of the most stable systems available.
That is great but Woody does not have the newest packages.
The packages that are installed during the installation of woody, are packages that are tested and tested and tested all over again and are therefor not the most recent ones.
For most severs is Woody the best choice, But for workstations it is often better to update to a more recent release.

At the time of writing this document Debian has 3 ("recent") releases :

Stable (Woody) :
The current “stable” distribution of Debian is version 3.0r2.
It was released on November 21st, 2003.

Testing (Sarge):
This Debian distribution contains packages that are not declared stable yet.
But They are more recent and not far from stable.
The disadvantage is that it is not officially supported by the Debian security team.

Unstable (Sid) :
This distribution contains the most recent packages.
On the official Debian site it is described as the distribution that is run by developers and those who like to live on the edge.
Now that we know what the different Debian distributions are, we can make a choice.

I personally use Sid for over 1 year now and I have not experience any problems so far.
But the choice is yours!

OK. lets start the actual updating.
We are going to use the master of all commands in the Debian Distribution : "apt-get"
This package handling utility reads a database that is synchronized with the sources listed in:
/etc/apt/sources.list.
This database contains an index on all the available packages.
So when we want to update our system (packages) we have to update the database by updating /etc/apt/sources.list.
Open your favorite terminal and get root privileges.
Code: Select all
    $ su
    password:

    # nano /etc/apt/sources.list

What you see now is the list of sources which is used when you update your database containing the index on the available packages.
Don't worry if it does not look like the above example.
The sources.list file is made during the installation. (Remember the question " add another apt source?" during the initial installation?)
When you used your internet connection during the installation something like the above example will be in your /etc/apt/source.list.
It doesn't matter when you didn't you are going to edit the file anyway.
Look at the above example, here you see 4 lines and each line contains the word 'stable'.
That is not surprising because Woody is the stable Debian distribution which we are going to upgrade.
So if you have something like the above example change 'stable' into 'testing' if you want the Sarge distribution or into 'unstable' if you want to upgrade to Sid.
When you don't have anything like the above example copy the example into your /etc/apt/sources.list and change the word 'stable' in 'testing' or 'unstable'.
Now type a '#' in front of the "security" line (If there is any).
Save the file and exit. (ctrl+o and ctrl+x)
Now we have to update the database by typing the following :

Code: Select all
 # apt-get update

This will start the actual synchronizing.

Now that we have an up-to-date database containing the index of all the available packages, close all the programs and type ctrl+alt+F2.
Now you see a black screen with a blinking cursor.
Login as root and type:
Code: Select all
  # apt-get dist-upgrade

This will start the actual system upgrading process.
This can take some time, it depends on your internet connection and on how many packages that have to be upgraded.
During the process you will be asked some questions on how the packages have to configured.
When the process is finished type :
[code ]# lilo
# reboot[/code]

Congratulations !
Your upgraded system will now be booted
mark
 
Posts: 37
Joined: 2004-02-15 22:28

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable