Tools/yum/YumUpgradeFaq

From FedoraProject

Jump to: navigation, search


Duplicate page
I resurected the content of this page as it was marked as damaged after conversion, but more actual one is at YumUpgradeFaq. This one should be probably removed.

Contents

Upgrading Fedora Using Yum

Caution

Although upgrades with yum have been tested and work, live upgrades are not recommended by the Fedora Project.If you are not prepared to resolve issues on your own if things break, you should probably use the recommend installation methods instead.With a typical installation, this method usually works well, but it can break third-party packages not available in the Fedora repositories.Please search the mailing list archives first if you run into problems.

The recommended installation method is detailed in the Installation Guide:

http://docs.fedoraproject.org/fedora-install-guide-en/

The release notes also have some useful information:

http://docs.fedoraproject.org/release-notes/f8/en_US/sn-Installer.html#Upgrade-Related-Issues

Other details on upgrading Fedora is available from the wiki page DistributionUpgrades.

Participate

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

Feedback

If you are upgrading using Yum and it shows up any general dependency issues, please file them in http://bugzilla.redhat.com.

Instructions to upgrade using yum

These instructions can be used directly for upgrading from version to version+1, but the principle is the same for all upgrades.

Read about common problems

Further down in this page there's a list of common problems. Some of them require attention before the upgrade.

Clean Stuff

Run the following command first to ensure that you dont run into any residual dependency issues

Tip: Review and remove all .rpmsave and .rpmnew files before and after upgrading. Merge and resolve the changes found by the following script:

 for a in $(find /etc /var -name '*.rpm?*'); do b=${a%.rpm?*}; diff -u $a $b; done  

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

If you have packages from 3rd party repos installed then make sure that these repos are enabled and ready for the new version. The upgrade might fail if there are outdated dependencies from packages not backed by a yum repo or backed by a repo which isn't ready for the new version.

Tip: Find and review "lost" packages. You can find orphaned packages (ie packages not in the repositories anymore) with the tool package-cleanup from the yum-utils package

 yum install yum-utils; package-cleanup --orphans

Old packages with a failing "%postun" script will remain partly installed. Remove them with

 rpm -e package-name-and-version

It's often helpful to run this command after the update, too.

Make sure you have the yum-fastestmirror package installed so that yum uses the "best" mirror.

 yum install yum-fastestmirror

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

 yum clean all

Switch repositories

Update the package deciding which yum repositories to use:

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

For Fedora 9, as an example,

 rpm -Uhv ftp://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/Packages/fedora-release-*.noarch.rpm 

(The archicture doesn't matter for this noarch package.)

Make sure the new repo files isn't placed as .rpmnew files, perhaps by

 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

Also make sure that all the 3rd party repos you normally use point to the repository for the new Fedora release.

Do the upgrade

It is a good idea to do this outside the graphical environment. Log out of your graphical desktop and then go to a text console <key>Ctrl + Alt +F1</key>.

log in as root, and go into runlevel 3

 telinit 3

Tip: Update important packages first. You can start try to update the update machinery first with

 yum update rpm\* yum\*

Another idea is to start with glibc. In both cases dependencies might however expand it to an almost full upgrade anyway. And doing a full upgrade might be more safe. YMMV.

Upgrade all packages with

 yum upgrade

yum might complain about conflicts or requirements. That is probably because you have used non-standard repositores or installed non-standard packages manually. Try to guess which packages causes 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 is 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"

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

 grub-install BOOTDEVICE

- where BOOTDEVICE usually is /dev/sda.

Version specific notes

Fedora 8 -> Fedora 9

(One test upgrade from Fedora 7 was problematic for several (potentially irrelevant) reasons. Upgrading from X seems to be a bad idea. YMMV. More testing to come.)

Fedora 7 -> Fedora 8

 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
 rpm -e --noscripts avahi-0.6.17-1.fc7
 yum erase dbus.i386
 yum shell
 > erase dbus.i386
 > update
 > run
 yum erase kde{accessibility{,-devel},base,edu,graphics,multimedia{,-extras},network,sdk,utils{,-devel},webdev}.i386
 yum erase beryl\*

Fedora Core 6 -> Fedora 7

LVM Volumes are not affected.

Fedora Core 5 -> Fedora Core 6

Fedora Core 4 -> Fedora Core 5

 yum install kernel 
 yum remove kernel-2.6.14*
 rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/fedora-release-5-5.noarch.rpm 
 yum update
 /sbin/fixfiles relabel

Fedora Core 3 -> Fedora Core 4

 yum update yum

Problems:

 yum update kernel
 reboot
 yum remove kernel-2.6.11\*FC3\*
 yum upgrade
 reboot

Reading repository metadata in from local files 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.

 yum remove perl.i386
 TODO: Add list of bonobo i386 packages to remove here

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:

 yum remove koffice

then your update should complete.

Seems related to Bug 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):

 : > /var/log/lastlog
 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) 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.

Edit /etc/yum.repos.d/fedora.repo and replace the line

 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

with:

 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY


 diskspacecheck=0

in /etc/yum.conf. 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.

 sudo rpm -e gcc32
 sudo depmod -ae -F /boot/System.map-[your uname -a kernel version here] 

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

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