4. Opgraderinger fra Debian 12 (bookworm)
4.1. Forberedelse af opgraderingen
Du bør læse informationen i Ting man skal være opmærksom på i forbindelse med trixie, inden du opgraderer. Det kapitel dækker mulige problemer, som ikke er direkte relateret til opgraderingsprocessen, men som stadig kan være vigtige at kende til, inden du begynder.
4.1.1. Sikkerhedskopier alle data og konfigurationsinformation
Inden opgradering af dit system anbefales det kraftigt, at du foretager en fuldstændig sikkerhedskopiering, eller i det mindste laver en sikkerhedskopi af alle de data og den konfigurationsinformation, som du ikke vil risikere at miste. Opgraderingsværktøjerne og -processen er meget pålidelige, men en maskinel fejl midt i en opgradering kan resultere i et alvorligt skadet system.
The main things you’ll want to back up are the contents of /etc
,
/var/lib/dpkg
, /var/lib/apt/extended_states
and the output of:
$ dpkg --get-selections '*' # (the quotes are important)
If you use aptitude
to manage packages on your system, you will also
want to back up /var/lib/aptitude/pkgstates
.
Selve opgraderingsprocessen ændrer ingenting i mappen /home
. Dog er det kendt at visse programmer (for eksempel dele af Mozilla-pakken og skrivebordsmiljøerne GNOME og KDE) overskriver eksisterende brugerindstillinger med nye standardværdier, når en ny version af programmet startes for første gang af en bruger. Som en sikkerhedsforanstaltning bør du foretage en sikkerhedskopiering af de skjulte filer og mapper (såkaldte »punktum-filer«) i brugernes hjemmemapper. Denne sikkerhedskopiering kan hjælpe til at gendanne eller genoprette de gamle indstillinger. Du ønsker måske også at informere dine brugere om dette.
Alle pakkeinstallationshandlinger skal køres med superbrugerprivilegier, så log ind som root
(administrator) eller brug su
eller sudo
for at få de nødvendige adgangsrettigheder.
Opgraderingen har nogle få forudsætninger; du bør tjekke dem, før du gennemfører opgraderingen.
4.1.2. Informer brugerne i forvejen
Det er klogt at informere alle brugerne i forvejen om eventuelle opgraderinger, du planlægger, også selv om brugere der tilgår dit system via en ssh
-forbindelse ikke vil mærke meget under opgraderingen, og bør kunne fortsætte deres arbejde.
Hvis du vil være ekstra omhyggelig, så lav en sikkerhedskopi af eller afmonter /home
før opgraderingen.
Du skal udføre en kerneopgradering under opgraderingen til trixie, så en genstart er nødvendig. Typisk vil dette udføres efter opgraderingen er afsluttet.
4.1.3. Forbered nedetid for tjenester
Under opgraderingsprocessen kan der være tjenester, som er tilknyttet pakker, som er en del af opgraderingen. Hvis dette er tilfældet, vil disse tjenester måske stoppe mens pakkerne, som skal opgraderes bliver omplaceret og konfigureret. I dette tidsrum vil disse tjenester ikke være tilgængelige.
Præcis hvor lang nedetiden er for disse tjenester vil afhænge af antallet af pakker, som opgraderes på systemet, og vil også inkludere den tid som systemadministratoren er om at besvare konfigurationsspørgsmål fra forskellige pakkeopgraderinger. Bemærk at hvis opgraderingsprocessen foregår uovervåget og systemet kræver svar under opgraderingen, er der stor sandsynlighed for, at tjenester er utilgængelige [1] i en væsentlig tidsperiode.
If the system being upgraded provides critical services for your users or the network [2], you can reduce the downtime if you do a minimal system upgrade, as described in Minimal system upgrade, followed by a kernel upgrade and reboot, and then upgrade the packages associated with your critical services. Upgrade these packages prior to doing the full upgrade described in Upgrading the system. This way you can ensure that these critical services are running and available through the full upgrade process, and their downtime is reduced.
4.1.4. Forbered for gendannelse
Selom Debian forsøger at sikre, a dit system kan startes op på alle tidspunkter, er der en reel risko for, at du kan opleve problemer efter genstart af dit system, når opgraderingen er færdig. En del kendte problemer er dokumenteret i dette og de næste kapitler af udgivelsesnoterne.
Af den grund er det klogt at sikre sig, at du vil kunne gendanne dit system, såfremt det skulle fejle i at genstarte eller, for eksternt håndterede systemer, ikke kan få netværket til at fungere.
Hvis du fjernopgraderer via en ssh
-henvisning, anbefales det kraftigt, at du foretager de nødvendige forholdsregler for at kunne tilgå serveren via en ekstern seriel terminal. Der er en risiko for, at efter opgradering af kernen og en genstart, at du skal rette systemkonfigurationen via en lokal konsol. Hvis systemet ved et uheld genstartes i midten af en opgradering, er der en risiko for, at du vil skulle gendanne via en lokal konsol.
For emergency recovery we generally recommend using the rescue mode of the trixie Debian Installer. The advantage of using the installer is that you can choose between its many methods to find one that best suits your situation. For more information, please consult the section »Recovering a Broken System« in chapter 8 of the Installation Guide (at https://www.debian.org/releases/trixie/installmanual) and the Debian Installer FAQ.
If that fails, you will need an alternative way to boot your system so
you can access and repair it. One option is to use a special rescue or
live install image. After booting
from that, you should be able to mount your root file system and
chroot
into it to investigate and fix the problem.
4.1.4.1. Fejlsøg skal under opstart med initrd
The initramfs-tools package includes a debug shell [3] in the initrds it generates. If for example the initrd is unable to mount your root file system, you will be dropped into this debug shell which has basic commands available to help trace the problem and possibly fix it.
Grundlæggende ting der kan kontrolleres: tilstedeværelse af korrekte enhedsfiler i /dev
; hvilke moduler indlæses (cat /proc/modules
); resultat af dmesg
for fejl under indlæsning af drivere. Resultatet af dmesg
vil også vise hvilke enhedsfiler, der er blevet tildelt til hvilke diske; du bør kontrollere det imod resultatet af echo $ROOT
for at sikre, at rodfilsystemet er på den forventede enhed.
Hvis du lykkes med at rette problemet, vil indtastning af exit
afslutte fejlsøgningsskallen og fortsætte opstartsprocessen på det punkt hvor den fejlede. Selvfølgelig skal du også rette det underliggende problem og genoprette initrd’en så den næste opstart ikke fejler igen.
4.1.4.2. Fejlsøg skal under opstart med systemd
Hvis opstarten fejler under systemd, er det muligt at indhente en fejlsøg root-skal ved at ændre kernens kommandolinje. Hvis standardopstarten lykkes, men nogle tjenester ikke kan starte, så kan det være nyttigt at tilføje systemd.unit=rescue.target
til kerneparametrene.
Ellers vil kerneparameteren systemd.unit=emergency.target
tilbyde dig en root-skal på det tidligste mulige punkt. Dette gøres dog før montering af root-filsystemet med læse-skrive rettigheder. Du skal gøre det manuelt med:
# mount -o remount,rw /
Another approach is to enable the systemd »early debug shell« via the
debug-shell.service
. On the next boot this service opens a root
login shell on tty9 very early in the boot process. It can be enabled
with the kernel boot parameter systemd.debug-shell=1
, or made
persistent with systemctl enable debug-shell
(in which case it
should be disabled again when debugging is completed).
More information on debugging a broken boot under systemd can be found in the Freedesktop.org Diagnosing Boot Problems article.
4.1.5. Forbered et sikkert miljø for opgraderingen
Vigtigt
If you are using some VPN services (such as tinc) consider that they might not be available throughout the upgrade process. Please see Prepare for downtime on services.
In order to gain extra safety margin when upgrading remotely, we suggest
that you run upgrade processes in a virtual console provided by the
screen
or tmux
programs, which enables safe reconnection and ensures the
upgrade process is not interrupted even if the remote connection process
temporarily fails.
Users of the watchdog daemon provided by the micro-evtd package should stop the daemon and disable the watchdog timer before the upgrade, to avoid a spurious reboot in the middle of the upgrade process:
# service micro-evtd stop
# /usr/sbin/microapl -a system_set_watchdog off
4.2. Start from »pure« Debian
The upgrade process described in this chapter has been designed for »pure« Debian stable systems. APT controls what is installed on your system. If your APT configuration mentions additional sources besides bookworm, or if you have installed packages from other releases or from third parties, then to ensure a reliable upgrade process you may wish to begin by removing these complicating factors.
APT is moving to a different format for configuring where it downloads
packages from. The files /etc/apt/sources.list
and *.list
files in
/etc/apt/sources.list.d/
are replaced by files still in that directory but
with names ending in .sources
, using the new, more readable (deb822 style)
format. For details see sources.list(5).
Examples of APT configurations in these notes will be given in the new deb822 format.
If your system is using multiple sources files then you will need to ensure they stay consistent.
4.2.1. Upgrade to Debian 12 (bookworm)
Only upgrades from Debian 12 (bookworm) are supported. Display your Debian version with:
$ cat /etc/debian_version
Please follow the instructions in the Release Notes for Debian 12 at https://www.debian.org/releases/bookworm/releasenotes to upgrade to Debian 12 first if needed.
4.2.2. Upgrade to latest point release
This procedure assumes your system has been updated to the latest point release of bookworm. If you have not done this or are unsure, follow the instructions in Opgradering af dit bookworm-system.
4.2.3. Debian Backports
Debian Backports allows users of Debian stable to run more up-to-date versions of packages (with some tradeoffs in testing and security support). The Debian Backports Team maintains a subset of packages from the next Debian release, adjusted and recompiled for usage on the current Debian stable release.
Packages from bookworm-backports have version numbers lower than the version in trixie, so they should upgrade normally to trixie in the same way as »pure« bookworm packages during the distribution upgrade. While there are no known potential issues, the upgrade paths from backports are less tested, and correspondingly incur more risk.
Forsigtig
While regular Debian Backports are supported, there is no clean upgrade path from sloppy backports (which use APT sources entries referencing bookworm-backports-sloppy).
As with Unofficial sources, users are advised to remove »bookworm-backports« entries from their APT sources files before the upgrade. After it is completed, they may consider adding »trixie-backports« (see https://backports.debian.org/Instructions/).
For more information, consult the Backports Wiki page.
4.2.4. Prepare the package database
You should make sure the package database is ready before proceeding with the upgrade. If you are a user of another package manager like aptitude or synaptic, review any pending actions. A package scheduled for installation or removal might interfere with the upgrade procedure. Note that correcting this is only possible if your APT sources files still point to »bookworm« and not to »stable« or »trixie«; see Checking your APT configuration.
4.2.5. Remove obsolete packages
It is a good idea to remove obsolete packages from your system before upgrading. They may introduce complications during the upgrade process, and can present security risks as they are no longer maintained.
4.2.6. Remove non-Debian packages
Below there are two methods for finding installed packages that did not
come from Debian, using either apt
or apt-forktracer
. Please
note that neither of them are 100% accurate (e.g. the apt example will
list packages that were once provided by Debian but no longer are, such
as old kernel packages).
$ apt list '?narrow(?installed, ?not(?origin(Debian)))'
$ apt-forktracer | sort
4.2.7. Clean up leftover configuration files
A previous upgrade may have left unused copies of configuration files; old versions of configuration files, versions supplied by the package maintainers, etc. Removing leftover files from previous upgrades can avoid confusion. Find such leftover files with:
# find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'
4.2.8. The non-free and non-free-firmware components
If you have non-free firmware installed it is recommended to add
non-free-firmware
to your APT sources.
4.2.9. Afsnittet foreslåede opdateringer (proposed-updates)
If you have listed the proposed-updates
section in your APT
sources files, you should remove it before attempting to upgrade
your system. This is a precaution to reduce the likelihood of conflicts.
4.2.10. Uofficielle kilder
If you have any non-Debian packages on your system, you should be aware that these may be removed during the upgrade because of conflicting dependencies. If these packages were installed by adding an extra package archive in your APT sources files, you should check if that archive also offers packages compiled for trixie and change the source item accordingly at the same time as your source items for Debian packages.
Some users may have unofficial backported »newer« versions of packages that are in Debian installed on their bookworm system. Such packages are most likely to cause problems during an upgrade as they may result in file conflicts [4]. Possible issues during upgrade has some information on how to deal with file conflicts if they should occur.
4.2.11. Deaktivering af APT-pinning
If you have configured APT to install certain packages from a
distribution other than stable (e.g. from testing), you may have to
change your APT pinning configuration (stored in
/etc/apt/preferences
and /etc/apt/preferences.d/
) to allow the
upgrade of packages to the versions in the new stable release. Further
information on APT pinning can be found in
apt_preferences(5).
4.2.12. Check package status
Uanset den anvendte opgraderingsmetode, så anbefales det, at du kontrollerer pakkernes status først, og verificerer at alle pakker er i en opgraderbar tilstand. Den følgende kommando vil vise alle pakker, som har en status som halvt installeret (Half-Installed) eller som ikke kunne konfigureres, (Failed-Config) og dem med en eventuel fejlstatus.
$ dpkg --audit
Du kan også inspicere tilstanden for alle pakker på dit system med aptitude
, eller med kommandoer såsom
$ dpkg -l
eller
# dpkg --get-selections '*' > ~/curr-pkgs.txt
Alternatively you can also use apt
.
# apt list --installed > ~/curr-pkgs.txt
Det er ønskværdigt at fjerne alle pakker på hold før en opgradering. Hvis en pakke - som er essentiel for opgraderingen - er på hold, så vil opgraderingen fejle.
$ apt-mark showhold
Hvis du ændrede og genkompilerede en pakke lokalt, og ikke omdøbte den eller placerede en epoch i versionen, så skal du sætte den på hold for at forhindre at den bliver opgraderet.
The »hold« package state for apt
can be changed using:
# apt-mark hold package_name
Replace hold
with unhold
to unset the »hold« state.
If there is anything you need to fix, it is best to make sure your APT sources files still refer to bookworm as explained in Checking your APT configuration.
4.3. Preparing APT sources files
Before starting the upgrade you must reconfigure APT to add sources for trixie and typically remove sources for bookworm.
As mentioned in Start from »pure« Debian, we recommend that you use the new
deb822-style format, so you would have to replace /etc/apt/sources.list
and any *.list
files in /etc/apt/sources.list.d/
by only one file
named debian.sources
in /etc/apt/sources.list.d/
(if you haven’t done
so already). An example is given below of how this file should typically
look.
APT will consider all packages that can be found via any configured archive, and install the package with the highest version number, giving priority to the first entry in the files. Thus, if you have multiple mirror locations, list first the ones on local hard disks, then CD-ROMs, and then remote mirrors.
A release can often be referred to both by its codename (e.g. »bookworm«, »trixie«) and by its status name (i.e. »oldstable«, »stable«, »testing«, »unstable«). Referring to a release by its codename has the advantage that you will never be surprised by a new release and for this reason is the approach taken here. It does of course mean that you will have to watch out for release announcements yourself. If you use the status name instead, you will just see loads of updates for packages available as soon as a release has happened.
Debian provides two announcement mailing lists to help you stay up to date on relevant information related to Debian releases:
By subscribing to the Debian announcement mailing list, you will receive a notification every time Debian makes a new release. Such as when »trixie« changes from e.g. »testing« to »stable«.
By subscribing to the Debian security announcement mailing list, you will receive a notification every time Debian publishes a security announcement.
4.3.1. Tilføjelse af APT-internetkilder
On new installations the default is for APT to be set up to use the Debian APT CDN service, which should ensure that packages are automatically downloaded from a server near you in network terms. As this is a relatively new service, older installations may have configuration that still points to one of the main Debian Internet servers or one of the mirrors. If you haven’t done so yet, it is recommended to switch over to the use of the CDN service in your APT configuration.
To make use of the CDN service, the correct configuration for APT
(assuming you are using main
and non-free-firmware
) is the following
in /etc/apt/sources.list.d/debian.sources
:
Types: deb URIs: https://deb.debian.org/debian Suites: trixie trixie-updates Components: main non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg Types: deb URIs: https://security.debian.org/debian-security Suites: trixie-security Components: main non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Make sure to remove any of the old sources files.
However, if you get better results using a specific mirror that is close to you in network terms instead of the CDN service, then the mirror URI can be substituted in the URIs line as (for instance) »URIs: https://mirrors.kernel.org/debian«.
If you want to use packages from the contrib
or non-free
components,
you may add these names to all the Components:
lines.
After adding your new sources, disable the previously existing archive
entries in the APT sources files by placing a hash sign (#
) in
front of them.
4.3.2. Tilføjelse af APT-kilder for et lokalt spejl
Instead of using remote package mirrors, you may wish to modify the APT sources files to use a mirror on a local disk (possibly mounted over NFS).
For example, your package mirror may be under /var/local/debian/
,
and have main directories like this:
/var/local/debian/dists/trixie/main/... /var/local/debian/dists/trixie/contrib/...
To use this with apt, add the following to your
/etc/apt/sources.list.d/debian.sources
file:
Types: deb URIs: file:/var/local/debian Suites: trixie Components: main non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Again, after adding your new sources, disable the previously existing archive entries.
4.3.3. Tilføjelse af APT-kilder fra et optisk medie
If you want to use only DVDs (or CDs or Blu-ray Discs), comment out
the existing entries in all the APT sources files by placing a hash
sign (#
) in front of them.
Make sure there is a line in /etc/fstab
that enables mounting your
CD-ROM drive at the /media/cdrom
mount point. For example, if
/dev/sr0
is your CD-ROM drive, /etc/fstab
should contain a line
like:
/dev/sr0 /media/cdrom auto noauto,ro 0 0
Note that there must be no spaces between the words noauto,ro
in
the fourth field.
For at verificere, at det virker, så indsæt en cd og prøv igen
# mount /media/cdrom # this will mount the CD to the mount point
# ls -alF /media/cdrom # this should show the CD's root directory
# umount /media/cdrom # this will unmount the CD
Næste, kør:
# apt-cdrom add
for hver Debian binær cd-rom du har, at tilføje dataene om hver cd til APT’s database.
4.4. Opgradering af pakker
The recommended way to upgrade from previous Debian releases is to use
the package management tool apt
.
Bemærk
apt
is meant for interactive use, and should not be used in
scripts. In scripts one should use apt-get
, which has a stable
output better suitable for parsing.
Glem ikke at montere alle krævede partitioner (vigtigst partitionerne for root og /usr
som skrivbare med en kommando såsom:
# mount -o remount,rw /mountpoint
Next you should double-check that the APT sources entries (in
files under /etc/apt/sources.list.d/
)
refer either to »trixie« or to »stable«. There should not be any
sources entries pointing to bookworm.
Bemærk
Sources lines for a CD-ROM might sometimes refer to »unstable
«;
although this may be confusing, you should not change it.
4.4.1. Optagelse af sessionen
apt
will log the changed package states in
/var/log/apt/history.log
and the terminal output in
/var/log/apt/term.log
. dpkg
will, in addition, log all package
state changes in /var/log/dpkg.log
. If you use aptitude
, it will
also log state changes in /var/log/aptitude
.
If a problem occurs, you will have a log of what happened, and if needed, can provide exact information in a bug report.
The term.log
will also allow you to review information that has
scrolled off-screen. If you are at the system’s console, just switch to
VT2 (using Alt+F2
) to review it.
4.4.2. Opdatering af pakkelisten
Først skal listen over tilgængelige pakker for den nye udgivelse hentes. Dette gøres ved at køre:
# apt update
4.4.3. Sikr dig, at du har tilstrækkelig med plads til opgraderingen
Du skal sikre dig, at du har tilstrækkelig med harddiskplads før du opgraderer med den fulde systemopgradering beskrevet i Upgrading the system. Først, alle pakker krævet for installation som hentes fra netværket gemmes i /var/cache/apt/archives
(og undermappen partial/
, under overførsel), så du skal sikre dig, at du har nok plads på partitionen for filsystemet, som indeholder /var/
til midlertidigt at hente pakkerne, som skal installeres på dit system. Efter overførslen skal du sikkert bruge ekstra plads i andre filsystempartitioner for både at installere opgraderede pakker (som kan indeholder større binære filer eller mere data) og nye pakker, som vil blive hentet ned for opgraderingen. Hvis dit system ikke har tilstrækkelig med plads, kan du ende med en ufuldstændig opgradering, som det kan være svært at fortryde.
apt
can show you detailed information about the disk space needed
for the installation. Before executing the upgrade, you can see this
estimate by running:
# apt -o APT::Get::Trivial-Only=true full-upgrade
[ ... ]
XXX upgraded, XXX newly installed, XXX to remove and XXX not upgraded.
Need to get xx.xMB of archives.
After this operation, AAAMB of additional disk space will be used.
Bemærk
Running this command at the beginning of the upgrade process may give an error, for the reasons described in the next sections. In that case you will need to wait until you’ve done the minimal system upgrade as in Minimal system upgrade before running this command to estimate the disk space.
If you do not have enough space for the upgrade, apt
will warn you
with a message like this:
E: You don't have enough free space in /var/cache/apt/archives/.
I denne situation, så skab først ledig plads. Du kan:
Remove packages that have been previously downloaded for installation (at
/var/cache/apt/archives
). Cleaning up the package cache by runningapt clean
will remove all previously downloaded package files.Remove forgotten packages. If you have used
aptitude
orapt
to manually install packages in bookworm it will have kept track of those packages you manually installed, and will be able to mark as redundant those packages pulled in by dependencies alone which are no longer needed due to a package being removed. They will not mark for removal packages that you manually installed. To remove automatically installed packages that are no longer used, run:# apt autoremove
You can also use
debfoster
to find redundant packages. Do not blindly remove the packages this tool presents, especially if you are using aggressive non-default options that are prone to false positives. It is highly recommended that you manually review the packages suggested for removal (i.e. their contents, sizes, and descriptions) before you remove them.Remove packages that take up too much space and are not currently needed (you can always reinstall them after the upgrade). If you have popularity-contest installed, you can use
popcon-largest-unused
to list the packages you do not use that occupy the most space. You can find the packages that just take up the most disk space withdpigs
(available in the debian-goodies package) or withwajig
(runningwajig size
). They can also be found with aptitude. Startaptitude
in full-terminal mode, selectViews > New Flat Package List
, pressl
and enter~i
, then pressS
and enter~installsize
. This will give you a handy list to work with.Fjern oversættelser og sprogfiler fra system hvis de ikke er krævet. Du kan installere pakken localepurge og konfigurere den så at kun nogle få udvalgte sprog bevares i systemet. Dette vil reducere den forbrugt diskplads i
/usr/share/locale
.Flyt midlertidigt til et andet system, eller fjern permanent, systemlogge under
/var/log/
.Use a temporary
/var/cache/apt/archives
: You can use a temporary cache directory from another filesystem (USB storage device, temporary hard disk, filesystem already in use, …).Bemærk
Brug ikke en NFS-montering da netværksforbindelsen kan blive afbrudt under opgraderingen.
For eksempel hvis du har et USB-drev monteret på
/media/usbkey
:fjern pakkerne som tidligere er blevet hentet for installation:
# apt clean
kopier mappen
/var/cache/apt/archives
til USB-drevet:# cp -ax /var/cache/apt/archives /media/usbkey/
monter den midlertidige mappe for mellemlageret på den aktuelle:
# mount --bind /media/usbkey/archives /var/cache/apt/archives
efter opgraderingen, gendan den originale
/var/cache/apt/archives
-mappe:# umount /var/cache/apt/archives
fjern den tilbageværende
/media/usbkey/archives
.
Du kan oprette den midlertidige mappe for mellemlageret på det filsystem som er monteret på dit system.
Do a minimal upgrade of the system (see Minimal system upgrade) or partial upgrades of the system followed by a full upgrade. This will make it possible to upgrade the system partially, and allow you to clean the package cache before the full upgrade.
Note that in order to safely remove packages, it is advisable to switch your APT sources files back to bookworm as described in Checking your APT configuration.
4.4.4. Stop monitoring systems
As apt
may need to temporarily stop services running on your
computer, it’s probably a good idea to stop monitoring services that can
restart other terminated services during the upgrade. In Debian, monit
is an example of such a service.
4.4.5. Minimal systemopgradering
In some cases, doing the full upgrade (as described below) directly might remove large numbers of packages that you will want to keep. We therefore recommend a two-part upgrade process: first a minimal upgrade to overcome these conflicts, then a full upgrade as described in Upgrading the system.
For at gøre dette, så kør først:
# apt upgrade --without-new-pkgs
Dette medfører en opgradering af de pakker, som kan opgraderes uden at kærve at andre pakker fjernes eller installeres.
Den mimimale systemopgradering kan også være nyttig når systemet har lidt ledig plads og en fuld opgradering ikke kan køres på grund af pladsbegrænsninger.
If the apt-listchanges package is installed, it will (in its default
configuration) show important information about upgraded packages in a
pager after downloading the packages. Press q
after reading to exit the
pager and continue the upgrade.
4.4.6. Opgradering af systemet
Når du har udført de tidligere trin, er du nu klar til at fortsætte med hoveddelen af opgraderingen. Kør:
# apt full-upgrade
Dette vil udføre en fuldstændig opgradering af systemet, dvs. installere de nyeste tilgængelige versioner af alle pakker, og løse alle eventuelle afhængighedsændringer mellem pakker i forskellige udgivelser. Hvis nødvendigt vil den installere nogle nye pakker (normalt nye biblioteksversioner, eller omdøbte pakker), og fjerne alle forældede pakker der er i konflikt med andre pakker.
When upgrading from a set of CDs/DVDs/BDs, you will probably be asked to insert specific discs at several points during the upgrade. You might have to insert the same disc multiple times; this is due to inter-related packages that have been spread out over the discs.
New versions of currently installed packages that cannot be upgraded
without changing the install status of another package will be left at
their current version (displayed as »held back«). This can be resolved
by either using aptitude
to choose these packages for installation
or by trying apt install package
.
4.5. Mulige problemstillinger under opgradering
The following sections describe known issues that might appear during an upgrade to trixie.
4.5.1. Full-upgrade fails with »Could not perform immediate configuration«
In some cases the apt full-upgrade
step can fail after downloading
packages with:
E: Could not perform immediate configuration on 'package'. Please see man 5 apt.conf under APT::Immediate-Configure for details.
If that happens, running
apt full-upgrade -o APT::Immediate-Configure=0
instead should allow the upgrade to proceed.
Another possible workaround for this problem is to temporarily add both
bookworm and trixie sources to your APT sources files and
run apt update
.
4.5.2. Forventede fjernelser
The upgrade process to trixie might ask for the removal of packages on the system. The precise list of packages will vary depending on the set of packages that you have installed. These release notes give general advice on these removals, but if in doubt, it is recommended that you examine the package removals proposed by each method before proceeding. For more information about packages obsoleted in trixie, see Obsolete packages.
4.5.3. Konflikter eller forhåndsafhængige (Pre-Depends) loop
Undertiden er det nødvendigt at aktivere tilvalget APT::Force-LoopBreak
i ATP for midlertidigt at kunne fjerne en essentiel pakke på grund af en konflikt/forhåndsafhængig loop. apt
vil påminde dig om dette og afbryde opgraderingen. Du kan omgå dette ved at angive tilvalget -o APT::Force-LoopBreak=1
på kommandolinjen for apt
.
It is possible that a system’s dependency structure can be so corrupt as
to require manual intervention. Usually this means using apt
or
# dpkg --remove package_name
for at eliminere nogle af de stridende pakker, eller
# apt -f install
# dpkg --configure --pending
I ekstreme tilfælde kan det være nødvendigt at fremtvinge reinstallation med en kommando som
# dpkg --install /path/to/package_name.deb
4.5.4. Filkonflikter
Filkonflikter bør ikke opstå hvis du opgraderer fra et »rent« bookworm-system, men kan opstå hvis du har uofficielle backports installeret. En filkonflikt vil resultere i en fejl såsom:
Unpacking <package-foo> (from <package-foo-file>) ...
dpkg: error processing <package-foo> (--install):
trying to overwrite `<some-file-name>',
which is also in package <package-bar>
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
<package-foo>
Du kan forsøge at løse en filkonflikt ved med tvang at fjerne pakken nævnt på den sidste linje i fejlbeskeden:
# dpkg -r --force-depends package_name
After fixing things up, you should be able to resume the upgrade by
repeating the previously described apt
commands.
4.5.5. Konfigurationsændringer
Under opgraderingen vil du blive stillet nogle spørgsmål angående konfigurationen eller omkonfigurationen af flere pakker. Når du bliver spurgt om en fil i mappen /etc/init.d
eller filen /etc/manpath.config
skal erstattes af pakkevedligeholderens version, så er det normalt nødvendigt at svare »ja« for at sikre systemkonsistens. Du kan altid vende tilbage til de ældre versioner, da de bliver gemt med filendelsen .dpkg-old
.
Hvis du ikke er sikker på, hvad du skal gøre, så skriv navnet på pakken eller filen ned og udred så problemstillingen senere. Du kan søge i typescript-filen for at gennemse informationen på skærmen fra opgraderingen.
4.5.6. Ændring af session til konsol
If you are running the upgrade using the system’s local console you might find that at some points during the upgrade the console is shifted over to a different view and you lose visibility of the upgrade process. For example, this may happen in systems with a graphical interface when the display manager is restarted.
To recover the console where the upgrade was running you will have to
use Ctrl+Alt+F1
(if in the graphical startup screen) or Alt+F1
(if in
the local text-mode console) to switch back to the virtual terminal 1.
Replace F1
with the function key with the same number as the virtual
terminal the upgrade was running in. You can also use Alt+Left Arrow
or
Alt+Right Arrow
to switch between the different text-mode terminals.
4.7. Cleanup after the upgrade
Two steps are recommended to clean the upgraded distribution.
Remove newly redundant or obsolete packages as described in Make sure you have sufficient space for the upgrade and Obsolete packages. You should review which configuration files they use and consider purging the packages to remove their configuration files. See also Purging removed packages.
Upgrade your APT sources. APT is deprecating the old format used for specifying what repositories to use - see Preparing APT sources files and sources.list(5). If you haven’t already switched all your configuration files, you can use the new
apt
featureapt modernize-sources
.
4.8. Cleaning up automatically installed packages
Some packages may have been only installed an your system as dependencies of other packages. With the new release these dependencies could have changed and apt will propose to remove those automatically installed packages. For this run:
# apt autoremove
4.9. Forældede pakker
Introducing lots of new packages, trixie also retires and omits quite a few old packages that were in bookworm. It provides no upgrade path for these obsolete packages. While nothing prevents you from continuing to use an obsolete package where desired, the Debian project will usually discontinue security support for it a year after trixie’s release [5], and will not normally provide other support in the meantime. Replacing them with available alternatives, if any, is recommended.
Der kan være mange årsager til at pakker er blevet fjernet fra distributionen: De bliver ikke længere vedligeholdt opstrøms, der er ikke længere en Debianudvikler interesseret i at vedligeholde pakkerne; funktionaliteten de tilbyder er blevet efterfulgt af andre programmer (eller en ny version); eller de anses ikke længere for at være egnet for trixie på grund af fejl i dem. I det sidste tilfælde, kan pakker stadig være til stede i distributionen »unstable«.
»Obsolete and Locally Created Packages« can be listed and purged from the commandline with:
$ apt list '?obsolete'
# apt purge '?obsolete'
Debians fejlsporingssystem tilbyder ofte yderligere information om hvorfor pakkerne blev fjernet. Du bør gennemse både de arkiverede fejlrapporter for selve pakken og de arkiverede fejlrapporter for ftp.debian.org pseudo-package.
For a list of obsolete packages for trixie, please refer to Værd at bemærke forældede pakker.
4.9.1. Fuld fjernelse af afinstallerede pakker
Det er generelt et godt råd at fjerne afinstallerde pakker. Dette gælder specielt hvis de er blevet afinstalleret i en tidligere udgivelsesopgradering f.eks. fra opgraderingen til bookworm) eller de kom fra en tredjeparts leverandør. Specielt gamle init.d-skripter vides at kunne medføre problemer.
Forsigtig
Fuld fjernelse af en pakke vil generelt også fjerne logfilerne, så du vil skulle lave en sikkerhedskopi af dem først.
Den følgende kommando viser en liste over alle fjernede pakker, som kan have konfigurationsfiler tilbage på systemet (hvis nogen):
$ apt list '?config-files'
The packages can be removed by using apt purge
.
Assuming you want to purge all of them in one go, you can
use the following command:
# apt purge '?config-files'
4.9.2. Transitional dummy packages
Some packages from bookworm may have been replaced in trixie by transitional dummy packages, which are empty placeholders designed to simplify upgrades. If for instance an application that was formerly a single package has been split into several, a transitional package may be provided with the same name as the old package and with appropriate dependencies to cause the new ones to be installed. After this has happened the redundant dummy package can be safely removed.
The package descriptions for transitional dummy packages usually indicate their purpose. However, they are not uniform; in particular, some »dummy« packages are designed to be kept installed, in order to pull in a full software suite, or track the current latest version of some program.