19 dic 2016

Upgrade Debian Squeeze to Wheezy


Paso a paso como migrar entre versiones de Debian y como resolver los  problemas que fueron surgiendo.


Upgrade Debian Squeeze (6.x) to Wheezy (7.x)


https://www.debian.org/releases/wheezy/i386/release-notes/ch-upgrading.en.html#data-backup
  • 4.1.1. Back up any data or configuration information
    El proceso de actualización no modifica nada dentro del directorio /home. Cualquier operación de instalación de paquetes debe ser ejecutada con privilegios de superusuario.
    • tar -czvf /home/etc-before_upgrade.tar.gz /etc
    • dpkg --get-selections "*" > /home/installedPackages_beforeUpgrade.txt
    • tar -czvf /home/before_upgrade/var-lib-dpkg.tar.gz /var/lib/dpkg/
    • tar -czvf /home/before_upgrade/apt-extended_states.tar.gz /var/lib/apt/extended_states
  • 4.1.4. Prepararse para la recuperación
    • 4.1.4.1. Intérprete de línea de órdenes de depuración durante el arranque con initrd
      • Verificar si esta instalado el paquete: initramfs-tools
        Nos provee de un interprete para la depuracion/recuperacion del arranque del intird
  • 4.2. Comprobar el estado del sistema
    • Nada ... make sure your package list still contains references to squeeze
      https://www.debian.org/releases/wheezy/i386/release-notes/ap-old-stuff.en.html#old-upgrade
    • Checking your sources list haciendo apt-get update
      Como Squeeze esta obsoleto, los repo ha sido removido de los servers de debian y esto dara ERROR 404
      • [OPCIONAL] Para verificar que se esta en la ultima version de Squeeze
        • Cambiar /etc/apt/source.list --> "Obteniendo paquetes para Squeeze"
          https://wiki.debian.org/DebianSqueeze#Packages_.26_versions
        • apt-get update && apt-get upgrade
          Esto deberia llevarnos al ultimo release
        • Volver al estado original.
    • Solo dejo en /etc/source.list las urls que apuntan a debian "(debian.org")
  • 4.2.3. Checking packages status
    Verify that all packages are in an upgradable state. The following command will show any packages which ... have a status of Half-Installed or Failed-Config, and those with any error status.
    • dpkg --audit
    • dpkg -l | pager
    • dpkg --get-selections | grep 'hold$'
      It is desirable to remove any holds before upgrading. If any package that is essential for the upgrade is on hold, the upgrade will fail.
  • 4.4. Upgrading packages
    • Next you should double-check that the APT source entries (in /etc/apt/sources.list) refer either to “wheezy” or to “stable”. There should not be any sources entries pointing to squeeze.
  • 4.4.2. Updating the package list
    • apt-get update
      Esto da ERROR: Squeeze no posee las claves publicas GPG de los nuevos repos
    • Debian - Apt-get: error NO_PUBKEY / GPG
      http://es.ccm.net/faq/3594-debian-apt-get-error-no-pubkey-gpg
    • Agregar la claves y volver a ejecutar "apt-get update" deberia actualizar las lista sin problemas.
  • Desisntalar paquetes que causan conflictos
    • dpkg -r debian-security-support
  • 4.4.3. Make sure you have sufficient space for the upgrade
    • apt-get -o APT::Get::Trivial-Only=true dist-upgrade
      Sino hay espacio retorna: "E: You don't have enough free space in /var/cache/apt/archives/."
    • Haciendo espacio
      • apt-get clean
        Limpia la cache de packages
      • apt-get autoremove
      • remove, system logs residing under /var/log/
  • 4.4.4. Kernel flavor selection
    • grep -q '^flags.*\bpae\b' /proc/cpuinfo && echo yes || echo no
      "the above command outputs no" sino hay que cambiar el kernel.
  • 4.4.5. Minimal system upgrade
    • apt-get upgrade (esto da error con acpid)
      This has the effect of upgrading those packages which can be upgraded without requiring any other packages to be removed or installed.
    • Lo anterior da el error:
      Se encontraron errores al procesar: acpid acpi-support-base E: Sub-process /usr/bin/dpkg returned an error code (1)
    • Starting acpi services .. .invoke-rc.d: initscript acpid, action start failed
      https://answers.launchpad.net/ubuntu/+source/acpid/+question/77265
    • Volver a largar el apt-upgrade
  • 4.4.6. Upgrading the system
    • apt-get dist-upgrade
      Preferentemente realizarlo desde la consola del virtualizador
    • reboot
    • "kernel panic - not syncing: VFS: Unable to mount root fs on unknow-block(0,0)"
      http://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0
    • cat /etc/os-release
  • NOTASS !!!
    • Significado del estado de los paquetes dpkg --list
      https://linuxprograms.wordpress.com/2010/05/11/status-dpkg-list/
      • Upgrade del kernel solicita cambiar las etiquetas de los dispositivos por sus UUID en lugar del nombre del dispositivo. Sino se realiza estos cambios puede que el nuevo kernel no reconozca los dispositivos (pj:. /etc/fstabs)
        ES AL PEDO ... LO HACE DE FORMA AUTOMATICA !!!
      • https://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
    • E: The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
      Se soluciona cambiando "squeeze-lts" por "wheezy" en /etc/apt/apt.conf
    • Debian Source.List Generator
      https://debgen.simplylinux.ch/generate.php
    • Set UUID para discos
      https://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
    • Configuring the network interface manually
      https://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manually