I kept the partitions with Etch on them around after I did a fresh install of Lenny a couple of months ago "just in case," with the ambition of eventually trying the upgrade-in-place and filing an upgrade-report with the Debian bug tracking system. I'd never done either of these things before and I wanted to learn how both were done.
I reviewed the release notes for Lenny, a number of threads on this forum, and various search engine hits from around the net to create a detailed how-to which I attempted to follow as I upgraded my system, while also recording the information needed to file the report. My goal was to distill the release notes and report filing procedure into a fairly simple set of instructions.
I clearly state which steps are being performed solely for the reporting process, so if you're just interested in doing the upgrade you can follow only those steps and skip the rest:
- 1) Do backups
2) Final update to Etch (just normal maintenance)
4 & 5) Edit sources.list
7) aptitude update
9) aptitude install dpkg aptitude apt
10) aptitude safe-upgrade and full-upgrade
14) re-boot and test things out
(Note: Ctrl-Alt-F1 only works with the control and alt keys on the left side of the keyboard.)
1) Make backups of anything you don't want to risk losing:
A couple of threads on this topic:
http://forums.debian.net/viewtopic.php?t=35650
http://forums.debian.net/viewtopic.php?t=35623
2) Ensure your Etch installation is up to date:
As root, execute:
Code: Select all
# aptitude update
# aptitude dist-upgrade
If aptitude asks for permission to uninstall large swaths of your system, answer no, and instead do:
Code: Select all
# aptitude keep-all
3) Save "before" data for your upgrade-report:
Let's create a directory where we can stash what we will need. As root, do:
Code: Select all
# mkdir /report
# cd /report
- dpkg's status database at /var/lib/dpkg/status
aptitude's package state information at /var/lib/aptitude/pkgstates
your original /etc/apt/sources.list
the output of uname -a
Code: Select all
# cp /var/lib/dpkg/status dpkg_status_before
# cp /var/lib/aptitude/pkgstates aptitude_pkgstates_before
# cp /etc/apt/sources.list sources.list.before
# uname -a > uname_before.txt
Still as root, go to your /etc/apt directory and save a backup copy of your sources.list:
Code: Select all
# cd /etc/apt/
# cp /etc/apt/sources.list /etc/apt/sources.list.backup
Two editors normally available from the command line are nano and vim. Nano is easier to use if you're not already familiar with vim. Run either as follows:
Code: Select all
# nano /etc/apt/sources.list
... or ...
# vim /etc/apt/sources.list
If you're still in a graphical session, you can launch gedit (Gnome) or kedit (KDE) from a root terminal and make your changes in a nice GUI environment. Use either:
Code: Select all
# gedit /etc/apt/sources.list
... or ...
# kedit /etc/apt/sources.list
If you installed Etch from a CD-ROM, you can delete that entire line. Same with the backports repository. You can probably comment out any other non-official repositories you've added along the way by putting a pound sign '#' at the beginning of the line. Then change 'etch' to 'lenny' wherever it appears in your repository list, including multimedia, if used.
In the US, your sources.list could be as simple as this:
Code: Select all
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb http://www.debian-multimedia.org lenny main
Now save your file and exit.
6) If you haven't already, now is the time to re-boot, hit ctrl-alt-F1 at the login screen, log in as root, and start working from the console. You SHOULD NOT try to do the upgrade from within a graphical session!
[What is an absolutely certain way to make sure Gnome (or KDE) and the X-server are NOT running at this time? I thought I had managed to shut them down, but I still ended up being kicked out of the upgrade process when it stopped and restarted Gnome and/or X and landed me in the gnome login screen. Fortunately another ctrl-alt-F1 got me back to the console session I was using, but I didn't know if I'd blown it or not at that point!]
[BTW, I'm told that Ctrl-Alt-F1 only works with the control and alt keys on the left side of the keyboard!]
7) Download the list of new packages:
Run this command to download the list of new packages in Lenny:
Code: Select all
# aptitude update
Run the script program to record the upgrade session for inclusion in the upgrade report. Run the following commands to change back to your /report directory and start recording:
Code: Select all
# cd /report
# script etch2lennyupgrade.script
Script started, file is etch2lennyupgrade.script
#
9) Upgrade to the newest package management software:
First update the package management system. Run:
Code: Select all
# aptitude install dpkg aptitude apt
Now run the following commands:
Code: Select all
# aptitude safe-upgrade
# aptitude full-upgrade
Strictly speaking, aptitude safe-upgrade is not required. It will only upgrade those packages that can be done without removing any other packages. It's recommended as a cautious intermediate step that may help resolve some usually rare dependency conflicts.
11) Finish recording the upgrade session:
Exit the environment of the script command by typing exit at the command line:
Code: Select all
# exit
exit
Script done, file is etch2lennyupgrade.script
#
If you moved to another directory for any reason, go back to /report:
Code: Select all
# cd /report
Code: Select all
# cp /var/lib/dpkg/status dpkg_status_after
# cp /var/lib/aptitude/pkgstates aptitude_pkgstates_after
# cp /etc/apt/sources.list sources.list.after
# uname -a > uname_after.txt
Assuming you're still in your /report folder:
Code: Select all
# cp /var/log/apt/term.log apt.log
# cp /var/log/aptitude aptitude.log
Okay, at this point, if aptituded didn't report any serious problems, you ought to have Lenny installed and ready to boot on your system. You can do a 'reboot' or 'shutdown' command from the command line and restart your machine.
Once your machine restarts it should deliver you to the grub menu. Hit any key besides <enter> in order to stop the countdown and examine the grub menu. The grub boot entry for your upgraded kernel should mention something like "Linux 2.6.26-1-xxx" instead of the 2.6.18-6 kernel (or earlier) that was used in etch. If you have a dual boot system and a different /boot/grub/menu.list boots your system than the one on your upgraded partition, you'll have to manually edit that file to boot the new kernel. (Don't ask me how I know this! )
Now select the correct menu line for the new kernel and press <enter> to continue to boot your system. Hopefully everything will have worked and you'll see the graphical boot screen for your desktop. Log into your account and see what sort of destruction has been wrought on your finely tuned configuration! Exercise programs, examine menus, verify that printing, file sharing, sound and any other services you had configured are working properly.
Take notes, search the forums and Google if you get errors or see problems. Ask for help as needed.
This testing and troubleshooting process will give you the grist for the body of your upgrade report. As suggested by Debian Developer Alexander "Tolimar" in his blog...
I would urge you to use the template Tolimar links to and create a text file to contain the body of your report, using your favorite editor. This way you can take your time, incorporate the results of your debugging and testing, and preserve a detailed and accurate description of the results of your upgrade effort. Later, you can cut and paste its contents into the editor window during the reportbug process.If something goes wrong / something unexpected happens, please report it. If you already know a specific package, report a bug against that package. If you don't know, please report a bug describing the problem you experienced to the upgrade-reports package. If your problem is something, which can't be fixed properly, but should be documented (e.g. hardware support regressions, packages no longer available) please report a bug against the release-notes package (Bonus points if you not only report the bug, but also supply a paragraph to be added to the release notes).
Update: If you upgraded succesfully, you should report that, too. There's a template for upgrade reports, which you can use: http://release.debian.org/upgrade-report.html
15) Configure the reportbugs package:
If you've never run the reportbugs script before, you'll need to configure it. The configuration I describe here will serve as a workable default. I find that I prefer the text version of the user interface, and it's easier to copy here as well, so that's what I will describe using.
Open a terminal for your normal user account, and configure reportbug as follows:
Code: Select all
$ reportbug -u text --configure
Please choose the default operating mode for reportbug.
1 novice Offer simple prompts, bypassing technical questions.
2 standard Offer more extensive prompts, including asking about things that a
moderately sophisticated user would be expected to know about
Debian.
3 advanced Like standard, but assumes you know a bit more about Debian,
including "incoming".
4 expert Bypass most handholding measures and preliminary triage routines.
This mode should not be used by people unfamiliar with Debian's
policies and operating procedures.
Select mode: 2
Please choose the default interface for reportbug.
1 text A text-oriented console interface
2 urwid A menu-based console interface
Select interface: 1
Will reportbug often have direct Internet access? (You should answer yes to
this question unless you know what you are doing and plan to check whether
duplicate reports have been filed via some other channel.) [Y|n|q|?]? Y
What real name should be used for sending bug reports?
> (Your Name goes here)
Which of your email addresses should be used when sending bug reports? (Note
that this address will be visible in the bug tracking system, so you may want
to use a webmail address or another address with good spam filtering
capabilities.)
> your.address@isp.com
Do you have a "mail transport agent" (MTA) like Exim, Postfix or SSMTP
configured on this computer to send mail to the Internet? [Y|n|q|?]? n
Please enter the name of your SMTP host. Usually it's called something like
"mail.example.org" or "smtp.example.org". Just press ENTER if you don't have
one or don't know.
>
Default preferences file written. To reconfigure, re-run reportbug with the "--
configure" option.
$
Now take a moment to create a compressed file containing all the before and after data and the script recording file. The following commands should create an archive file in your user's root directory:
Code: Select all
$ cd /report
$ tar -cvzf ~/etch2lennydata.tar.gz *
Now run reportbug for real:
Code: Select all
$ reportbug
Please enter the name of the package in which you have found a problem, or type
'other' to report a more general problem.
> upgrade-reports
*** Welcome to reportbug. Use ? for help at prompts. ***
Detected character set: UTF-8
Please change your locale if this is incorrect.
Using 'Your Name <your.name@isp.com>' as your from address.
Getting status for upgrade-reports...
Will send report to Debian (per lsb_release).
Querying Debian BTS for reports on upgrade-reports (source)...
25 bug reports found:
Outstanding bugs -- Serious ...
Outstanding bugs -- Important bugs ...
Outstanding bugs -- Normal bugs ...
Outstanding bugs -- Minor bugs ...
Outstanding bugs -- Wishlist items ...
(1-25/25) Is the bug you found listed above [y|N|m|r|q|s|f|?]? N
Please briefly describe your problem (you can elaborate in a moment; an empty
response will stop reportbug). This will be the bug email subject, so write a
concise summary of what is wrong with the package, for example, "fails to send
email" or "does not start with -q option specified."
> Etch to Lenny upgrade success!
Rewriting subject to 'upgrade-reports: Etch to Lenny upgrade success!'
How would you rate the severity of this problem or report?
1 critical makes unrelated software on the system (or the whole system)
break, or causes serious data loss, or introduces a security
hole on systems where you install the package.
2 grave makes the package in question unusable by most or all users,
or causes data loss, or introduces a security hole allowing
access to the accounts of users who use the package.
3 serious is a severe violation of Debian policy (that is, the problem
is a violation of a 'must' or 'required' directive); may or
may not affect the usability of the package. Note that non-
severe policy violations may be 'normal,' 'minor,' or
'wishlist' bugs. (Package maintainers may also designate
other bugs as 'serious' and thus release-critical; however,
end users should not do so.)
4 important a bug which has a major effect on the usability of a package,
without rendering it completely unusable to everyone.
5 does-not-build a bug that stops the package from being built from source.
(This is a 'virtual severity'.)
6 normal a bug that does not undermine the usability of the whole
package; for example, a problem with a particular option or
menu item.
7 minor things like spelling mistakes and other minor cosmetic errors
that do not affect the core functionality of the package.
8 wishlist suggestions and requests for new features.
Please select a severity level: [normal] 6
Do any of the following apply to this report?
1 l10n This bug reports a localization/internationalization issue.
2 patch You are including a patch to fix this problem.
3 none
Please select tags: (one at a time) [none] 3
Spawning sensible-editor...
When you're done, save and exit the editor. Reportbug continues:
Code: Select all
Report will be sent to "Debian Bug Tracking System" <submit@bugs.debian.org>
Submit this report on upgrade-reports (e to edit) [y|n|a|c|E|i|l|m|p|q|?]? a
Choose a file to attach: ~/etch2lennydata.tar.gz
Report will be sent to "Debian Bug Tracking System" <submit@bugs.debian.org>
Attachments:
/home/yourusername/etch2lennydata.tar.gz
Submit this report on upgrade-reports (e to edit) [y|n|a|c|E|i|l|m|p|q|?]? Y
Hopefully you've now got an upgraded system running Lenny with most of your old configuration intact, and you've managed to file an upgrade report of your experience. Once you're familiar with the reportbug program and process you ought to be able to report bugs against other packages, and so contribute to the feedback the developers and maintainers of our favorite distro depend on for making Debian better.
Mike D.