4. Aktualizácie z Debian 12 (bookworm)
4.1. Príprava na aktualizáciu
Odporúčame, aby ste si pred aktualizáciou prečítali aj informácie v časti Problémy vyskytujúce sa v trixie, ktorá pokrýva možné problémy nie priamo sa týkajúce procesu aktualizácie, ale o ktorých je dôležité vedieť predtým, než začnete.
4.1.1. Zálohujte všetky dáta a konfiguračné údaje
Dôrazne odporúčame, aby ste pred aktualizáciou systému vykonali úplnú zálohu alebo aspoň zálohovali všetky dáta a konfiguračné údaje, ktoré si nemôžete dovoliť stratiť. Aktualizačné nástroje a proces aktualizácie sú dosť spoľahlivé, ale chyba hardvéru uprostred aktualizácie môže spôsobiť ťažké poškodenie systému.
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.
Samotný proces aktualizácie nemení nič v adresári /home. Ale niektoré aplikácie (napr. časti balíka Mozilla a pracovné prostredia GNOME a KDE) prepisujú existujúce nastavenia používateľa novými štandardnými hodnotami, keď používateľ prvýkrát spustí novú verziu aplikácie. Preventívne si môžete urobiť zálohu skrytých súborov a adresárov (súbory začínajúce bodkou) v domovských adresároch používateľov. Táto záloha môže pomôcť v obnovení alebo opätovnom vytvorení pôvodných nastavení. Tiež o tom možno budete chcieť informovať používateľov.
Všetky operácie inštalácie balíkov musíte spúšťať s oprávnením superpoužívateľa, takže sa buď prihláste ako root alebo použite príkaz su alebo sudo na získanie potrebných oprávnení.
Aktualizácia má niekoľko predpokladov. Pred jej vykonaním by ste mali skontrolovať, či sú splnené.
4.1.2. Vopred informujte používateľov
Je rozumné informovať všetkých používateľov o plánovaných aktualizáciách, hoci používatelia pristupujúci k systému pomocou ssh pripojenia by si toho počas aktualizácie nemuseli mnoho všimnúť a mali by byť schopní pokračovať v práci.
Ak si želáte vykonať ďalšie opatrenia, pred aktualizáciou zálohujte alebo odpojte /home.
Pri aktualizácii na trixie budete musieť vykonať aktualizáciu jadra, takže bude potrebné reštartovať systém. Spravidla sa to robí po dokončení aktualizácie.
4.1.3. Pripravte sa na odstávku služieb
Výš systém môže ponúkať služby poskytované balíkmi, ktoré sa budú aktualizovať. V tom prípade, prosím, pamätajte, že počas aktualizácie budú služby zastavené, pokým sa príslušné balíky nenahradia a nenakonfigurujú. V tejto dobe tieto službu nebudú dostupné.
Presná odstávka týchto služieb bude závisieť na počte balíkov systému, ktoré sa aktualizujú a predĺži sa tiež o čas, ktorý bude správca potrebovať na to, aby odpovedal na konfiguračné otázky od rôznych aktualizovaných balíkov (ak sa vyskytnú). Pamätajte, že ak necháte bežať proces aktualizácie bez dozoru a systém bude počas aktualizácie požadovať vstup, je veľká pravdepodobnosť nedostupnosti služieb [1] po nezanedbateľnú dobu.
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. Pripravte sa na obnovu
Hoci Debian sa snaží zabezpečiť, aby váš systém zostal po celú dobu v spustiteľnom stave, vždy existuje riziko, že po reštartovaní systému po aktualizácii môžete naraziť na problémy. Známe potenciálne problémy sú zdokumentované v tejto a ďalšej kapitole týchto Poznámok k vydaniu.
Z toho dôvodu sa uistite, že budete schopní obnoviť systém v prípade, že sa mu nepodarí znova naštartovať alebo, v prípade systémov spravovaných na diaľku, ak sa nepodarí aktivovať sieťové pripojenie.
Ak vykonávate vzdialenú aktualizáciu prostredníctvom spojenia ssh, odporúčame, aby ste vykonali nutné opatrenia, aby ste mali prístup k serveru prostredníctvom vzdialeného sériového terminálu. Existuje totiž možnosť, že po aktualizácii jadra a reštartovaní budete musieť opraviť konfiguráciu systému z lokálnej konzoly. Tiež v prípade, že sa systém náhodou uprostred aktualizácie reštartuje, existuje možnosť, že budete musieť opraviť konfiguráciu systému z lokálnej konzoly.
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. Ladiaci shell počas štartu pomocou initrd
Balík initramfs-tools obsahuje ladiaci shell [3] v obrazoch initrd, ktoré generuje. Ak napríklad initrd nie je schopný pripojiť váš koreňový súborový systém, dostanete sa do tohto ladiaceho shellu, ktorý má základné príkazy na to, aby vám pomohol vystopovať problém a prípadne ho opraviť.
Základné veci, ktoré by ste mali skontrolovať: prítomnosť správnych súborov zariadení v /dev; aké moduly sú načítané (cat /proc/modules); chyby pri načítaní ovládačov vo výstupe dmesg. Výstup príkazu dmesg vám tiež ukáže ktoré súbory zariadení boli pridelené ktorým diskom; mali by ste si to overiť porovnaním s výstupom echo $ROOT, aby ste sa uistili, že koreňový systém je na zariadení, na ktorom ho očakávate.
Ak sa vám podarí opraviť problém, napísaním exit opustíte ladiaci shell a proces zavádzania bude pokračovať od bodu, kde bol prerušený. Samozrejme budete tiež musieť opraviť podstatu problému a znova vytvoriť initrd, aby nasledujúci štart už nezlyhal.
4.1.4.2. Ladiaci shell počas štartu pomocou systemd
Ak zavedenie systému pod systemd zlyhá, je root shell na ladenie získate zmenou príkazového riadka jadra. Ak zavedenie systému ako také uspeje, ale nepodarí sa spustiť niektoré služby, môže byť užitočné pridať k parametrom jadra systemd.unit=rescue.target.
V opačnom vám prípade parameter jadra systemd.unit=emergency.target poskytne root shell v najbližšom možnom momente. Toto sa však deje pred pripojením koreňového súborového systému s povoleniami na čítanie aj zápis. To budete musieť urobiť ručne pomocou:
# 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. Pripravte bezpečné prostredie na aktualizáciu
Dôležité
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.
In case tmux was upgraded to a new major version you may get an error on attach:
„open terminal failed: not a terminal“. You can still access the old session with:
# /proc/$(pgrep "tmux: server")/exe attach
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 Ako aktualizovať váš systém bookworm.
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.
Upozornenie
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. Sekcia 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. Neoficiálne zdroje
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. Vypnite pripevňovanie balíkov APT (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
Bez ohľadu na použitú metódu aktualizácie sa odporúča, aby ste najskôr skontrolovali stav všetkých balíkov a overili, že sú v stave, aby sa dali aktualizovať. Nasledovný príkaz zobrazí všetky balíky, ktoré sú v stave „napoly inštalovaný“ alebo „konfigurácia zlyhala“ a všetky ostatné s chybovým stavom.
$ dpkg --audit
You could also inspect the state of all packages on your system using
aptitude or with commands such as
$ dpkg -l
alebo
# dpkg --get-selections '*' > ~/curr-pkgs.txt
Alternatively you can also use apt.
# apt list --installed > ~/curr-pkgs.txt
It is desirable to remove any holds before upgrading. If any package that is essential for the upgrade is on hold, the upgrade will fail.
$ apt-mark showhold
Ak ste zmenili alebo prekompilovali balík lokálne a nepremenovali ste ho alebo ste dali do verzie epochu, musíte ho podržať, aby sa neaktualizoval.
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 poskytuje dve poštové konferencie s oznámeniami, ktoré vás informujú o relevantných informáciách týkajúcich sa vydaní Debianu.
Po prihlásení sa k odberu poštovej konferencie oznámení Debianu budete dostávať oznámenie vždy, keď Debian uvoľní nové vydanie. Napr. keď sa „trixie“ zmení zo „testing“ na „stable“.
Po prihlásení sa k odberu poštovej konferencie bezpečnostných oznámení budete dostávať oznámenie vždy, keď Debian zverejní oznámenie týkajúce sa bezpečnosti.
4.3.1. Pridávanie internetových zdrojov APT
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. Pridanie zdrojov APT lokálneho zrkadla
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).
Napríklad, ak máte zrkadlo balíkov vo /var/local/debian/ a adresárová štruktúra je nasledovná:
/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. Pridanie zdrojov APT z optických médií
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.
Uistite sa, že sa v súbore /etc/fstab nachádza riadok, ktorý umožňuje pripojiť vašu mechaniku CD-ROM na prípojný bod /media/cdrom. Napríklad, ak je vaša mechanika CD-ROM /dev/sr0, /etc/fstab by mal obsahovať takýto riadok:
/dev/sr0 /media/cdrom auto noauto,ro 0 0
Pamätajte, že medzi slovami noauto,ro v štvrtom poli nesmú byť žiadne medzery.
Overte, že to funguje tak, že vložíte CD a skúsite spustiť
# 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
Potom spustite:
# apt-cdrom add
pre každé binárne CD Debianu, ktoré máte, čím sa pridajú údaje o každom CD do databázy APT.
4.4. Aktualizácia balíkov
The recommended way to upgrade from previous Debian releases is to use
the package management tool apt.
Poznámka
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.
Nezabudnite pripojiť všetky potrebné diskové oblasti (predovšetkým koreňovú oblasť a oblasť obsahujúcu /usr) na zápis pomocou príkazu ako:
# 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.
Poznámka
Sources lines for a CD-ROM might sometimes refer to „unstable“;
although this may be confusing, you should not change it.
4.4.1. Nahranie relácie príkazového riadka
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. Aktualizácia zoznamu balíkov
Najprv je potrebné stiahnuť zoznam dostupných balíkov nového vydania. To spravíte príkazom:
# apt update
4.4.3. Uistite sa, že na aktualizáciu máte dosť miesta na disku
You have to make sure before upgrading your system that you will have
sufficient hard disk space when you start the full system upgrade
described in Upgrading the system. First, any
package needed for installation that is fetched from the network is
stored in /var/cache/apt/archives (and the partial/
subdirectory, during download), so you must make sure you have enough
space on the file system partition that holds /var/ to temporarily
download the packages that will be installed in your system. After the
download, you will probably need more space in other file system
partitions in order to both install upgraded packages (which might
contain bigger binaries or more data) and new packages that will be
pulled in for the upgrade. If your system does not have sufficient space
you might end up with an incomplete upgrade that is difficult to recover
from.
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.
Poznámka
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/.
In this situation, make sure you free up space beforehand. You can:
Remove packages that have been previously downloaded for installation (at
/var/cache/apt/archives). Cleaning up the package cache by runningapt cleanwill remove all previously downloaded package files.Remove forgotten packages. If you have used
aptitudeoraptto 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
debfosterto 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.Odstráňte balíky, ktoré zaberajú príliš mnoho miesta a momentálne nie sú potrebné (po aktualizácii ich môžete vždy nainštalovať). Ak máte nainštalovaný popularity-contest, môžete použiť príkaz
popcon-largest-unusedna vypísanie zoznamu balíkov, ktoré nepoužívate a ktoré zaberajú najviac miesta. Balíky, ktoré len zaberajú najviac miesta na disku nájdete pomocoudpigs(dostupné v balíku debian-goodies) alebowajig(príkazomwajig size). Tiež sa dajú nájsť pomocou aptitude. Spustiteaptitudev celoobrazovkovom režime, vybertePohľady > Nový Plochý Zoznam Balíkov, stlačtela zadajte~i, potom stlačteSa zadajte~installsize. To vám dá šikovný zoznam, s ktorým môžete ďalej pracovať.Odstrániť preklady a lokalizačné súbory zo systému, ak nie sú potrebné. Možete nainštalovať balík localepurge a nastaviť ho, aby ponechal na systéme iba niekoľko vybraných locales. Tým sa zníži využité miesto na disku, ktoré zaberá
/usr/share/locale.Dočasne presunúť na iný systém alebo natrvalo odstrániť systémové záznamy nachádzajúce sa vo
/var/log/.Použiť dočasný adresár
/var/cache/apt/archives: Môžete použiť dočasný adresár pre vyrovnávaciu pamäť na inom súborovom systéme (USB pamäť, dočasný pevný disk, už používaný súborový systém, …).Poznámka
Nepoužívajte prípojný bod NFS, pretože sieťové pripojenie sa môže počas aktualizácie prerušiť.
Napríklad, ak máte USB pamäť pripojenú na
/media/usbkey:odstráňte balíky, ktoré boli doteraz stiahnuté na inštaláciu:
# apt clean
skopírujte adresár
/var/cache/apt/archivesna USB pamäť:# cp -ax /var/cache/apt/archives /media/usbkey/
pripojte dočasný adresár vyrovnávacej pamäte balíkov na aktuálny:
# mount --bind /media/usbkey/archives /var/cache/apt/archives
po aktualizácii obnovte pôvodný adresár
/var/cache/apt/archives:# umount /var/cache/apt/archives
odstráňte zostávajúce
/media/usbkey/archives.
Dočasný adresár vyrovnávacej pamäte balíkov môžete vytvoriť na ľubovoľnom pripojenom súborovom systéme.
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. Minimálna aktualizácia systému
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.
Najprv spustite:
# apt upgrade --without-new-pkgs
Toto aktualizuje tie balíky, ktoré je možné aktualizovať bez nutnosti odstránenia alebo inštalácie iných balíkov.
Minimálna aktualizácia systému tiež môže byť užitočná v prípade, keď má systém málo miesta a úplnú aktualizáciu nemožno spustiť z dôvodu obmedzeného miesta.
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. Aktualizácia systému
Po dokončení týchto krokov budete pripravený pokračovať v hlavnej časti aktualizácie. Spustite:
# apt full-upgrade
Tým sa vykoná kompletná aktualizácia systému, nainštalujú sa najnovšie dostupné verzie všetkých balíkov a vyriešia sa všetky možné zmeny závislostí medzi balíkmi v rôznych vydaniach. Ak je to potrebné, nainštalujú sa niektoré nové balíky (zvyčajne nové verzie knižníc a premenované balíky) a odstránia sa všetky konfliktné zastaralé balíky.
Pri aktualizácii z diskov CD/DVD/BD vás systém požiada o vloženie niektorých konkrétnych diskov niekoľkokrát počas aktualizácie. Je možné, že budete musieť vložiť rovnaký disk viac než raz; to je z dôvodu navzájom závisiacich balíkov, ktoré sa nachádzajú na rôznych diskoch.
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. Možné problémy počas aktualizácie
Nasledovné oddiely popisujú známe problémy, ktoré sa môžu vyskytnúť pri aktualizácii na 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. Očakávané odstránenia
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. Cykly Konfliktov alebo Predzávislostí
Sometimes it’s necessary to enable the APT::Force-LoopBreak option
in APT to be able to temporarily remove an essential package due to a
Conflicts/Pre-Depends loop. apt will alert you of this and abort the
upgrade. You can work around this by specifying the option
-o APT::Force-LoopBreak=1 on the apt command line.
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
na odstránenie niektorých z konfliktných balíkov alebo
# apt -f install
# dpkg --configure --pending
V extrémnych prípadoch budete musieť vynútiť reinštaláciu príkazom typu
# dpkg --install /path/to/package_name.deb
4.5.4. Konflikty súborov
File conflicts should not occur if you upgrade from a „pure“ bookworm system, but can occur if you have unofficial backports installed. A file conflict will result in an error like:
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>
You can try to solve a file conflict by forcibly removing the package mentioned on the last line of the error message:
# 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. Zmeny v konfigurácii
Počas aktualizácie dostanete otázky týkajúce sa konfigurácie alebo rekonfigurácie niekoľkých balíkov. Po otázke, či nejaký súbor z adresára /etc/init.d alebo /etc/manpath.config má byť nahradený verziou od správcu balíka je zvyčajne potrebné odpovedať „áno“, aby ste zaistili konzistenciu systému. Kedykoľvek môžete vrátiť staršie verzie, pretože sa uložia s príponou .dpkg-old.
If you’re not sure what to do, write down the name of the package or file and sort things out at a later time. You can search in the typescript file to review the information that was on the screen during the upgrade.
4.5.6. Zmena relácie na konzolu
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.
Na návrat na konzolu s bežiacou aktualizáciou budete musieť použiť Ctrl+Alt+F1 (ak ste na grafickej štartovacej obrazovke) alebo Alt+F1 (ak ste na lokálnej obrazovke v textovom režme), čo vás prepne späť na virtuálny terminál 1. Nahraďte F1 funkčným klávesom s číslom zodpovedajúcim virtuálnemu terminálu, na ktorom bežala aktualizácia. Tiež môžete použiť Alt+šípka-vľavo alebo Alt+šípka-vpravo na prepínanie medzi susednými terminálmi v textovom režime.
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
aptfeatureapt 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. Zastaralé balíky
Okrem toho, že trixie prináša mnoho nových balíkov, tiež odstraňuje dosť veľa starých balíkov, ktoré obsahovalo vydanie bookworm. Neposkytuje pre tieto zastaralé balíky žiadnu aktualizačnú cestu. Hoci vám nič nebráni naďalej používať zastarané balíky, projekt Debian zvyčajne prestane poskytovať podporu bezpečnostných aktualizácií jeden rok po vydaní trixie [5] a medzitým zvyčajne neposkytuje inú podporu. Preto sa odporúča nahradiť ich alternatívami ak sú nejaké dostupné.
Existuje mnoho dôvodov, prečo môžu byť balíky z distribúcie odstránené: ich pôvodný autor ich už nespravuje; ich správa už nezaujíma vývojára Debianu; funkcionalitu, ktorú poskytujú nahradil iný softvér (alebo novšia verzia); alebo už sa nepovažujú za vhodné vo vydaní trixie z dôvodu chýb. V poslednom prípade môže distribúcia „unstable“ naďalej obsahovať tieto balíky.
„Obsolete and Locally Created Packages“ can be listed and purged from the commandline with:
$ apt list '?obsolete'
# apt purge '?obsolete'
Systém sledovania chýb Debianu často poskytne ďalšie informácie o tom, prečo bol balík odstránený. Mali by ste si prečítať archivované hlásenia chýb samotného balíka aj archivované hlásenia chýb pseudobalíka ftp.debian.org.
Zoznam zastaralých balíkov v trixie nájdete v Významné zastaralé balíky.
4.9.1. Vyčistenie (purge) odstránených balíkov
Vo všeobecnosti sa odporúča na vyčistenie odstránených balíkov. To platí najmä, ak boli balíky odstránené v predchádzajúcich aktualizáciách vydania (napr. počas aktualizácie na bookworm) alebo pochádzajú od tretích strán. Najmä o starých skriptoch init.d je známe, že spôsobujú problémy.
Upozornenie
Vyčistenie balíka zvyčajne vymaže jeho súbory protokolu, preto si ich najskôr zálohujte.
Nasledovný príkaz zobrazí zoznam všetkých odstránených balíkov, ktoré mohli zanechať v systéme konfiguračné súbory (ak ich používajú):
$ 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.