[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


TRADUCIENDO BY M3RSY

Actualización de Slackware a una nueva versión

Actualizar o instalar desde cero

Instalar Slackware desde cero y desde cero es siempre el mejor método si está ejecutando una versión bastante antigua de Slackware y desea omitir algunas. Se habrán producido demasiados cambios intrusivos en la distribución si su Slackware es relativamente antiguo. Hará que el proceso de actualización manual sea doloroso y no garantizará el éxito. En tales casos, es mejor hacer una copia de seguridad de su lista de paquetes
En tales casos, es mejor hacer una copia de seguridad de su lista de paquetes (“ls -lart /var/log/packages”), una copia de seguridad de su “/etc” directorio “ ” y (usted ya hizo esto, por supuesto) una copia de seguridad de sus datos personales. Formatee su disco e instale desde el medio de arranque Slackware, y una hora más tarde ya podría estar en el negocio.

Si desea actualizar a la próxima versión de Slackware, puede hacerlo manualmente siguiendo las instrucciones en el archivo “UPGRADE.TXT” ue encontrará en la raíz del DVD / CD1 de Slackware. Puede encontrar instrucciones avanzadas y más sugerencias en “CHANGES_AND_HINTS.TXT” en la misma ubicación. También hay un procedimiento semiautomático para este tipo de actualización, usando slackpkg. Te quitará mucho trabajo duro.

Yo siempre utilizo slackpkg (con cuidado) para actualizar mis sistemas Slackware de una versión estable a la siguiente. Yo llamo a este proceso una “actualizacion de sistema”. Puede usar el mismo procedimiento para migrar a slackware-current, mantener actualizado un sistema de slackware-current o actualizar de un slackware no tan actual a una versión estable recién lanzada.

Considerations about the Kernel

Solo correr slackpkg y esperar lo mejor no va a funcionar. Hay que tener en cuenta algunas consideraciones. Una cosa importante para recordar:

Nunca actualices tu núcleo de trabajo.

¿Porqué es eso? Simple: estará actualizando potencialmente cientos de paquetes y debe estar preparado para el improbable caso de que su computadora no funcione correctamente después de una actualización del sistema. Una cosa por la que no quiere que lo golpeen es un sistema que no arranca en absoluto. Una nueva versión de Slackware puede instalar un kernel que se niega a iniciar su computadora (pocas posibilidades, pero sin embargo … prepárese). Por esa razón, necesita mantener su núcleo de trabajo “antiguo” instalado y mantener una sección para él en su /etc/lilo.conf De esa manera, si el nuevo kernel no se inicia, puede retroceder al kernel anterior y comenzar a investigar qué fue lo que falló.
Básicamente, estas son las mismas precauciones que debe tomar cuando compile un nuevo kernel

Consideraciones del controlador de video

Si su computadora está equipada con una tarjeta de video alimentada por un procesador de gráficosNvidia o Ati y ha instalado los controladores de gráficos acelerados de estas compañías (de código cerrado y solo binarios), no debe intentar iniciar una sesión X después de actualizar a la siguiente Lanzamiento de Slackware.
Estos controladores dependen de la versión del kernel, la versión de Mesa y el servidor X.Org. Debe volver a instalar el controlador binario antes de iniciar el modo gráfico. Además, los paquetes mesa y xorg-server de Slackware sobrescriben los archivos esenciales de estos controladores de gráficos acelerados de código cerrado de todos modos.

Si desea saber cómo tratar con estos controladores binarios, tenemos instrucciones más detalladas en el artículo“Controladores de graficos propietario” en este wiki.

Slackpkg considereaciones

Si actualiza Slackware (consulte a continuación el procedimiento), actualizará slackpkg as one of the first steps. The upgradepkg como uno de los primeros pasos. El upgradepkgcomando instalará un archivo/etc/slackpkg/mirrors.new. Este es el archivo que contiene las URL para los espejos que llevan la nueva versión de Slackware. Tendrá que comparar esto con la versión original y fusionar los contenidos.

Asegúrese de tener exactamente una línea sin comentarios, lo que apunta a un espejo para la versión y arquitectura de Slackware deseadas.

Actualización del sistema utilizando SlackPkg

Los siguientes pasos deberían funcionar para todas las situaciones:

  • Lista Negra los siguientes paquetes de kernel en “/etc/slackpkg/blacklist”:
    kernel-generic
    kernel-generic-smp
    kernel-huge
    kernel-huge-smp
    kernel-modules
    kernel-modules-smp

    Esto evitará una actualización accidental de su núcleo de trabajo.

  • Lista negra de paquetes de repositorios de terceros agregando líneas apropiadas para sus etiquetas de repositorio. Ejemplos para SlackBuilds.org, AlienBOB y multilib:
    [0-9]+_SBo
    [0-9]+alien
    [0-9]+compat32
  • Si se han agregado nuevos kernel (s) a la versión de Slackware a la que está actualizando, entonces use “installpkg” para instalar esos nuevos paquetes de kernel primero (no use “upgradepkg” bporque borrará su kernel existente).
    Deberá instalar al menos un kernel (kernel-generic, kernel-generic-smp, kernel-enorme o kernel-huge-smp) y el paquete de módulos del kernel correspondiente (kernel-modules o kernel-modules-smp).

No se puede utilizar slackpkg para este paso.

  • NAhora que tenemos los nuevos kernel (s) más módulos en su lugar, podemos comenzar a actualizar el resto de los paquetes. Primero, actualice la slackpkg base de datos del paquete:
    # slackpkg update
  • Cuando slackpkg ha actualizado su base de datos interna, lo primero que debe hacer es actualizarse slackpkg la última versión (incluidas las URL para la nueva versión de Slackware y cualquier regla de actualización de paquetes que se aplique a la nueva versión). Si no realiza este paso, slackpkg se actualizará en la mitad de la actualización del sistema, y se cancelará inmediatamente después de eso …
    # slackpkg upgrade slackpkg
    # slackpkg new-config

    That final new-config command is there so that you can view the difference betweeen your old and the new slackpkg configuration files, in particular /etc/slackpkg/mirrors and /etc/slackpkg/blacklist are files you have to check. Overwriting /etc/slackpkg/slackpkg.conf is usually recommended.

  • A new Slackware release usually has a newer version of the GNU C libraries. The new packages are compiled against that new glibc version. In order to prevent an upgrade failure, you need to upgrade the glibc-solibs package manually, immediately after upgrading slackpkg:
    # slackpkg upgrade glibc-solibs

    Let me give an example of such potential failure: when slackpkg install-new installs the libusb-compat package, your gpg command stops working because it links against libusb.so which will be overwritten with the version from the new libusb-compat package. The new library needs the new glibc package, gpg stops working because of the library linking error, and slackpkg will stop the system upgrade because it wants to check every package's gpg signature before upgrading it. Upgrading the glibc-solibs package prevents the library linking errors by providing the correct “GLIBC” symbols.

  • Let slackpkg update the computer to the new Slackware release:
    # slackpkg install-new
    # slackpkg upgrade-all
    # slackpkg clean-system
    • The first of those three commands (slackpkg install-new) will install every package which is marked in the Slackware ChangeLog.txt file with the string “Added.” This command will not install any other packages which are not yet installed.
      For instance if you did not have KDE installed before, the “slackpkg install-new” command will not add KDE packages to your computer all of a sudden.
    • The second command (slackpkg upgrade-all) will compare every official Slackware package which you currently have installed, with the package list on your Slackware mirror. If a different version is available, that version will be (downloaded and) upgraded. 1)
    • The third commmand (slackpkg clean-system) will show you an overview of all packages that you currently have installed and are not part of the Slackware Linux release you are upgrading to. This means, the list will show all packages which has been removed from Slackware. Examples for Slackware 14 are kdeaccessibility, kdebase, … Another example of such abandoned package in Slackware 14 is ntfsprogs. Actually this package was not removed but renamed… for Slackware that is equal to a package removal plus addition.
      The command will also show you every 3rd party package which you have installed! Use this command wisely: you must de-select every package which you want to keep (i.e. all 3rd party packages) and then click “OK” to let slackpkg remove all obsolete packages.
  • A massive upgrade like this will have installed several “.new” files. Some packages contain configuration files which have been renamed (inside the package) with a “.new” extension so that an existing configuration file (containing your customizations) will not be recklessly overwritten during the upgrade. Slackpkg will do a check for the existence of these “.new” files at the end of an upgrade or install and prompt you to do something with them.
    You are advised to upgrade to the new versions of configuration files where possible, because they will often bring improvements to your software configuration. Slackpkg allows you to view the differences between old and new files and even, to merge the two files. Alternatively you can decide to keep the “.new” file, leaving the old file in place, so that you can investigate the differences at a later time if these are too intrusive.
    You can force a check on “.new” files at any time, by running the command
      * # slackpkg new-config

    and using the easy user interface of slackpkg to merge the changes.

  • You should probably decide at this moment to use a generic kernel, especially if you are using LVM or RAID, or installed Slackware to a LUKS-encrypted disk. This is also being recommended in the Slackware README on the DVD/CD. On the other hand - if your system setup is straight-forward and your hardware is fairly new, you could decide to stick with a “huge” kernel.
    Remember that you cannot use an initial ramdisk in combination with a “huge” kernel, but you have to create a new initial ramdisk if you are going to use a generic kernel!
    If you are uncertain at this point how that must be accomplished, then you should make sure that you are booting a “huge” kernel which won't require an initial ramdisk.
    However, the “mkinitrd_command_generator.sh” script can help you here. Run this script with the new kernel version as a parameter and it will show you an example “mkinitrd” command which will work for your particular hardware setup and system configuration:
    # /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.2.29

    will give this as output (the kernel version 3.2.29 is that of Slackware 14)

    #
    # mkinitrd_command_generator.sh revision 1.45
    #
    # This script will now make a recommendation about the command to use
    # in case you require an initrd image to boot a kernel that does not
    # have support for your storage or root filesystem built in
    # (such as the Slackware 'generic' kernels').
    # A suitable 'mkinitrd' command will be:
    
    mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

    You can copy and paste this command line in your console, and let it create an initial ramdisk for you.

If you were already running a generic kernel and therefore already have an initrd, we strongly advise you to create a new initrd with a new unique name! For instance, you can copy the above example and modify the name of the initrd file as follows:
mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd_3.2.29.gz
  • After you decided what kernel you are going to use and have created an initial ramdisk, you must update your “/etc/lilo.conf” file with a section for the new kernel (don't remove your running kernel!). The “mkinitrd_command_generator.sh” script can help you finding the right block to append to /etc/lilo.conf. For instance, the command:
    # /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29

    will result in the following output which you can copy/paste:

    # Linux bootable partition config begins
    # initrd created with 'mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz'
    image = /boot/vmlinuz-generic-3.2.29
      initrd = /boot/initrd.gz
      root = /dev/sdb2
      label = 3.2.29
      read-only
    # Linux bootable partition config ends

    Note that this command adds a “initrd” line to the kernel section. If you let mkinitrd create a unique name for your initial ramdisk, then be sure to apply that name in the above section.
    The “initrd” line is not needed if you are going to run a “huge” kernel.

  • Finally, run the “lilo” command to make the change permanent and add the new kernel to the lilo boot menu. You can just run “eliloconfig” if you are using EFI after upgrading Slackware and that will itself install the latest kernel on the EFI partition.
    Remember, you should always be able to boot back into a previous kernel in case the new Slackware kernel gives you a hard time.
Bottom-line: you can trust slackpkg to perform a system upgrade safely, but it will need your brains and care.

Multilib considerations

If you are upgrading a multilib 64-bit Slackware computer, there are additional considerations to make.

A multilib installation means that you have replaced Slackware's 64-bit gcc and glibc packages with multilib versions (ie.e. supporting both 32-bit and 64-bit binaries). Also, you have installed a set of “converted” 32-bit Slackware packages on your 64-bit multilib Slackware. These modifications are all needed to allow you to run and compile 32-bit software.

When upgrading such a system, you must of course upgrade the standard Slackware packages, but separately you must upgrade the multilib-specific packages with new versions which you can obtain from http://slackware.com/~alien/multilib/

  • First (if you use slackpkg), you must blacklist all these multilib packages so that they will not be accidentally replaced or removed during a system upgrade. If you don't blacklist them, you will face a lot of manual de-selections in “slackpkg clean-system”.
    Starting with the release of compat32-tools for Slackware 14.0 you can simply add two lines to the /etc/slackpkg/blacklist file:
    [0-9]+alien
    [0-9]+compat32

    Then you will manually have to download and upgrade the multilib packages. In the below example I will use Slackware 14.0 as the release to which you will be upgrading.

  • Download the multilib packages suitable for your new Slackware release from a mirror, like this:
    # rsync -av rsync://taper.alienbase.nl/mirrors/people/alien/multilib/14.0/ multilib-14.0/

    This command will create a new subdirectory “multilib-14.0” in your current directory with all packages inside

  • install/upgrade the existing gcc and glibc packages, and compat32-tools:
    # cd multilib-14.0
    # upgradepkg --install-new *.t?z
  • Upgrade the set of converted 32-bit Slackware packages (often referredto as the “compat32” packages):
    # upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

    Alternatively you can run the “massconvert32.sh” script which will have been installed as part of the compat32-tools package. Pass it a 32-bit Slackware package directory (or a 32-bit Slackware mirror URL) as parameter and that will create a set of converted “compat32” packages which you can then install. You would only have to do this if you suspect that the content of the “slackware64-compat32” directory is not up to date.

Java considerations

Slackware used to install a Java Run-time Engine prior to the 14.0 release (the JRE binaries were originally Sun's and later distributed by Oracle after it bought Sun).
But Oracle changed the re-distribution license so that Slackware (just like all other distributions) was no longer permitted to ship these Java binaries as part of the distribution. When you perform a system upgrade to Slackware 14.0, an old version of the JRE will stay behind on your system. This version “6u25” has several critical vulnerabilities and you should remove it manually from your computer as fast as possible, using the command

removepkg jre

If you need Java then please have a look in the “/extra/source/java” directory of the Slackware 14 release. You will find a script there to create a Slackware package from the most recent Java software from Oracle, which you can then install using the “installpkg” command. See also our Wiki article “Java in Slackware

Sources

1)
Slackware's package manager does not work with the concept of “lower version” and “higher version”. The package tools only look at “different version” and thus downgrading packages (reverting to an earlier version) is just as easy as upgrading to a newer version!
 es:howtos:slackware_admin:systemupgrade ()
Esta traducción es más antigua que la página original y podría estar obsoleta. Ver lo que ha cambiado.