27 ene 2014

Upgrade #FreeBSD 8.x to #FreeBSD 9.x

Upgrade #FreeBSD 8.2 to #FreeBSD 9.0


Ref: http://www.freebsd.org/releases/9.0R/installation.html
  • 2 Upgrading FreeBSD
    • 3 Upgrading from previous releases of FreeBSD
      Ref: http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE
      • The binary upgrade procedure will update unmodified userland utilities, as well as a unmodified GENERIC kernel distributed as a part of an official FreeBSD release.
      • Host being upgraded have Internet connectivity.
      • Upgrading FreeBSD should, of course, only be attempted after backing up all data and configuration files.
        Aquí lo que se debe rescatar son principalmente los archivos en /etc y /usr/local/etc
      • 3.2 User-visible incompatibilities
        Ref: http://www.freebsd.org/releases/9.0R/errata.html
        • 3 Open Issues
          Ref: http://www.freebsd.org/releases/9.0R/errata.html
          • In some releases prior to 9.0-RELEASE, upgrading by using freebsd-update(8) can fail.
            Ref: http://www.freebsd.org/security/advisories/FreeBSD-EN-12:01.freebsd-update.asc
            Ver --> II. Problem Description freebsd-update When this bug is triggered, updates fail with the following error message: >
            The update metadata is correctly signed, but failed an integrity check. Cowardly refusing to proceed any further. Como consecuencia los sistemas afectados no se pueden actualizar a FreeBSD 9.0 usando freebsd-update. Seguir los siguiente pasos del documento 1), 2) y 3)
            • # patch < /tmp/freebsd-update.patch
              Hmm... Looks like a unified diff to me...

              The text leading up to this was:

              |Index: usr.sbin/freebsd-update/freebsd-update.sh |=================================================================== |--- usr.sbin/freebsd-update/freebsd-update.sh (revision 226649)

              |+++ usr.sbin/freebsd-update/freebsd-update.sh (revision 226650)

              Patching file usr.sbin/freebsd-update/freebsd-update.sh using Plan A... Hunk #1 succeeded at 1185 (offset -15 lines). done
          • [amd64, i386] FreeBSD 9.0-RELEASE includes several changes to improve resource management of PCI devices.
          • A devctl(4) event upon arrival of a ugen(4) device has been changed. The event now includes ugen and cdev variables instead of device-name.
          • 9.0-RELEASE fails to configure an interface specified in the rc.conf(5) variable ipv6_prefix_IF ....
      • 3.2.2 Partition Metadata Integrity Check
        Puede suceder que se produzca el error: "GEOM_PART: Integrity check failed" de forma silenciosa y que el sistema no quiere bootear despues de upgrading a FreeBSD 9.0. En este caso seguir este punto.
      • 3.2.3 ATA/SATA subsystem now cam(4)-based
      • 3.2.4 Network Configuration Changes in /etc/rc.conf
      • 3.2.5 Openresolv and /etc/resolv.conf
      • 3.2.6 Disk Partition Management Utilities
    • 2.2 Upgrading Using “FreeBSD Update”
      freebsd-update fetch/install ya fue realizado cuando se instalo el parche.
      • # freebsd-update upgrade -r 9.0-RELEASE
        Now the freebsd-update(8) utility can fetch bits belonging to 9.0-RELEASE. During this process freebsd-update(8) will ask for help in merging configuration files.
        The following components of FreeBSD seem to be installed: kernel/generic src/base src/bin src/cddl src/contrib src/crypto src/etc src/games src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin world/base world/catpages world/dict world/doc world/games world/info world/manpages world/proflibs The following components of FreeBSD do not seem to be installed:
        Does this look reasonable (y/n)?
      • # freebsd-update install
        Installing updates... rmdir: ///boot/kernel: Directory not empty Kernel updates have been installed. Please reboot and run "/usr/sbin/freebsd-update install" again to finish installing updates.
      • # shutdown -r now
        The system must now be rebooted with the newly installed kernel before the non-kernel components are updated.
      • # freebsd-update install
        After rebooting, freebsd-update(8) needs to be run again to install the new userland components:
        Installing updates...rmdir: ///usr/src/usr.sbin/freebsd-update: Directory not empty rmdir: ///usr/src/usr.sbin: Directory not empty
        Completing this upgrade requires removing old shared object files. Please rebuild all installed 3rd party software (e.g., programs installed from the ports tree) and then run "/usr/sbin/freebsd-update install" again to finish installing updates.
        The easiest way to do this is to run portupgrade (if you don’t have portupgrade, install it from ‘sysutils/portupgrade’): http://goo.gl/UlVqw
      • rm /var/db/pkg/pkgdb.db && pkgdb -Ffuv && portupgrade -afp
        I added the ‘p’-flag, as this allows you to run ‘portupgrade -afP’ on other nodes (assuming you have a shared ports-tree) and just install the packages without having to re-compile them. Ref: http://goo.gl/UlVqw
      • # pkg_version -v | grep "<" | awk '{ print $1}' | xargs -J % portupgrade % &
      • # freebsd-update install
        At this point, users of systems being upgraded from FreeBSD 8.2-RELEASE or earlier will be prompted by freebsd-update(8) to rebuild all third-party applications
      • # shutdown -r now