From Fedora Project Wiki

< Tools‎ | yum

(automatically fix double redirect (fedora-wiki.git/fix_double_redirects.py))
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- page was renamed from YumUpgradeFaq
#REDIRECT [[Upgrading Fedora using yum]]
-->
{{needs love}}  Wiki damage, content missing after conversion.
 
= 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 FC6 to FC7, but the principle is the same for all upgrades.
 
=== 1. Read about common problems ===
 
Further down in this page there's a list of common problems. Some of them require attention before the upgrade.
 
=== 2. 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
 
=== 3. 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 <code>noarch</code> package.)
 
Make sure the new repo files isn't placed as <code>.rpmnew</code> 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.
 
=== 4. Do the upgrade ===
 
Upgrade all packages with
 
<pre>
yum upgrade
</pre>
 
<code>yum</code> 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
 
<pre>
yum groupupdate Base
</pre>
 
You might want to update other groups too (see <code> yum grouplist </code>).
 
 
== Common Problems ==
 
=== F7 -> F8 ===
 
* 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:
<pre>
yum erase kde{accessibility{,-devel},base,edu,graphics,multimedia{,-extras},network,sdk,utils{,-devel},webdev}.i386
</pre>
 
Until F8 is finally released you can upgrade to the latest(?) F8 beta by installing
 
<pre>
rpm -Uhv ftp://download.fedora.redhat.com/pub/fedora/linux/releases/test/7.92/Fedora/i386/os/Packages/fedora-release-*.noarch.rpm
</pre>
 
Yum should have been improved in F8, so you might want to upgrade yum before upgrading everything else:
 
<pre>
yum upgrade rpm* yum*
</pre>
 
=== FC6 -> F7 ===
 
* 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, hdd will not necessarily become sdd for example.  Be sure to change all references to /dev/hd.. in your config, especially /etc/fstab  before you reboot.  It may be simpler to refer to filesystems by label (check out the programs <code>blkid</code>, <code>tune2fs</code>, and <code>mlabel</code>).
 
LVM Volumes are not affected.
 
* 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.
 
* If the system hangs after reboot with a GRUB message, then boot into rescue mode, <code>chroot /mnt/sysimage</code>, and run something like <code>grub-install /dev/sda</code> - check that it uses the right device mapping. [TODO: If this is a common problem, then it should be a general advice to do this before booting. Do you or do you now know when it happens? MadsKiilerich]
 
* 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>.
 
=== FC5 -> FC6 ===
 
* 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>.
 
=== FC4 -> FC5 ===
 
* Before upgrading update your kernel first.
<pre>
 
* 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
<pre>
 
* 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.
<pre>
* Update your system
<pre>
* After upgrading, selinux permissions may be incorrect, causing interesting failures such as metacity not starting. As suggested below, to fix this, run
<pre>
 
 
=== FC3 -> FC4 ===
* make sure you're on the latest version of yum for FC3:
<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:
 
* 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.
 
* kernel requires kernel-utils (or vice-versa) run:
<pre>
yum update kernel
reboot
yum remove kernel-2.6.11\*FC3\*
yum upgrade
reboot
</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>
yum remove perl.i386
TODO: Add list of bonobo i386 packages to remove here
</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"
 
Seems related to [https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155730 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):
<pre>
: > /var/log/lastlog
</pre>
 
* GPG check fails with this message :
<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)
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.
* 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>
diskspacecheck=0
</code> in <code>/etc/yum.conf</code>.
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>
sudo depmod -ae -F /boot/System.map-[your <code>uname -a</code> kernel version here]
</pre>
 
* Yum has been reported to be hanging after upgrading. Updating the pysqlite package might fix it.
 
=== FC2 -> FC3 ===
Go here for most of this info:
http://linux.duke.edu/~skvidal/misc/fc2-fc3-update-with-yum.txt
 
=== FC1 -> FC2 ===
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]]

Latest revision as of 20:53, 14 November 2009