From Fedora Project Wiki
(updated links to commonbugs pages)
Line 147: Line 147:
Added Reading
Added Reading


*    https://fedoraproject.org/wiki/Common_F20_bugs
*    https://fedoraproject.org/wiki/Common_F19_bugs
*    https://fedoraproject.org/wiki/Common_F19_bugs
*    https://fedoraproject.org/wiki/Common_F18_bugs
*    https://fedoraproject.org/wiki/Common_F18_bugs

Revision as of 03:07, 23 December 2013

Applicable to Fedora Versions

   All Fedora versions

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_F20_bugs -or- https://fedoraproject.org/wiki/Common_F19_bugs as appropriate.
  4. Please read https://fedoraproject.org/wiki/How_to_use_PreUpgrade if you use Preupgrade
  5. Please read https://fedoraproject.org/wiki/FedUp if you use FedUp
  6. 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 / multiuser (Not graphical. See: https://fedoraproject.org/wiki/Systemd#How_do_I_change_the_runlevel.3F and https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet ) (Use the grub method) and login as root. You can use "cnetworkmanager" or "nmcli" if you need to get networking started without the GUI. Do not launch the GUI. This step is critically important. Do not deviate.
  2. Update your system: (Some warnings at this stage are normal. They should be resolved normally a bit later on.)
    # rm /var/lib/rpm/__db.00?;
    # yum clean all;
    # yum-complete-transaction;
    # yum update --skip-broken;
    # rpm -a --setugids; rpm -a --setperms;
  1. If your installed version is higher than Fedora14 or RHEL6, this will reset capabilities:
    # rpm -Va > /tmp/rpm-Va0.txt 2>&1;
    # awk '/^.{8}P /{print$NF}' /tmp/rpm-Va0.txt \
      |xargs rpm --filecaps -qf \
      |grep '= cap' \
      |while read fileName eq fileCaps; do
        setcap "${fileCaps}" "${fileName}"
      done

    # yum install @core @base;
  1. (Optional) Remove old packages from cache directories
    # DIST=$(rpm --eval '%{dist}'); find /var/cache/yum/ -type f -name \*.rpm |grep -v $DIST |xargs rm -f;
  1. If you have yum-plugin-local installed, you will want to free up spaced it used:
    # DIST=$(rpm --eval '%{dist}'); find /var/lib/yum/plugins/local/ -type f -name \*.rpm |grep -v $DIST |xargs rm -f;
  1. (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
    # yum install @base-x @base @core @fonts @input-methods @admin-tools @dial-up @hardware-support @printing fpaste memtest86+ @gnome-desktop;
  1. Correct labels and reboot: (This command takes about 11 minutes to run on my hardware. Yours may be quicker or slower. Give it time to complete.)
    # fixfiles -R -a restore; restorecon -Rv /home/*/.local/; reboot;
  1. The above command only does the files yum/rpm installed. If you would rather relabel all files on the system, use this instead: (Note: It may take longer on reboot)
    # fixfiles onboot; reboot;
  1. Depending on your version of yum, at least one of these will work. It is sorted from oldest to newest, but they all accomplish the same task. (Disable deltarpm/presto, and synchronizes the installed package set with the latest packages available, this is done by either obsoleting, upgrading or downgrading as appropriate.)
    # yum distribution-synchronization --disableplugin=presto --skip-broken;
    # yum distribution-synchronization --disablepresto --skip-broken;
    # yum distribution-synchronization --setopt=deltarpm=0 --skip-broken;
  1. 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.)
    # rpm -Va --nofiles --nodigest;
    # yum install yum-utils;
    # package-cleanup --problems;
    # package-cleanup --orphans;
    # package-cleanup --dupes;
  1. (optionally locate packages you may not need any longer)
    # package-cleanup --leaves;
  1. 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.
  2. 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;
  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;
  1. Using the above, create a list of configuration files that need review:
    # egrep '^.{9}  c /' /tmp/rpm-Va.txt > /tmp/REVIEW-CONFIGS.txt;
  1. 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.
  2. Locate your changed config files and manually merge the changes (If you have yum-plugin-merge-conf installed, you can use it here to assist as well):
    # yum install rpmconf; rpmconf -a; 
    # find /etc /var -name '*.rpm?*' > /tmp/REVIEW-OBSOLETE-CONFIGS.txt;

Troubleshooting

How to test Explanation troubleshooting basics and expectations.

  1. Recreate an initrd image for F12+:
    # dracut -f /boot/initramfs-$(uname -r).img $(uname -r);
  2. Restore the MBR:
    # grub-install;
    # grub2-mkconfig -o /boot/grub2/grub.cfg;
  3. Xorg refuses to start. This happens typically if you had an old version, or if you had nvidia.ko / fglrx.ko / catalyst.ko drivers. Move the xorg.conf out of the way and regenerate a new one.
    # mv /etc/X11/xorg.conf /root/xorg.conf.save

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 / FedUp.
  • Last resort option, for experienced users only, 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

Sample Scripts

Questions / Comments?