Upgrading Fedora to Newer Version with Yum
Please consider PreUpgrade for upgrading Fedora. This is the recommended method.
This post makes a list of actions should be done to upgrade Fedora using yum. Please note that this is for experienced users only, if you are not sure what you are doing and what do these commands mean, please stop here and read the manuals first, or go to Fedora’s Wiki about upgrading Fediora using yum.
This post aims to be a general method, although we use Fedora 15 to Fedora 16 as the example. We configure and install grub2 as the bootloader.
Clean StuffIt is a good time to remove packages we don’t use. 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.
# package-cleanup --leavesYou can find orphaned packages (i.e. packages not in the repositories anymore). This will also show packages which have been partially uninstalled but where the “%postun” script failed.
# package-cleanup --orphans
Do the upgrade
Go to a text console and run in level 3
ctrl + alt + F2
Update yum first
yum update yum
Clean all cached meta data and packages
yum clean all
Import the key for the newer version’s repositoryFor Fedora 16, it is
rpm --import https://fedoraproject.org/static/A82BA4B7.txt
Synchronizes the installed package set with the latest packages available
yum --releasever=<releasenumberyouwanttosyncto> distro-syncFor upgrading Fedora 15 to Fedora 16:
yum --releasever=16 --disableplugin=presto distro-syncDouble check the updated repositories after distro-sync
yum groupupdate BaseList all other groups
yum grouplistand also update them
yum groupupdate ALL GROUPS LISTED
Use grub2 instead of grubMake configuration for grub2
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfgInstall grub2
/sbin/grub2-install BOOTDEVICEFor example, to install grub2 on sda:
Reset services start/stop priorities
cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done
Reboot the system nowAfter reboot, you may see new kernel version on new Fedora version. For example, kernel 3.1.1 on Fedora 16
[root@localhost ~]# uname -a Linux localhost.localdomain 3.1.1-1.fc16.x8664 #1 SMP Fri Nov 11 21:47:56 UTC 2011 x8664 x8664 x8664 GNU/Linux