Distribution upgrades and cleaning up after them.
by
Dennis Johnson
—
last modified
Jan 28, 2010 04:17 PM
—
filed under:
Install Solutions
This page shows how to clean up after a distribution upgrade.
Applicable to Fedora Versions
- Fedora 10+
Requirements
Explanation of requirements.
- Make a proper backup of your system before making any major changes.
- Before you begin, please insure that you have current software: su -c "yum update"
- Please read the common bugs link: https://fedoraproject.org/wiki/Common_F12_bugs -or- https://fedoraproject.org/wiki/Common_F11_bugs as appropriate.
- Please read https://fedoraproject.org/wiki/How_to_use_PreUpgrade if you use Preupgrade
- Please read http://fedoraproject.org/wiki/YumUpgradeFaq if you are planning on using this method.
Doing the Work
Basic description of what will be done and what is expected.
- Change runlevel to 3 ( http://fedorasolved.org/post-install-solutions/runlevel ) and login as root. You can use "cnetworkmanager" if you need to get networking started without the GUI.
- Update your system:
- (Optional) Install basic components you would have from a new install: You likely want to include the desktop of your choice as well, such as @gnome-desktop or @kde-desktop or @xfce-desktop or @lxde-desktop
- Correct labels and reboot:
- Login again with runlevel 3 and as root. Install yum-utils and print out a list of all the packages that need review: (This will print out packages that have dependency problems as well as packages that are no longer found in your configured repos and any duplicate packages you might have.)
- In most cases, you should remove the versions listed above and install the current distribution version of the package instead if you still use it.
- Create a list of all the files that have verify concerns:
# . /etc/sysconfig/prelink && /usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink/prelink.log 2>&1;
# /sbin/ldconfig;
# rpm -Va > /tmp/rpm-Va.txt 2>&1; - Using the above, create a list of non-configuration files that need review:
-
# egrep -v '^.{9} c /' /tmp/rpm-Va.txt > /tmp/URGENT-REVIEW.txt; - Using the above, create a list of configuration files that need review:
-
# egrep '^.{9} c /' /tmp/rpm-Va.txt > /tmp/REVIEW-CONFIGS.txt; - Review the lists above. Consult "man rpm" under the VERIFY section for the meaning of the first column. You can usually ignore lines if they have a "prelink: /usr/bin/somefile: at least one of file's dependencies has changed since prelinking" type message next to it.
- Locate your changed config files and manually merge the changes:
-
# find /etc -type f -name \*.rpm\*;
# rm /var/lib/rpm/__db.00?;
# yum update --skip-broken;
# rpm -a --setugids; rpm -a --setperms;
# yum install @core @base;
# yum install @base-x @base @core @fonts @input-methods @admin-tools @dial-up @hardware-support @printing memtest86+;
# fixfiles onboot; reboot;
# rpm -Va --nofiles --nodigest;
# yum install yum-utils;
# package-cleanup --problems;
# package-cleanup --orphans;
# package-cleanup --dupes;
Troubleshooting
How to test
Explanation troubleshooting basics and expectations.
- Recreate an initrd image for F12:
-
# dracut -f /boot/initramfs-$(uname -r).img $(uname -r);
- Restore the MBR:
-
# grub-install;
- Common problems 3:
-
$
Common problems and fixes
- Go back and read the release notes, common bugs link and upgrade path
notes:
- Have an issue not covered here? See https://bugzilla.redhat.com/
More Information
Always have a clean backup before you begin any major work on your distribution.
- The absolute best method to upgrade is to backup, and format clean with a fresh install.
- Second best, DVD media - can be on a real DVD or on USB.
- Third best, Preupgrade.
- Last resort option, yum upgrade.
- You cannot use the Livecd media to perform upgrades.
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net
Added Reading
- https://fedoraproject.org/wiki/Common_F11_bugs
- http://docs.fedoraproject.org/
- https://fedoraproject.org/wiki/How_to_use_PreUpgrade and
https://fedoraproject.org/wiki/Common_F12_bugs#Issues_when_upgrading_from_previous_releases and
https://fedorahosted.org/fesco/ticket/270 - http://fedoraproject.org/wiki/YumUpgradeFaq
- http://www.rpm.org/wiki/Docs/RpmRecovery

