Personal tools
You are here: Home Team Members Dennis Johnson Distribution upgrades and cleaning up after them.

Distribution upgrades and cleaning up after them.

by Dennis Johnson last modified Jan 28, 2010 04:17 PM
— filed under:

This page shows how to clean up after a distribution upgrade.

Applicable to Fedora Versions

  • Fedora 10+

Requirements

Explanation of requirements.
  1. Make a proper backup of your system before making any major changes.
  2. Before you begin, please insure that you have current software: su -c "yum update"
  3. Please read the common bugs link: https://fedoraproject.org/wiki/Common_F12_bugs -or- https://fedoraproject.org/wiki/Common_F11_bugs as appropriate.
  4. Please read https://fedoraproject.org/wiki/How_to_use_PreUpgrade if you use Preupgrade
  5. 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.

  1. 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.
  2. Update your system:
  3. # rm /var/lib/rpm/__db.00?;
    # yum update --skip-broken;
    # rpm -a --setugids; rpm -a --setperms;
    # yum install @core @base;
  4. (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 
  5. # yum install @base-x @base @core @fonts @input-methods @admin-tools @dial-up @hardware-support @printing memtest86+;
  6. Correct labels and reboot:
  7. # fixfiles onboot; reboot;
  8. 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.)
  9. # rpm -Va --nofiles --nodigest;
    # yum install yum-utils;
    # package-cleanup --problems;
    # package-cleanup --orphans;
    # package-cleanup --dupes;
  10. 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.
  11. 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;
  12. Using the above, create a list of non-configuration files that need review:
  13. # egrep -v '^.{9}  c /' /tmp/rpm-Va.txt > /tmp/URGENT-REVIEW.txt;
  14. Using the above, create a list of configuration files that need review:
  15. # egrep '^.{9}  c /' /tmp/rpm-Va.txt > /tmp/REVIEW-CONFIGS.txt;
  16. 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.
  17. Locate your changed config files and manually merge the changes:
  18. # find /etc -type f -name \*.rpm\*;

Troubleshooting

How to test

Explanation troubleshooting basics and expectations.
  1. Recreate an initrd image for F12:
  2. # dracut -f /boot/initramfs-$(uname -r).img $(uname -r);
  3. Restore the MBR:
  4. # grub-install;
  5. Common problems 3:
  6. $ 

Common problems and fixes

  • Go back and read the release notes, common bugs link and upgrade path notes:

More Information

Always have a clean backup before you begin any major work on your distribution.

  1. The absolute best method to upgrade is to backup, and format clean with a fresh install.
  2. Second best, DVD media - can be on a real DVD or on USB.
  3. Third best, Preupgrade.
  4. Last resort option, yum upgrade.
  5. 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

Document Actions
Log in


Forgot your password?
New user?