From Fedora Project Wiki
(Начало перевода)
 
m (internal link cleaning)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Draft}}
=Обновление Fedora  с помощью yum=
 
{{autolang}}


Эта страница содержит инструкцию по обновлению  Fedora с помощью {{command|yum}}.
Эта страница содержит инструкцию по обновлению  Fedora с помощью {{command|yum}}.


{{admon/caution|Несмотря на то что обновление с помощью yum было протестировано и работает, live обновление не рекомендовано проектом Fedora.  Если вы не готовы решать возникающие проблемы, если что то пойдёт не так, тогда вам лучше использовать рекомендованный метод повторной установки.}}
__TOC__


Рекомендованный метод установки с помощью загрузочного носителя с установщиком Anaconda описан в [http://docs.fedoraproject.org/install-guide/ Инструкции по установке EN]. [[PreUpgrade]] является другим способом при котором все пакеты загружаются прежде чем система перезагрузится для запуска установщика  Anaconda.
{{admon/warning| Обновление версий без использования anaconda - такие как метод с использованием yum, описанный ниже - является не поддерживаемым и не рекомендуется! |


<!--
Рекомендуемым методом установки является использование загрузочного носителяс установщиком Anaconda, как описано в [http://docs.fedoraproject.org/install-guide/ Руководстве по установке] или с использованием [[PreUpgrade]]. [[PreUpgrade]] является слегка отличающимся методом обновления, при котором все пакеты скачиваются перед перезагрузкой системы в редим установщика Anaconda.
When upgrading with yum you don't get any help from Anaconda, but if you are lucky you might be able to upgrade systems remotely over ssh and with limited downtime. (You will still need to reboot to get the new kernel and system libraries/services running) Rebooting after such an upgrade is always very exciting.


A live upgrade with yum usually works well with a typical installation and when following the advice below.  
Несмотря на то, что обновление с помощью yum работает, оно не до конца протестировано в рамках процесса выпуска релизова командой [[QA|Fedora QA]] и не задокументированно в [http://docs.fedoraproject.org/en-US/Fedora/{{FedoraVersion}}/html/Installation_Guide/index.html  Руководстве по установке]]. Если вы не готовы к самостоятельному решению возможных проблем, вам лучше использовать рекомедуемые методы установки.}}


== Participate ==
Рекомендованный метод установки с помощью загрузочного носителя с установщиком Anaconda описан в [http://docs.fedoraproject.org/install-guide/ Инструкции по установке EN]. [[PreUpgrade]] является другим способом при котором все пакеты загружаются прежде, чем система перезагрузится для запуска установщика  Anaconda.


If you are upgrading using Yum and it shows up any general dependency issues, please file them in http://bugzilla.redhat.com. But please read this page and all references pages and search the mailing list archives before filing bugs. And of course, please help keeping this page updated.
При обновлении с помощью yum вы не получите никакой помощи от программы установки Anaconda, но при удачном стечении обстоятельств сможете обновить систему удалённо, через ssh, с ограниченным временем простоя системы. (Хотя, по-прежнему, потребуется перезагрузка системы, что бы загрузилось новое ядро, а также системные библиотеки/сервисы).  


If you want to help make live upgrades work smoothly, join the [[SIGs/LiveUpgrade Live Upgrade Special Interest Group]].
Live-обновление с помощью yum обычно работает на стандартных установках Fedora при применении нижеследующих советов.


== Instructions to upgrade using yum ==
== Ваше участие ==


=== 0. Back up your system ===
Если при обновлении с помощью Yum обнаруживается какая-либо проблема с зависимостями пакетов, пожалуйста, отправьте отчет об этом в http://bugzilla.redhat.com. Но, пожалуйста, прочитайте сначала данную страницу и все страницы, на которые мы ссылаемся, а также просмотрите архив списка рассылки прежде, чем заполнять отчет об ошибке. И конечно помогите, пожалуйста, сохранить данную страницу в актуальном состоянии.


Back up any personal data to an external hard drive or to another machine. If there is some unrecoverable error that requires a fresh install, you don't want to lose any data.
Если вы хотите помочь сделать процесс live обновления более простым, присоединяйтесь к [[SIGs/LiveUpgrade|группе по интересам "Live Upgrade" ("Live обновление")]].


=== 1. Read about common problems ===
== Инструкции по обновлению с помощью yum ==


Further down in this page there's a list of common problems for specific versions. Some of them require attention before the upgrade.
=== 0. Выполните резервное копирование ===


General advice on upgrading Fedora can be found on the [[Upgrading]] page. You should also read the [http://docs.fedoraproject.org/install-guide/ Installation Guide] and [http://docs.fedoraproject.org/release-notes/ Release Notes] for the version you upgrade to - they contain important information regarding upgrading issues. Finally, check the list of [[Common {{FedoraVersion|short}} bugs]].
Выполните резервное копирование любых личных данных на внешний жесткий диск или на другой компьютер. Если возникнет неустранимая ошибка и потребуется новая установка, вы не потеряете никаких данных.


=== 2. Clean Stuff ===
=== 1. Прочитайте о возможных проблемах ===


Review and remove all .rpmsave and .rpmnew files before and after upgrading. (And if you have selinux enabled then remember to check security context if you move config files around.)
Ниже приведен список основных проблем специфичных для каждой версии. Некоторые из них требуют внимания прежде, чем приступить к обновлению.


{{admon/tip|Find unused config files|Merge and resolve the changes found by the following script: <code>for a in $(find /etc /var -name '*.rpm?*'); do diff -u $a ${a%.rpm?*}; done</code>.}}
Общие советы по обновлению Fedora можно найти на странице [[Upgrading]]. Необходимо прочитать [http://docs.fedoraproject.org/install-guide/ Руководство по установке] и [http://docs.fedoraproject.org/release-notes/ Замечания к выпуску] для версии, до которой вы обновляетесь, - здесь может содержаться важная информация о возможных проблемах при обновлении. Наконец, просмотрите список [[Common {{FedoraVersion|short}} bugs| Распространенные ошибки {{FedoraVersion|short}}]].


Now is a good time to remove packages you don't use - especially non-standard packages.
=== 2. Приготовления ===


{{admon/tip|Find and review "unused" packages| You can find packages not required by other packages with the tool <code>package-cleanup</code> from the <code>yum-utils</code> package: <code>yum install yum-utils; package-cleanup --leaves</code>. These packages could be candidates for removal, but check if you use them directly or if they are used by applications not backed by rpm packages. Remove them with <code>yum remove package-name-and-version</code>.  
Просмотрите и удалите все файлы .rpmsave и .rpmnew прежде, чем приступить к обновлению. (И, если selinux активирован, проверьте его настройки).
 
{{admon/tip|Отыщите неиспользуемые конфигурационные файлы | Объедините и решите изменения с помощью следующего скрипта: <code>for a in $(find /etc /var -name '*.rpm?*'); do diff -u $a ${a%.rpm?*}; done</code>.}}
 
Теперь необходимо удалить пакеты, которые вы не используете,  - особенно, если это нестандартные пакеты.
 
{{admon/tip|Отыщите и просмотрите "неиспользуемые" пакеты| Вы можете найти пакеты, которые не нужны другим пакетам, с помощью инструмента <code>package-cleanup</code> из пакета <code>yum-utils</code>: <code>yum install yum-utils; package-cleanup --leaves</code>. Вы можете решить, что эти пакеты являются кандидатами на удаление, но необходимо проверить, что эти пакеты не используются лично вами и что они не используются приложениями установленными без помощи rpm. Если это так, то удалите их с помощью <code>yum remove имя-пакета-и-его-версия</code>.  
}}
}}


{{admon/tip|Find and review "lost" packages| You can find orphaned packages (ie packages not in the repositories anymore) with: <code>package-cleanup --orphans</code>. This will also show packages which have been partially uninstalled but where the "%postun" script failed.}}
{{admon/tip|Отыщите и просмотрите "потерянные" пакеты| Вы можете найти устаревшие пакеты (например, пакеты, которые больше не располагаются в репозитариях) с помощью: <code>package-cleanup --orphans</code>. Эта команда отобразит пакеты, которые были частично удалены, но для которых выполнение "%postun" скрипта окончилось неудачей.}}


Make sure you have the <code>yum-fastestmirror</code> package installed so that yum uses the "best" mirror.
Убедитесь, что пакет <code>yum-fastestmirror</code> был установлен, для того, чтобы использовать самое быстрое зеркало для скачки пакетов.


<pre>
<pre>
Line 49: Line 56:
</pre>
</pre>


Then remove all traces of the version you are leaving from the yum cache in <code>/var/cache/yum</code>.
Затем удалите все следы текущей версии, оставшиеся в кэше <code>/var/cache/yum</code>.


<pre>
<pre>
Line 55: Line 62:
</pre>
</pre>


=== 3. Switch repositories ===
=== 3. Переключение репозитариев ===


Update the packages that decide which yum repositories to use.
Обновите пакеты, которые должен использовать yum.


<pre>
<pre>
Line 63: Line 70:
</pre>
</pre>


(The architecture doesn't matter for this <code>noarch</code> package.)
(Архитектура не имеет значения для пакета <code>noarch</code> .)


'''Note:''' Some users have reported that attempting to download through rpm returns a response 550 and "transfer failed" messagesIf this is the case, you can download the rpms and install locally.  Consider:
'''Note:''' Некоторые пользователи говорят, что при попытке скачать эти файлы с помощью rpm получают ответ 550 и сообщение "transfer failed".  Если вы столкнулись с этим, вы можете загрузить rpms файл и установить его вручную, например, следующим образом:
<pre>
<pre>
wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/<ReleaseNumber>/Fedora/<Arch>/os/Packages/fedora-release-*.noarch.rpm
wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/<ReleaseNumber>/Fedora/<Arch>/os/Packages/fedora-release-*.noarch.rpm
Line 71: Line 78:
</pre>
</pre>


Make sure the new repo files isn't placed as <code>.rpmnew</code> files, perhaps by
Убедитесь, что новые repo файлы не расположены в файлах <code>.rpmnew</code>, например, с помощью


<pre>
<pre>
Line 78: Line 85:
</pre>
</pre>


If you have 3rd party repositories configured, you may need to adjust them for the new Fedora version. If you switch from one Fedora release to another there is often nothing that needs to be done. If you switch to Rawhide from a standard Fedora release (or vice versa) then you most of the time need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).
Если вы используете репозитарии третьесторонних производителей, может потребоваться их настройка для новой версии Fedora. Если же вы обновляетесь с одного выпуска Fedora к другому, в большинстве случаев ничего делать не придётся. If you switch to Rawhide from a standard Fedora release (or vice versa) then you most of the time need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).


Note that the upgrade is likely to fail if there are outdated dependencies from packages not backed by a yum repository or backed by a repository which isn't ready for the new version.
Отметим, что обновление может окончиться неудачей, если установлены устаревшие зависимые пакеты, которые не существуют в репозитарии.


=== 4. Do the upgrade ===


If using selinux make sure it is in permissive mode - neither disabled nor enforcing.
=== 4. Выполните обновление===


It is a good idea to do the upgrade outside the graphical environment. Log out of your graphical desktop and then go to a text console
Если у вас подключены сторонние репозитории, возможно вам понадобится y настроить их для новой версии Fedora. Если вы обновляетесь с одного релиза до другого, то обычно ничего делать не приходится. Если вы обновляетесь с текущего релиза до Rawhide (или наоборот), то большую часть времени вам придется устанавливать пакеты Rawhide из сторононнего репозитория (или, наоборот, стандартные пакеты в обратном случае).
 
Обратите внимание, что обновление может пойти не так как нужно при наличии устаревших зависимостей для пакетов, которые не поддерживаются с помощью yum в репозитории или для которых не готовы новые версии.
 
Хорошей идеей считается обновлнеие вне графической оболочки. Выйдите из графического режима и выполняйте следующие шаги.
 
==== Перейдите в текстовую консоль ====


<pre>
<pre>
Line 92: Line 104:
</pre>
</pre>


log in as root, and go into runlevel 3
(или)
 
зайдите как root (суперпользователь) и перейдите в runlevel 3


<pre>
<pre>
telinit 3
init 3
</pre>
</pre>


{{admon/warning|Once a live upgrade is started do not stop the upgrade by rebooting, killing the process, or by any other method until it is complete, doing so will cause the affected system to be in a mixed state. Partially the old release and partially the new release.  In this state the system will not be reliable and will not operate as expected.  The only way to recover from this is to reinstall if it occurs.}}
==== Обновите yum до последней версии, доступной для вашей версии Fedora====
 
<pre>
yum update yum
</pre>
 
==== Установите новый gpg-ключ Fedora для версии, до которой собираетесь обновиться====
 
Вы можете найти ключи и проверить их на странице
 
https://fedoraproject.org/keys
 
или читайте инструкции по обновлению отдельных версий ниже.
 
==== Очистите кеш ====
 
Затем удалите все следы той версии, с которой вы обновляетесь, из кеша yum <code>/var/cache/yum</code>.


{{admon/tip|Update important packages first| You can start try to update the update machinery first with <code>yum update rpm\* yum\*</code>. Another idea is to start with <code>glibc</code>. In both cases dependencies might however expand it to an almost full upgrade anyway. And doing a full upgrade might be more safe. YMMV. (In particular, do not upgrade rpm and yum separately if upgrading to a system with a different version of python e.g. 2.4 to 2.5.)
<pre>
}}
yum clean all
</pre>
 
==== Обновите все пакеты ====


Upgrade all packages with
{{admon/warning|Если live-обновление запущено, не останавливайте его путем перезагрузки или любыми другими методами пока оно не закончится. Прерывание обновления может стать причиной поврежденного состояния системы, в которой часть пакетов старые, а часть новые.  В этом состоянии система будет нестабильной и не будет работать так, как положено. Вы можете попробовать запустить yum distro-sync и package-cleanup --problems для устранения проблем. }}


<pre>
<pre>
yum upgrade
yum --releasever=<release_number_you_want_to_sync_to> distro-sync
</pre>
</pre>


<code>yum</code> might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) - uninstall them and try again. Remember to install the packages again if they are essential.
{{admon/warning| Если у вас возникли проблемы с зависимостями, то вам придется решать их вручную самостоятельно.  Если вы считаете, что не сможете этого сделать, используйте preupgrade! В большинстве случаев достаточно удалить несколько проблемных пакетов. Будьте уверены, что не удаляете половину из вашей установки.
}}
 
'''Внимание:''' While it is recommended to upgrade to intermediate releases if upgrading from an older release (for example upgrading from Fedora 12 to 13, then 13 to 14), depending on what version you are upgrading from, this step may fail with an error about GPG keys being in the wrong format. To overcome this, you can add the "--nogpgcheck" switch to the above yum distro-sync command.
 
=== 5. Убедитесь, что Fedora обновлена ===


Ensure that all (new) essential packages from the new version is installed with
Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well.  Confirm with <pre> yum repolist </pre>  after the upgrade process is over.  <code>yum</code> might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) - uninstall them and try again. Remember to install the packages again if they are essential
 
Убедитесь, что все основные (новые) пакеты из новой версии установлены с помощью команды


<pre>
<pre>
Line 117: Line 157:
</pre>
</pre>


You might want to update other groups too, see
Вы так же можете обновить другие группы пакетов


<pre>
<pre>
Line 123: Line 163:
</pre>
</pre>


For example
Например,


<pre>
<pre>
Line 134: Line 174:
</pre>
</pre>


=== 5. Preparing for reboot ===
=== 5. Подготовка к перезагрузке ===


Before booting you should usually install the bootloader from your new grub by running
Прежде, чем перезагрузить систему, необходимо установить загрузчик grub с помощью команды
<pre>
<pre>
/sbin/grub-install BOOTDEVICE
/sbin/grub-install BOOTDEVICE
</pre>
</pre>
- where BOOTDEVICE usually is <code>/dev/sda</code> (If you get an error '/dev/sda does not have any corresponding BIOS drive' from that, then try <tt>/sbin/grub-install --recheck /dev/sda</tt>.)
- здесь BOOTDEVICE обычно является <code>/dev/sda</code> (Если вы получите сообщение об ошибке '/dev/sda does not have any corresponding BIOS drive' в результате выполнения этой команды, попробуйте выполнить <tt>/sbin/grub-install --recheck /dev/sda</tt>.)


Also, the order of init scripts could have changed from the previous version. A command to reset the order is:
Кроме того, необходимо изменить скрипты инициализации, которые изменились с предыдущей версии. Выполните команду:
<pre>
<pre>
cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done
cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done
</pre>
</pre>


Again, run <code>package-cleanup --orphans</code> to find packages that hasn't been upgraded.
Снова выполните <code>package-cleanup --orphans</code>, чтобы отыскать пакеты, которые не были обновлены.


== Version specific notes ==
== Специфичные инструкции для отдельных версий  ==


=== From pre-release ===
=== Обновление с pre-release ===


If you are upgrading to a final release from an alpha, beta, preview, or other [[Releases/Rawhide|Rawhide]] release, please see [[Upgrading from pre-release to final]].
Если вы обновляетесь до финальной версии с alpha, beta, preview или [[Releases/Rawhide|Rawhide]] выпуска, пожалуйста, просмотрите страницу [[Upgrading from pre-release to final]].


{{Anchor|11-12}}
=== Версия для разработчиков ===
=== Fedora 11 -> Fedora 12 ===


* All Fedora 12 RPM packages use XZ/LZMA compression, which is only supported by the [https://admin.fedoraproject.org/updates/F11/FEDORA-2009-7986 rpm-4.7.1-1 update] (or later) for Fedora 11. Before upgrading from Fedora 11, run <code>yum update rpm</code>.
* It is not possible to update directly from Fedora 10 or earlier with yum. To upgrade from Fedora 10, first update to Fedora 11, and then upgrade from Fedora 11 to Fedora 12. If you are using a release before Fedora 10, use one of the official upgrade methods or backup your data, perform a fresh installation, and restore from backup.
* You can upgrade directly from Fedora 11 to Rawhide without installing a new {{package|fedora-release}} package by running <code>yum --enablerepo=rawhide --skip-broken upgrade</code>.
* Upgrades from Fedora 11 might currently fail with missing dependencies (for example related to {{package|totem-gstreamer}} or {{package|PolicyKit-kde}}). The dependencies are ok, but Fedora 11 {{package|yum}} has problems resolving them ([[rhbug:519172|bug 519172]]).
* If your root filesystem does not mount with 'defaults' options, you will need to add the root filesystem's mount options to grub.conf with the kernel flag <code>rootflags</code> - initramfs does not pick up the options the way initrd used to.  e.g. if you mount your root with the flags <code>data=journal,relatime</code> then you would add to the end of the 'kernel' line in grub.conf: <code>rootflags=data=journal,relatime</code> .
{{Anchor|10-11}}
=== Fedora 10 -> Fedora 11 ===
* It is only possible to upgrade to Fedora 11 from an updated Fedora 10. Older systems must be upgraded to Fedora 10 first. The RPM format has been changed for Fedora 11, so the older <code>rpmlib</code> must be updated first.  Otherwise the process will fail with <code>rpmlib(FileDigests)</code> dependency problems. Support for the new format has been backported to Fedora 10 in an update.
<pre>
<pre>
yum update rpm
yum update yum
yum --releasever=rawhide distro-sync --skip-broken --nogpgcheck
</pre>
</pre>
* New <code>initrd</code> built when installing a new kernel while running Fedora 10 might fail. To solve that boot with an old kernel (to get the new userspace) and (re)install the new kernel.
* Systems with PAE support (indicated by <code>pae</code> in <code>/proc/cpuinfo</code>) should use <code>kernel-PAE.i686</code>. The new kernel must be changed/installed manually: Set <code>DEFAULTKERNEL=kernel-PAE</code> in <code>/etc/sysconfig/kernel</code> and <code>yum install kernel-PAE</code>. Refer to [http://www.codemonkey.org.uk/?p=142 Dave Jones' blog post] for details.
* The yum update step should NOT be run inside a gnome desktop session/gnome-terminal. [[rhbug:494046|494046]] could result in a unusable install when gnome-terminal segfaults during the upgrade. Update should be run in a vty, runlevel 3, or a screen session.
* fedora-release-11-1.noarch changes the yum mirrorlist URL so that it uses a  "metalink", but the version of yum currently in F10 doesn't understand this syntax, leading to yum downloads failing with this error message:
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
  Eg. </metalink>/
This is [[rhbug:498720|498720]].  Workaround is to manually edit the URL in /etc/yum.repos.d/fedora.repo as described at https://www.redhat.com/archives/fedora-list/2009-June/msg00783.html
* Some packages in Fedora 10 are regarded as newer than those supplied by Fedora 11 and its updates repository. These include ntpd, ntpdate ([[rhbug:506040|506040]], [[rhbug:504980|504980]]), unique, unique-devel, eclipse-changelog, eclipse-svnkit and svnkit. You may wish to remove these before performing the upgrade, then reinstall them afterwards. Doing so may require <code>--nodeps</code>.
* Some i386 packages in Fedora 10 are replaced with i586, i686 or x86_64 packages in Fedora 11. These include gpm.i386, glibc-2.9-3.i386. You may wish to remove these before performing the upgrade, then reinstall them afterwards. Doing so may require <code>--nodeps</code>.
* mplayer-1.0-0.104.20090204svn.fc10 from the RPM Fusion repository has a dependency on libfaad.so.0 that the depsolve doesn't find, but rpm_check_debug does. You may wish to remove mplayer before performing the upgrade, then reinstall them afterwards. Doing so may require <code>--nodeps</code>.
{{Anchor|9-10}}


=== Fedora 9 -> Fedora 10 ===
{{Anchor|16-17}}
=== Fedora 17 -> Fedora 18 ===


* Check the [http://docs.fedoraproject.org/install-guide/f10/en_US/ Fedora 10 Installation Guide] and [http://docs.fedoraproject.org/release-notes/f10/en_US/ Fedora 10 Release Notes]
'''Внимание: Этот метод не работает на Macbook Pro, проверено на Macbook Pro конца 2011 года.''' [http://anee.me/dont-update-fedora-17-to-18-using-yum-on-macbook-pro/ Подробнее]
* <code>fedora-release</code> packages can be found at <code>rpm -Uvh ftp://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/fedora-release-*.noarch.rpm</code>
# Установите новый gpg ключ: {{command|su -c 'rpm --import https://fedoraproject.org/static/DE7F38BD.txt'}}
* GDM starts on tty1 by default, not tty7.
# Переключите SELinux в режим Permissive: {{command|su -c 'setenforce Permissive'}}
* anaconda by default now refers to encrypted devices by UUID, not by device name, to better handle device name changes. An encrypted device using partition <code>/dev/sda1</code> with UUID <code>12345678-1234-1234-1234-123456789012</code> would now be called <code>/dev/mapper/luks-12345678-1234-1234-1234-123456789012</code> instead of <code>/dev/mapper/luks-sda1</code>. You may wish to make the same changes on your system on upgrade; if you do, make sure to run <code>mkinitrd</code> afterwards.
# Обновите все пакеты:
* If you use non-root encrypted devices, you will need to re-run <code>mkinitrd</code> for any older kernels that you want to still boot on the system.
## {{command|su -c 'yum update yum'}}
* It's been reported that there are problems with Pidgin i.e.:
## {{command|su -c 'yum clean all'}}
** <code>pidgin-2.5.2-2.fc9.i386 from installed has depsolving problems - Error: Missing Dependency: libedataserver-1.2.so.9 is needed by package pidgin-2.5.2-2.fc9.i386 (installed)</code>
## {{command|su -c 'yum --releasever<nowiki>=</nowiki>18 --disableplugin<nowiki>=</nowiki>presto distro-sync'}}
** the fix was to remove Pidgin
# Перегенерируйте базу данных пакетов rpm: {{command|su -c 'rpm --rebuilddb'}}, иначе rpm -qa не будет работать из-за обновления пакета rpm.


{{Anchor|8-9}}
Вы можете заметить ошибки в выводе yum'а, когда некоторые пакеты попытаются создать пользователей и/или группы, если не включили режим Permissive на время обновления. После обновления у вас могут возниктуть проблемы с этими пакетами, такие как невозможность входа в систему через GDM (будет виден только вращающийся курсор) и/или какие-либо действия, требующие администраторских прав доступа. Это возникает в результате [[rhbug:844167|bug #844167]]. Если эти проблемы все-таки возникли, нужно переустановить испорченные пакеты с помощью команды {{command|su -c 'yum reinstall (packagenames)'}} и перезагрузить систему. Возможно проблемы возникнут с пакетами libvirt-daemon and polkit: {{command|su -c 'yum reinstall libvirt-daemon polkit'}}
=== Fedora 8 -> Fedora 9 ===


* Check the [http://docs.fedoraproject.org/release-notes/f9/en_US/sn-Installer.html#Upgrade-Related-Issues Installer section in Release Notes])
{{admon/note||Попробуйте скрипт [https://github.com/xsuchy/fedora-upgrade fedora-upgrade], он проделает все эти шаги автоматически}}
* After "the incident" you should use updated fedora-release packages from <code>rpm -Uvh ftp://download.fedora.redhat.com/pub/fedora/linux/updates/9/i386.newkey/fedora-release-*.noarch.rpm</code>
* If you are running as a <code>xen</code> Host (Dom0) you should not upgrade to Fedora 9. [http://www.redhat.com/archives/fedora-xen/2008-March/msg00013.html]
* Upgrading the thunderbird package will [[rhbug:446351|fail]] . The current workaround is <code>yum remove thunderbird; yum install thunderbird></code>.
* If you are upgrading to Fedora 9 and use <code>emacs</code>, you must upgrade to the latest version of <code>emacs</code> for your prior release to ensure a clean upgrade. Fedora 8 users must have <code>emacs-22.1-10.fc8</code> or later, while Fedora 7 users must have <code>emacs-22.1-7.fc7</code>.  Bug report [[rhbug:239745|here]].
* Due to the switch from sysvinit to [http://fedoraproject.org/wiki/Features/Upstart Upstart] , it is recommended that users who do an upgrade on a live filesystem to Fedora 9 reboot soon afterwards. If you do not reboot, you may want to take careful note of any '/etc/inittab.rpmsave' or '/etc/inittab.rpmnew' files. When rebooting after an upgrade then be aware that sysvinit that was used to start the system can't be used to shut it down.
* You may find that after upgrading, you can no longer log in to GNOME. If this is the case, use ctrl-alt-F1 to access command prompt, then check the tail of .xsession-errors. If you see a comment like "(named color or font does not exist)", then you may be able to fix this using http://matthew.peach.net.nz/2008/05/18/how-to-fix-badname-named-color-or-font-does-not-exist-error/.


{{Anchor|7-8}}
=== Fedora 16 -> Fedora 17 ===
=== Fedora 7 -> Fedora 8 ===


* New pulseaudio and flash support packages must be installed manually:
{{admon/warning||Эти инструкции касаются версии, которая еще не вышла. Шаги могут меняться перед релизом.}}


<pre>
The [[Features/UsrMove | Usr Move Feature]] changes where some important programs are installed on the filesystem.  Once the packages that implement this are built (not yet as of November 30, 2011) we will have to move some directories on the filesystem and setup compatibility symlinks before we can upgrade.  Although the details are not yet finalized, the general steps will be:
yum groupinstall sound-and-video gnome-desktop (if you are using Gnome)
yum groupinstall sound-and-video kde-desktop (if you are using KDE)
yum install libflashsupport paman padevchooser
</pre>


* The Fedora 7 avahi packagage fails to uninstall; remove it manually with
# Updating to dracut version $X or later (pushed to all non-EOL Fedora releases).
# Rebuild the initramfs with dracut command $X
# Reboot the computer, giving $X as a kernel command line option
# The computer will startup and run a script in the initramfs that migrates the filesystem.  Once booted, the /bin, /sbin, /lib, and /lib64 directories should be symlinks to their respective /usr/ counterparts and the files that were in them should have been merged together.
# At this point you may reboot the computer back into a normal boot (or simply change to the multiuser or graphical target) and proceed with your yum upgrade.


<pre>
Running the script via the initramfs allows it to bypass some tricky logic when moving the dynamic linker (ld-linux-2.so).  If you want to perform this completely manually, you can read the script that dracut would install in the initramfs at $X and then modify the steps to move the files around without leaving yourself without a ld-linux-2.so at the expected path.
rpm -e --noscripts avahi-0.6.17-1.fc7
</pre>


* On 64 bit machines (x86_64) you may have to remove some 32 bit libraries. For example dbus:
{{Anchor|15-16}}


<pre>
=== Fedora 15 -> Fedora 16 ===
yum erase dbus.i386
</pre>


* You may find it easier to use the yum shell to stack these commands in a single transaction:
Во-первых, установить новый gpg-ключ Fedora 16. You may wish to verify this package against  https://fedoraproject.org/keys and the fedora ssl certificate.


<pre>
<pre>
yum shell
rpm --import https://fedoraproject.org/static/A82BA4B7.txt
> erase dbus.i386
> update
> run
</pre>
</pre>


* A lot of KDE packages are no longer multilib in F8. If you are on x86_64, you will need to erase the i386 versions of these packages by hand, like so:
После этого запустите {{command|chkconfig --list}} and note the enabled services; you will need to re-enable these with {{command|systemctl enable ''xxxxx''.service}} after you reboot, as the {{package|sysvinit}} settings aren't propagated into {{package|systemd}}. See [[Common_F16_bugs#Upgrade_from_previous_releases_resets_the_enablement_status_of_services|release notes]] for more details.


<pre>
Обновите все пакеты с помощью
yum erase kde{accessibility{,-devel},base,edu,graphics,multimedia{,-extras},network,sdk,utils{,-devel},webdev}.i386
</pre>
 
* Various other packages including Beryl are no longer in F8 and not obsoleted:


<pre>
<pre>
yum erase beryl\*
yum update yum
yum clean all
yum --releasever=16 --disableplugin=presto distro-sync
</pre>
</pre>


{{Anchor|6-7}}
{{admon/warning|Bootloader change|После обновления у вас будут установлены пакеты {{package|grub2}} и {{package|grub-efi}} и удален пакет {{package|grub}}. Однако, grub будет все еще установлен в MBR и загрузка будет работать. Вы можете следовать инструкциям для перехода на grub2, если хотите. При установке пакет {{package|firstaidkit-plugin-grub}} может препятствовать обновлению; просто удалите его в таком случае.}}
=== Fedora Core 6 -> Fedora 7 ===
 
* Fedora 7 replaces the old IDE subsystem with libata. Drive device names which previously started /dev/hd.. will become /dev/sd.. after the upgrade. /dev/hda1 will usually become /dev/sda1, although there may not be a direct relationship between the old and new device names (for example hdd does not necessarily become sdd). Before you reboot be sure to change all references to /dev/hd.. in your config, especially /etc/fstab - where it however may be simpler to refer to filesystems by label (check out the programs blkid, tune2fs, and mlabel). LVM Volume names are not affected. In /boot/grub/device.map change /dev/hd.. to /dev/sd.. before running grub-install - and don't change (hd0). Changing /boot/grub/grub.conf may also be required.
 
* The libata layer represents all hard disks as SCSI disks, which are limited to 15 partitions in the kernel. IDE hard disks with more than 15 partitions are not supported in Fedora 7.
 
* On a system which has been upgraded from releases prior to FC6 you may need to remove up2date and rhnlib <code>rpm -e rhnlib up2date</code>
 
* If you see the message <code>package gpm-1.20.1-84.fc6 (which is newer than gpm-1.20.1-83.fc7) is already installed</code> when performing a <code>yum update</code> uninstall and reinstall the gpm package.
 
* If you had installed Suns jre it might be removed during upgrade. Be aware that <code>jre-6u1</code>/<code>jre-1.6.0_01-fcs</code> requires <code>compat-libstdc++-33</code>.
 
* If you get <code>Error: Missing Dependency: python(abi) = 2.4 is needed by package libxml2-python</code> and/or <code>Error: Missing Dependency: python(abi) = 2.4 is needed by package rpm-python</code> during your <code>yum upgrade</code> ensure you have done a <code>yum clean all</code> and check that both the <code>base</code> and <code>updates</code> repositories are available from your mirror. You will need the <code>updates</code> repo for the upgrade to succeed.
 
* Since Fedora Core 6 uses python 2.4 and Fedora 7 uses python 2.5, do not try and run <code>yum upgrade yum\* rpm\*</code> before upgrading everything else - this succeeds but leaves yum in an unusable state.
 
=== Fedora Core 5 -> Fedora Core 6 ===
 
* After upgrading, you cannot use the DVD ISO loopback mounted as a repository directly (e.g. no <code>baseurl=file:///mnt/fc6/</code>) because the repodata files contain URLs of type <code>media://</code>  which yum can't handle.  You can use the loopback-mounted DVD for the initial upgrade from FC5 -> FC6, just not thereafter.  After removing the <code>baseurl=file:///</code> option from your <code>fedora-core.repo</code> file, remember to <code>yum clean all</code>.
 
=== Fedora Core 4 -> Fedora Core 5 ===
 
* Before upgrading update your kernel first.
 
* Make sure you have the latest kernel ABOVE 2.6.14 and uninstall all kernel versions before it, otherwise initscripts and a few other packages will conflict and prevent the ugprade. Use something like the command below


* Install <code>fedora-release</code> in the Fedora Core 5 version. Check our [http://fedora.redhat.com/Download/mirrors.html mirror sites]  for a faster download.
If your system uses a BIOS, or you installed Fedora via BIOS emulation mode on an EFI system (not native EFI mode), you can switch to Fedora 16's supported grub2 bootloader with the following instructions. If your system was installed by native EFI boot, do not switch to grub2, as its EFI support is still unreliable. Fedora 16's supported bootloader for native EFI installations is still grub-legacy, so you should simply continue to use the system without making any special changes to the bootloader configuration.


* Update your system
Для перехода на grub2 выполните команду {{command|su -c '/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg'}}, дальше действуйте согласно [[#6._Preparing_for_reboot|инструкциям]] по переустановке загрузчика.


* After upgrading, selinux permissions may be incorrect, causing interesting failures such as metacity not starting. As suggested below, to fix this, run <code>touch /.autorelabel</code> and reboot
Known you upgrade -specific issues (for common problems, see references above):
* Bug [https://bugzilla.redhat.com/show_bug.cgi?id=743022 743022] - F15->F16 yum update fails with IMSM (BIOS) raid


=== Fedora Core 3 -> Fedora Core 4 ===


* make sure you're on the latest version of yum for FC3:
{{Anchor|14-15}}
<code> yum update yum </code>
* Download fedora-release for FC4:
* wget http://yourmirrorhere/pub/fedora/linux/core/4/$yourarch/os/Fedora/RPMS/fedora-release-4-2.noarch.rpm
* <code>rpm -Uvh /path/to/fedora-release-4-2.noarch.rpm</code>
* yum update ( This will start the upgradation process to FC4)
* Once you have updated, run: <code>yum groupinstall "GNOME Desktop Environment"</code> (change GNOME to KDE if appropriate). That'll get you some new packages that were added in FC4 like Evince and NetworkManager.
* Some new groups were added - <code> yum grouplist </code> - check out Eclipse and Java Development in particular.


Problems:
=== Fedora 14 -> Fedora 15 ===


* Postgres database in FC4 has a newer incompatible format from the previous versions. Manual dump and restoration is required if you using this database. Look at the postgres documentation for more details on this.
Для начала установите новый GPG ключ для Fedora 15. Для проверки этого пакета на достоверность https://fedoraproject.org/keys и SSL сертификату Fedora выполните следующее:


* kernel requires kernel-utils (or vice-versa) run:
<pre>
<pre>
yum update kernel
rpm --import https://fedoraproject.org/static/069C8460.txt
reboot
yum remove kernel-2.6.11\*FC3\*
yum upgrade
reboot
</pre>
</pre>


* Takes forever and a day and hangs at:
Обновите все пакеты с помощью:
<code> Reading repository metadata in from local files </code>
This means you have too much crap in your rpmdb and it's taking a while to go through it. Check out how many kernels you have installed: rpm -q kernel kernel-smp and remove the old ones you may also try running: rpm --rebuilddb and see if it helps any. I've found that removing old kernels and rebuilding the rpmdb helped this problem.


* x86_64 upgrade requires removal of certain i386 packages before update
<pre>
<pre>
yum remove perl.i386
yum update yum
TODO: Add list of bonobo i386 packages to remove here
yum clean all
yum --releasever=15 --disableplugin=presto distro-sync
</pre>
</pre>
* Error: Missing Dependency: libpython2.3.so.1.0 is needed by package koffice
koffice was removed from Fedora Core and not moved to extras - so there's no way to complete an upgrade to FC4
without removing it. run:
<pre>
yum remove koffice
</pre>
then your update should complete.


* x86_64 systems seems to hang during "Running Transaction Test"
* Не запускайте эти команды из под X терминала. Тесты показывают, что X сервер может зависать в процессе обновления пакетов со шрифтами.
* Существуют .drpms, но они не совпадают с новыми ввиду изменения формата, поэтому лучше отключить плагин "presto" путем добавления ключа "--disableplugin=presto" (без кавычек) при запуске пакетного менеджера yum.
* <code>Screen</code> клиент F15 не позволяет подключаться к F14 <code>screen</code> сессиям. Поэтому, если Вы хотите запустить обновление через <code>screen</code>, Вам необходимо либо обновить <code>screen</code> сначала, либо сделать его отдельную копию для использования в процессе обновления.


Seems related to bug [[rhbug:155730|155730]]  -- Maybe a update to the "rpm-4.3.3-3.0.fc3" (currently in updates-testing) might solve this. Ugly workaround (to be done as root):
<pre>
: > /var/log/lastlog
</pre>


* GPG check fails with this message :
{{Anchor|13-14}}
<pre>
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID db42a60e
public key not available for <some_package>
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora


The GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora (0x4F2A6FD2)
=== Fedora 13 -> Fedora 14 ===
is already installed but is not the correct key for this package.
Check that this is the correct key for the "Fedora Core 4 - i386 - Base" repository.
</pre>
Edit /etc/yum.repos.d/fedora.repo and replace the line
<pre>
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
</pre>
with:
<pre>
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
</pre>


* SELinux gets messed up. I had to redownload the selinux-policy-targeted RPM from my mirror, do a forced uninstall of the old package, clean out the .rpmnew and .rpmsave files then install the new policy. Then I had to run "/sbin/fixfiles relabel" and wait. If I didn't do that, I found I couldn't log in.
Для начала установите новый gpg-ключ Fedora 14. You may wish to verify this package against https://fedoraproject.org/keys and the fedora ssl certificate.
* If SELinux does give you problems, it can be disabled on bootup by pressing "a" on the grub bootup menu, then adding "enforcing=off" to the arguments list.


* RPM complains about missing diskspace, but there is a lot free. If you are really sure your diskspace is enough, set
<pre>
<pre>
diskspacecheck=0
rpm --import https://fedoraproject.org/static/97A1071F.txt
</code> in <code>/etc/yum.conf</code>.
</pre>
The RPM transaction will need a lot of diskspace temporarily (much more than one might think), so be careful.
Don't forget to remove that later after the upgrade.


* Yum complains about files conflicting in the GCC package.  This system was upgraded from Fedora Core 1.  Remove the gcc32 package:
Обновите все пакеты с помощью
<pre>
sudo rpm -e gcc32
</pre>


* Some of your modules don't load after the upgrade.  When you investigate modprobe doesn't work as expected.  Run depmod:
<pre>
<pre>
sudo depmod -ae -F /boot/System.map-[your <code>uname -a</code> kernel version here]
yum update yum
yum --releasever=14 distro-sync --skip-broken
</pre>
</pre>


* Yum has been reported to be hanging after upgrading. Updating the pysqlite package might fix it.
* Если вы используете VirtualBox из репозитория Oracle, вам необходимо удалить пакет VirtualBox-3.1 перед обновлением. После того, как оно будет закончено, установите VirtualBox-3.2.
 
=== Fedora Core 2 -> Fedora Core 3 ===
 
Go here for most of this info:
http://linux.duke.edu/~skvidal/misc/fc2-fc3-update-with-yum.txt


=== Fedora Core 1 -> Fedora Core 2 ===
=== Обновление с версий, которые больше не поддерживаются ===
{{admon/note|Обновление через yum со старых версий| Информация об обновление через yum со старых версий перенесена в архив. Вы можете найти ее здесь: [[Upgrading from EOL Fedora using yum/ru| Обновление через yum с неподдерживаемых версий Fedora]]}}


Just Upgrade using anaconda - save yourself a world of pain. But if you really want to try, there's these hints by Seth Vidal: http://linux.duke.edu/~skvidal/misc/fc1-fc2-yum-hints.txt


[[Category:FAQ]][[Category:How to]][[Category:Documentation]] -->
[[Category:FAQ]][[Category:How to]][[Category:Documentation]] [[Category:LocalizationRussian]]

Latest revision as of 15:43, 18 September 2016

Обновление Fedora с помощью yum

Эта страница содержит инструкцию по обновлению Fedora с помощью yum.

Warning.png
Обновление версий без использования anaconda - такие как метод с использованием yum, описанный ниже - является не поддерживаемым и не рекомендуется!
Рекомендуемым методом установки является использование загрузочного носителяс установщиком Anaconda, как описано в Руководстве по установке или с использованием PreUpgrade. PreUpgrade является слегка отличающимся методом обновления, при котором все пакеты скачиваются перед перезагрузкой системы в редим установщика Anaconda. Несмотря на то, что обновление с помощью yum работает, оно не до конца протестировано в рамках процесса выпуска релизова командой Fedora QA и не задокументированно в Руководстве по установке]. Если вы не готовы к самостоятельному решению возможных проблем, вам лучше использовать рекомедуемые методы установки.

Рекомендованный метод установки с помощью загрузочного носителя с установщиком Anaconda описан в Инструкции по установке EN. PreUpgrade является другим способом при котором все пакеты загружаются прежде, чем система перезагрузится для запуска установщика Anaconda.

При обновлении с помощью yum вы не получите никакой помощи от программы установки Anaconda, но при удачном стечении обстоятельств сможете обновить систему удалённо, через ssh, с ограниченным временем простоя системы. (Хотя, по-прежнему, потребуется перезагрузка системы, что бы загрузилось новое ядро, а также системные библиотеки/сервисы).

Live-обновление с помощью yum обычно работает на стандартных установках Fedora при применении нижеследующих советов.

Ваше участие

Если при обновлении с помощью Yum обнаруживается какая-либо проблема с зависимостями пакетов, пожалуйста, отправьте отчет об этом в http://bugzilla.redhat.com. Но, пожалуйста, прочитайте сначала данную страницу и все страницы, на которые мы ссылаемся, а также просмотрите архив списка рассылки прежде, чем заполнять отчет об ошибке. И конечно помогите, пожалуйста, сохранить данную страницу в актуальном состоянии.

Если вы хотите помочь сделать процесс live обновления более простым, присоединяйтесь к группе по интересам "Live Upgrade" ("Live обновление").

Инструкции по обновлению с помощью yum

0. Выполните резервное копирование

Выполните резервное копирование любых личных данных на внешний жесткий диск или на другой компьютер. Если возникнет неустранимая ошибка и потребуется новая установка, вы не потеряете никаких данных.

1. Прочитайте о возможных проблемах

Ниже приведен список основных проблем специфичных для каждой версии. Некоторые из них требуют внимания прежде, чем приступить к обновлению.

Общие советы по обновлению Fedora можно найти на странице Upgrading. Необходимо прочитать Руководство по установке и Замечания к выпуску для версии, до которой вы обновляетесь, - здесь может содержаться важная информация о возможных проблемах при обновлении. Наконец, просмотрите список Распространенные ошибки F40.

2. Приготовления

Просмотрите и удалите все файлы .rpmsave и .rpmnew прежде, чем приступить к обновлению. (И, если selinux активирован, проверьте его настройки).

Idea.png
Отыщите неиспользуемые конфигурационные файлы
Объедините и решите изменения с помощью следующего скрипта: for a in $(find /etc /var -name '*.rpm?*'); do diff -u $a ${a%.rpm?*}; done.

Теперь необходимо удалить пакеты, которые вы не используете, - особенно, если это нестандартные пакеты.

Idea.png
Отыщите и просмотрите "неиспользуемые" пакеты
Вы можете найти пакеты, которые не нужны другим пакетам, с помощью инструмента package-cleanup из пакета yum-utils: yum install yum-utils; package-cleanup --leaves. Вы можете решить, что эти пакеты являются кандидатами на удаление, но необходимо проверить, что эти пакеты не используются лично вами и что они не используются приложениями установленными без помощи rpm. Если это так, то удалите их с помощью yum remove имя-пакета-и-его-версия.
Idea.png
Отыщите и просмотрите "потерянные" пакеты
Вы можете найти устаревшие пакеты (например, пакеты, которые больше не располагаются в репозитариях) с помощью: package-cleanup --orphans. Эта команда отобразит пакеты, которые были частично удалены, но для которых выполнение "%postun" скрипта окончилось неудачей.

Убедитесь, что пакет yum-fastestmirror был установлен, для того, чтобы использовать самое быстрое зеркало для скачки пакетов.

yum install yum-fastestmirror

Затем удалите все следы текущей версии, оставшиеся в кэше /var/cache/yum.

yum clean all

3. Переключение репозитариев

Обновите пакеты, которые должен использовать yum.

rpm -Uhv ftp://download.fedora.redhat.com/pub/fedora/linux/releases/<ReleaseNumber>/Fedora/<Arch>/os/Packages/fedora-release-*.noarch.rpm

(Архитектура не имеет значения для пакета noarch .)

Note: Некоторые пользователи говорят, что при попытке скачать эти файлы с помощью rpm получают ответ 550 и сообщение "transfer failed". Если вы столкнулись с этим, вы можете загрузить rpms файл и установить его вручную, например, следующим образом:

wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/<ReleaseNumber>/Fedora/<Arch>/os/Packages/fedora-release-*.noarch.rpm
rpm -Uvh fedora-release-*.noarch.rpm

Убедитесь, что новые repo файлы не расположены в файлах .rpmnew, например, с помощью

mv /etc/yum.repos.d/fedora-updates.repo.rpmnew /etc/yum.repos.d/fedora-updates.repo
mv /etc/yum.repos.d/fedora.repo.rpmnew /etc/yum.repos.d/fedora.repo

Если вы используете репозитарии третьесторонних производителей, может потребоваться их настройка для новой версии Fedora. Если же вы обновляетесь с одного выпуска Fedora к другому, в большинстве случаев ничего делать не придётся. If you switch to Rawhide from a standard Fedora release (or vice versa) then you most of the time need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).

Отметим, что обновление может окончиться неудачей, если установлены устаревшие зависимые пакеты, которые не существуют в репозитарии.


4. Выполните обновление

Если у вас подключены сторонние репозитории, возможно вам понадобится y настроить их для новой версии Fedora. Если вы обновляетесь с одного релиза до другого, то обычно ничего делать не приходится. Если вы обновляетесь с текущего релиза до Rawhide (или наоборот), то большую часть времени вам придется устанавливать пакеты Rawhide из сторононнего репозитория (или, наоборот, стандартные пакеты в обратном случае).

Обратите внимание, что обновление может пойти не так как нужно при наличии устаревших зависимостей для пакетов, которые не поддерживаются с помощью yum в репозитории или для которых не готовы новые версии.

Хорошей идеей считается обновлнеие вне графической оболочки. Выйдите из графического режима и выполняйте следующие шаги.

Перейдите в текстовую консоль

ctrl + alt + F2

(или)

зайдите как root (суперпользователь) и перейдите в runlevel 3

init 3

Обновите yum до последней версии, доступной для вашей версии Fedora

yum update yum

Установите новый gpg-ключ Fedora для версии, до которой собираетесь обновиться

Вы можете найти ключи и проверить их на странице

https://fedoraproject.org/keys

или читайте инструкции по обновлению отдельных версий ниже.

Очистите кеш

Затем удалите все следы той версии, с которой вы обновляетесь, из кеша yum /var/cache/yum.

yum clean all

Обновите все пакеты

Warning.png
Если live-обновление запущено, не останавливайте его путем перезагрузки или любыми другими методами пока оно не закончится. Прерывание обновления может стать причиной поврежденного состояния системы, в которой часть пакетов старые, а часть новые. В этом состоянии система будет нестабильной и не будет работать так, как положено. Вы можете попробовать запустить yum distro-sync и package-cleanup --problems для устранения проблем.
yum --releasever=<release_number_you_want_to_sync_to> distro-sync
Warning.png
Если у вас возникли проблемы с зависимостями, то вам придется решать их вручную самостоятельно. Если вы считаете, что не сможете этого сделать, используйте preupgrade! В большинстве случаев достаточно удалить несколько проблемных пакетов. Будьте уверены, что не удаляете половину из вашей установки.

Внимание: While it is recommended to upgrade to intermediate releases if upgrading from an older release (for example upgrading from Fedora 12 to 13, then 13 to 14), depending on what version you are upgrading from, this step may fail with an error about GPG keys being in the wrong format. To overcome this, you can add the "--nogpgcheck" switch to the above yum distro-sync command.

5. Убедитесь, что Fedora обновлена

Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well. Confirm with

 yum repolist 

after the upgrade process is over. yum might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) - uninstall them and try again. Remember to install the packages again if they are essential.

Убедитесь, что все основные (новые) пакеты из новой версии установлены с помощью команды

yum groupupdate Base

Вы так же можете обновить другие группы пакетов

yum grouplist

Например,

yum groupupdate "GNOME Desktop Environment" \
"Development Tools" "Server Configuration Tools" \
"Hardware Support" "Sound and Video" \
"Graphical Internet" "Fonts" \
"Games and Entertainment" "Printing Software" \
"Administration Tools" "Office/Productivity" "System Tools"

5. Подготовка к перезагрузке

Прежде, чем перезагрузить систему, необходимо установить загрузчик grub с помощью команды

/sbin/grub-install BOOTDEVICE

- здесь BOOTDEVICE обычно является /dev/sda (Если вы получите сообщение об ошибке '/dev/sda does not have any corresponding BIOS drive' в результате выполнения этой команды, попробуйте выполнить /sbin/grub-install --recheck /dev/sda.)

Кроме того, необходимо изменить скрипты инициализации, которые изменились с предыдущей версии. Выполните команду:

cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done

Снова выполните package-cleanup --orphans, чтобы отыскать пакеты, которые не были обновлены.

Специфичные инструкции для отдельных версий

Обновление с pre-release

Если вы обновляетесь до финальной версии с alpha, beta, preview или Rawhide выпуска, пожалуйста, просмотрите страницу Upgrading from pre-release to final.

Версия для разработчиков

yum update yum
yum --releasever=rawhide distro-sync --skip-broken --nogpgcheck

Fedora 17 -> Fedora 18

Внимание: Этот метод не работает на Macbook Pro, проверено на Macbook Pro конца 2011 года. Подробнее

  1. Установите новый gpg ключ: su -c 'rpm --import https://fedoraproject.org/static/DE7F38BD.txt'
  2. Переключите SELinux в режим Permissive: su -c 'setenforce Permissive'
  3. Обновите все пакеты:
    1. su -c 'yum update yum'
    2. su -c 'yum clean all'
    3. su -c 'yum --releasever=18 --disableplugin=presto distro-sync'
  4. Перегенерируйте базу данных пакетов rpm: su -c 'rpm --rebuilddb', иначе rpm -qa не будет работать из-за обновления пакета rpm.

Вы можете заметить ошибки в выводе yum'а, когда некоторые пакеты попытаются создать пользователей и/или группы, если не включили режим Permissive на время обновления. После обновления у вас могут возниктуть проблемы с этими пакетами, такие как невозможность входа в систему через GDM (будет виден только вращающийся курсор) и/или какие-либо действия, требующие администраторских прав доступа. Это возникает в результате bug #844167. Если эти проблемы все-таки возникли, нужно переустановить испорченные пакеты с помощью команды su -c 'yum reinstall (packagenames)' и перезагрузить систему. Возможно проблемы возникнут с пакетами libvirt-daemon and polkit: su -c 'yum reinstall libvirt-daemon polkit'

Note.png
Попробуйте скрипт fedora-upgrade, он проделает все эти шаги автоматически

Fedora 16 -> Fedora 17

Warning.png
Эти инструкции касаются версии, которая еще не вышла. Шаги могут меняться перед релизом.

The Usr Move Feature changes where some important programs are installed on the filesystem. Once the packages that implement this are built (not yet as of November 30, 2011) we will have to move some directories on the filesystem and setup compatibility symlinks before we can upgrade. Although the details are not yet finalized, the general steps will be:

  1. Updating to dracut version $X or later (pushed to all non-EOL Fedora releases).
  2. Rebuild the initramfs with dracut command $X
  3. Reboot the computer, giving $X as a kernel command line option
  4. The computer will startup and run a script in the initramfs that migrates the filesystem. Once booted, the /bin, /sbin, /lib, and /lib64 directories should be symlinks to their respective /usr/ counterparts and the files that were in them should have been merged together.
  5. At this point you may reboot the computer back into a normal boot (or simply change to the multiuser or graphical target) and proceed with your yum upgrade.

Running the script via the initramfs allows it to bypass some tricky logic when moving the dynamic linker (ld-linux-2.so). If you want to perform this completely manually, you can read the script that dracut would install in the initramfs at $X and then modify the steps to move the files around without leaving yourself without a ld-linux-2.so at the expected path.

Fedora 15 -> Fedora 16

Во-первых, установить новый gpg-ключ Fedora 16. You may wish to verify this package against https://fedoraproject.org/keys and the fedora ssl certificate.

rpm --import https://fedoraproject.org/static/A82BA4B7.txt

После этого запустите chkconfig --list and note the enabled services; you will need to re-enable these with systemctl enable xxxxx.service after you reboot, as the Package-x-generic-16.pngsysvinit settings aren't propagated into Package-x-generic-16.pngsystemd. See release notes for more details.

Обновите все пакеты с помощью

yum update yum
yum clean all
yum --releasever=16 --disableplugin=presto distro-sync
Warning.png
Bootloader change
После обновления у вас будут установлены пакеты Package-x-generic-16.pnggrub2 и Package-x-generic-16.pnggrub-efi и удален пакет Package-x-generic-16.pnggrub. Однако, grub будет все еще установлен в MBR и загрузка будет работать. Вы можете следовать инструкциям для перехода на grub2, если хотите. При установке пакет Package-x-generic-16.pngfirstaidkit-plugin-grub может препятствовать обновлению; просто удалите его в таком случае.

If your system uses a BIOS, or you installed Fedora via BIOS emulation mode on an EFI system (not native EFI mode), you can switch to Fedora 16's supported grub2 bootloader with the following instructions. If your system was installed by native EFI boot, do not switch to grub2, as its EFI support is still unreliable. Fedora 16's supported bootloader for native EFI installations is still grub-legacy, so you should simply continue to use the system without making any special changes to the bootloader configuration.

Для перехода на grub2 выполните команду su -c '/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg', дальше действуйте согласно инструкциям по переустановке загрузчика.

Known you upgrade -specific issues (for common problems, see references above):

  • Bug 743022 - F15->F16 yum update fails with IMSM (BIOS) raid


Fedora 14 -> Fedora 15

Для начала установите новый GPG ключ для Fedora 15. Для проверки этого пакета на достоверность https://fedoraproject.org/keys и SSL сертификату Fedora выполните следующее:

rpm --import https://fedoraproject.org/static/069C8460.txt

Обновите все пакеты с помощью:

yum update yum
yum clean all
yum --releasever=15 --disableplugin=presto distro-sync
  • Не запускайте эти команды из под X терминала. Тесты показывают, что X сервер может зависать в процессе обновления пакетов со шрифтами.
  • Существуют .drpms, но они не совпадают с новыми ввиду изменения формата, поэтому лучше отключить плагин "presto" путем добавления ключа "--disableplugin=presto" (без кавычек) при запуске пакетного менеджера yum.
  • Screen клиент F15 не позволяет подключаться к F14 screen сессиям. Поэтому, если Вы хотите запустить обновление через screen, Вам необходимо либо обновить screen сначала, либо сделать его отдельную копию для использования в процессе обновления.


Fedora 13 -> Fedora 14

Для начала установите новый gpg-ключ Fedora 14. You may wish to verify this package against https://fedoraproject.org/keys and the fedora ssl certificate.

rpm --import https://fedoraproject.org/static/97A1071F.txt

Обновите все пакеты с помощью

yum update yum
yum --releasever=14 distro-sync --skip-broken
  • Если вы используете VirtualBox из репозитория Oracle, вам необходимо удалить пакет VirtualBox-3.1 перед обновлением. После того, как оно будет закончено, установите VirtualBox-3.2.

Обновление с версий, которые больше не поддерживаются

Note.png
Обновление через yum со старых версий
Информация об обновление через yum со старых версий перенесена в архив. Вы можете найти ее здесь: Обновление через yum с неподдерживаемых версий Fedora