From Fedora Project Wiki

m (Fixed the block device name for /boot in the examples)
(update to note fedup has also now been replaced)
(43 intermediate revisions by 22 users not shown)
Line 1: Line 1:
[[Category:Documentation]][[Category:How to]][[Category:PreUpgrade]]
PreUpgrade is an application users run on an existing Fedora 8 or above installation, that resolves and downloads packages required to upgrade Fedora. While PreUpgrade downloads the necessary packages, users are free to continue using their systems. This gives an experience similar to a live upgrade.  For additional information, please refer to the [[Features/PreUpgrade|PreUpgrade feature page]].
{{admon/warning|Preupgrade is obsolete |Preupgrade does not at present and will not ever work for upgrading to {{FedoraVersion|long|18}}, or any version after that. It was replaced by [[FedUp]], which was itself replaced by the [[DNF_system_upgrade]] plugin.}}
{{admon/tip|Upgrade to current|Preupgrade provides an upgrade directly to the latest version of Fedora.  It is not necessary to upgrade to intermediate versions.  For example, it is possible to go from {{FedoraVersion|long|previous2}} to {{FedoraVersion|long|current}} directly.}}
= Prepare the system =
[[Category:How to]]
While preupgrade provides a generally hassle free upgrade experience.  The following steps are recommended before proceeding.
# ''Backup'' - Before performing any system maintenance, it is recommended that you back up all important data before proceeding.
# ''Update'' - Apply available updates Fedora updates before proceeding.  As the root user, issue the following command. <pre>yum update</pre>
# ''Install'' - As of {{FedoraVersion|long|10}}, the preupgrade utility is included in a default Fedora install.  However, the package can be installed manually using the {{command|yum}} command. <pre>yum install preupgrade</pre>
= Perform the upgrade =
Typically, you will be prompted by {{package|PackageKit}} when upgrades are available for your system.  However, if you choose to manually upgrade using {{command|preupgrade}}, the steps are listed below.
# As the root user, run the command {{command|preupgrade}} to start the Preupgrade application.  If you prefer a command line application, the command {{command|preupgrade-cli}} is available.
# On the ''Choose desired release'' screen, select the Fedora release you want to upgrade to , and click the ''Apply'' button.
# When all of the packages have downloaded, reboot your system to start the Fedora installer and upgrade to the next release.
= Common post-upgrade tasks =
After the upgrade is complete, additional steps are recommended to complete the process.
== Removing unsupported packages ==
Some packages may no longer be supported by the new release.  You may wish to remove these packages because they will no longer get security updates, and they may cause later conflicts with supported packages.  These can be identified with the following command: <pre>package-cleanup --orphans</pre>
== Examine {{filename|.rpmsave}} and {{filename|.rpmnew}} files ==
After completing the upgrade process, you may notice file names ending with {{filename|.rpmsave}} and {{filename|.rpmnew}}.  Don't be alarmed.  The upgrade process will always preserve any locally modified configuration files.  The file names ending with {{filename|.rpmsave}} contain your local configuration changes.  While the file names ending with {{filename|.rpmnew}} represent the configuration file originally packages with the software.
You should examine all {{filename|.rpmsave}} and {{filename|.rpmnew}} files created by the upgrade.  Depending on the differences, you may need to manually merge configuration files.  You can locate all matching files using the {{command|find}} command.
<pre>find / -print | egrep "rpmnew$|rpmsave$"</pre>
= Troubleshooting =
== Not enough space in /boot ==
The default {{filename|/boot}} filesystem size of 200MB hits a bug in preupgrade when upgrading to Fedora 12.  In many cases, the diskspace that is likely free is just enough for preupgrade to find enough space to download the installer to but not quite enough for us to run the installer and install the new kernel after reboot.  This section outlines several tips that have been known to work.  As always when performing administrative tasks, be sure to back-up any data before proceeding.
There are two basic methods to make preupgrade work in this situation.  In the first method, you need to free up sufficient space for the installer to install the new kernel packages.  In the second method, you need to temporarily fill up enough of the space on {{filename|/boot}} to force preupgrade to download the installer after rebooting.
=== Method 1: Free up space ===
'''First''', try to remove any kernel packages not currently in use on your system.  The [] script can be used to identify kernels that may be safely removed.  If you choose to remove additional kernels, be prepared with [ installation media] should you be unable to return to your previously installed system.
The installer will need approximately 26M of free space in /boot.  Use the following command to determine the amount of free space in the /boot partition:
df -h /boot
To identify kernels that may be safely removed, run the following from a command line:
curl -O ''
chmod a+x
Now, to actually remove the kernel versions listed by the above command, run the following as root:
# PKGS=`./`
# echo $PKGS
# yum remove $PKGS
'''Next''', adjust the number of reserved filesystem blocks using the command {{command|tune2fs}}.  You'll first need to identify the block device for your {{filename|/boot}} file system.  In the example below, {{filename|/dev/sda1}} is the block device for the {{filename|/boot}} filesystem.
<pre># mount | grep "/boot"
/dev/sda1 on /boot type ext4 (rw)</pre>
Now, adjust the number of reserved blocks for the {{filename|/boot}} filesystem using the command {{command|tune2fs}}. Normally, a small amount of space on ext filesystem formatted partitions is 'reserved' and can only be used by the system administrator; this is to prevent an entirely full partition from rendering a system unbootable, and allow the administrator some space in which to work in order to clean up 'full' partitions. However, neither of this cases really applies to the {{filename|/boot}} filesystem, so removing this reserved space is safe.
<pre># tune2fs -r 0 /dev/sda1</pre>
'''Last''', try removing unnecessary files from the {{filename|/boot}} filesystem.  This will largely depend on how your system is set up.  Removing the incorrect files may result in a unbootable system.  Some candidates for removal include {{filename|/boot/efi}} and {{filename|/boot/grub/splash.xpm.gz}}.
=== Method 2: Trick preupgrade into downloading the installer ===
This method requires you to have a wired connection to the internet during the install.  If you are on wireless and cannot connect via an ethernet cable you will have to use Method 1 instead.
'''First''', find out how much space is available on the {{filename|/boot}} filesystem.  {{command|df}} is the command you want for this:
$ df /boot
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sda1              198337    30543    157554  17% /boot
'''Second''', create a file that takes up enough space that preupgrade decides it cannot install stage2 now.  Preupgrade needs approximately 120MB for the installer image so we'll make sure we have a bit less than 100MB.  For the example filesystem, that means we need to fill up 60MB.  Here's how to do that as root:
# dd if=/dev/zero of=/boot/preupgrade_filler bs=1024 count=61440
# df /boot
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sda1              198337    92224    95873  50% /boot
'''Third''', run preupgrade as normal.  In the early stages, before downloading packages, preupgrade should tell you that there wasn't enough room to download part of the installer but it can download it after reboot if you have a wired connection to the network.  You can click continue for that.  When preupgrade is done don't reboot immediately.  Instead, remove the {{filename|/boot/preupgrade_filler}} file and make sure your computer is connected to the network via an ethernet cable.  Then you can reboot.
# rm /boot/preupgrade_filler
'''Fourth''', the computer should boot into the installer, connect to the internet via the ethernet cable and start downloading the stage2 installer image.  Then it should continue upgrading as normal.

Latest revision as of 18:59, 2 November 2015

Preupgrade is obsolete
Preupgrade does not at present and will not ever work for upgrading to Fedora 18, or any version after that. It was replaced by FedUp, which was itself replaced by the DNF_system_upgrade plugin.