From Fedora Project Wiki

(change to use --releasever)
No edit summary
Line 75: Line 75:
</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.}}
{{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.  you can try running yum distro-sync and package-cleanup --problems to try and fix the problems. }}


{{admon/tip|Update all packages at once| Although you can try to update the update machinery first with <code>yum update rpm\* yum\*</code> or with <code>glibc</code>, in both cases dependencies might expand it to an almost full upgrade anyway, and simply doing a full upgrade might be more safe (but your mileage may vary). (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.)
{{admon/tip|Update all packages at once| Although you can try to update the update machinery first with <code>yum update rpm\* yum\*</code> or with <code>glibc</code>, in both cases dependencies might expand it to an almost full upgrade anyway, and simply doing a full upgrade might be more safe (but your mileage may vary). (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.)

Revision as of 16:53, 31 October 2010

This page contains information explaining how to upgrade Fedora using yum.

Recommendations

The recommended installation method is with a boot media with the Anaconda installer as detailed in the Installation Guide.

PreUpgrade is a slightly different upgrade method where all the packages are downloaded before the system is rebooted into the Anaconda installer.

For direct yum upgrades

Although upgrades with yum works, it is not explicitly tested as part of the release process by the Fedora Project. If you are not prepared to resolve issues on your own if things break, you should probably use the recommended installation methods instead.

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.

Participate

If you are upgrading using Yum and it shows any general dependency issues, please file them in http://bugzilla.redhat.com. But please read this page, all references pages and search the mailing list archives before filing bugs. And of course, please help keep this page updated.

If you want to help make live upgrades work smoothly, join the Live Upgrade Special Interest Group.

Instructions to upgrade using yum

1. Back up your system

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.

2. Read about common problems

Further down in this page there is a list of common problems for specific versions. Some of them require attention before the upgrade.

General advice on upgrading Fedora can be found on the Upgrading page. You should also read the Installation Guide and Release Notes for the version you plan to upgrade to - they contain important information regarding upgrading issues. Finally, check the list of Common bugs.

3. Clean Stuff

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.)

Find unused config files
Merge and resolve the changes found by the following script: for a in $(find /etc /var -name '*.rpm?*'); do diff -u $a ${a%.rpm?*}; done

Now is a good time to remove packages you don't use - especially non-standard packages.

Find and review "unused" packages
You can find packages not required by other packages with the tool package-cleanup from the yum-utils package: yum install yum-utils; package-cleanup --leaves. These packages could be candidates for removal, but check to see whether you use them directly or if they are used by applications not backed by rpm packages. Remove them with yum remove package-name-and-version.
Another useful tool for cleaning up unused packages is rpmreaper. It's an ncurses application that lets you view rpm dependency graph and mark packages for deletion. Marking one package can make other packages leaf, which you can see immediately, so you don't have to run the tool several times to get rid of whole sub-tree of unused packages. Install with: yum install rpmreaper.
Find and review "lost" packages
You can find orphaned packages (ie packages not in the repositories anymore) with: package-cleanup --orphans. This will also show packages which have been partially uninstalled but where the "%postun" script failed.

Then remove all traces of the version you are leaving from the yum cache in /var/cache/yum.

yum clean all

5. Do the upgrade

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 most of the time you will 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.

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

ctrl + alt + F2

(or)

log in as root, and go into runlevel 3

init 3
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. you can try running yum distro-sync and package-cleanup --problems to try and fix the problems.
Update all packages at once
Although you can try to update the update machinery first with yum update rpm\* yum\* or with glibc, in both cases dependencies might expand it to an almost full upgrade anyway, and simply doing a full upgrade might be more safe (but your mileage may vary). (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.)

Upgrade all packages with

yum update yum
yum --releasever=14 update --skip-broken

This 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.

Ensure that all (new) essential packages from the new version are installed with

yum groupupdate Base

You might want to update other groups too, see

yum grouplist

For example

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"

6. Preparing for reboot

Before booting you should usually install the bootloader from your new grub by running

/sbin/grub-install BOOTDEVICE

- where BOOTDEVICE is usually /dev/sda (If you get an error '/dev/sda does not have any corresponding BIOS drive' from that, then try /sbin/grub-install --recheck /dev/sda.)

Also, the order of init scripts could have changed from the previous version. A command to reset the order is:

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

Again, run package-cleanup --orphans to find packages that haven't been upgraded.

Version specific notes

From pre-release

If you are upgrading to a final release from an alpha, beta, preview, or other Rawhide release, please see Upgrading from pre-release to final.

To development version

yum update yum
yum --releasever=rawhide update --skip-broken

Fedora 13 -> Fedora 14

Upgrade all packages with

yum update yum
yum --releasever=14 update --skip-broken


Fedora 12 -> Fedora 13

  • Testing shows that upgrading within X will cause X to hang when installing bitmap-fonts-compat, but it can be done anyway by making sure that bitmap-fonts-compat is the last package to update ... YMMV.
  • Intel video no longer works without Kernel Mode Setting (KMS). You must remove 'nomodeset' from your /etc/grub.conf kernel command line, if present.
  • nVidia video no longer works without kernel mode Setting (KMS). You must remove 'nomodeset' from your /etc/grub.conf kernel command line, if present.
  • It may be necessary to run "db_recover -h /var/lib/ldap/ ; chown ldap:ldap /var/lib/ldap/*" once in order for slapd to start.

Fedora 11 -> Fedora 12

  • All Fedora 12 RPM packages use XZ/LZMA compression, which is only supported by the rpm-4.7.1-1 update (or later) for Fedora 11. Before upgrading from Fedora 11, run yum update rpm.
  • 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.
  • Upgrades from Fedora 11 might currently fail with missing dependencies (for example related to totem-gstreamer or PolicyKit-kde). The dependencies are ok, but Fedora 11 yum has problems resolving them (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 rootflags - initramfs does not pick up the options the way initrd used to. e.g. if you mount your root with the flags data=journal,relatime then you would add to the end of the 'kernel' line in grub.conf: rootflags=data=journal,relatime . After updating to dracut-004-4.fc12 or later, this kernel flag can be removed.