Actualizando el sistema

De Wiki de la Comunidad Mandriva


Mantener actualizado el sistema es crucial para tener un mejor Mandriva y obtener los últimos parches de seguridad. Las nuevas actualizaciones sólo se producen durante la vida útil del producto como esta especificado en las políticas de vida útil del producto.


Contenido

Actualizando los paquetes de la distribucion

Actualizar usando Mandriva Online applet

El servicio en linea de Mandriva es la manera mas fácil de actualizar paquetes en su distribución Mandriva. Notifica automaticamente al usuario de las actualizaciones disponibles y ayuda a instalar las actualizaciones que corrigen errores, instala versiones nuevas del software, y los problemas de revisión de seguridad en el sistema. Es como si hubiese realizado la actualización a través de la Centro de Control de Mandriva, las cuales se describen en la siguiente sección, con menor necesidad de intervención del usuario.

Desde el primer lanzamiento de Mandriva, el applet de actualización aparece en la parte inferior derecha de la bandeja del sistema:

Image:Recordmydesktop_arreter_enregistrer.png


  • Image: Noconf.png Significa que tus fuentes no han sido configurados. Desde Mandriva 2007 Spring, el primer click en Mandriva Online applet lanza la interfaz para configurar tus fuentes exactamente como si hicieses click en Menu > herramientas > Herramientas del sistema > Configurar su computadora y luego Configurar los soportes de paquetes para la instalación y actualización.

Una vez que sus fuentes esten configuradas en Configurar soportes, el applet comprobará automáticamente si hay nuevas actualizaciones. Si hay nuevas actualizaciones disponibles, el applet le mostrará otro icono:


  • Image:Busy.png Significa que el applet esta buscando nuevas actualizaciones.
  • Image:Upgrade.png Significa que hay una nueva version de Mandriva Linux disponible y que puedes actualizarla.
  • Image:Error.png Significa que hay nuevas actualizaciones disponible. Haga click sobre el applet e ingrese su contraseña. La ventana de actualización mostrará una lista de actualizaciones disponibles con descripciones.

Un click derecho le permitirá verificar si existen nuevas actualizaciones, configurar el applet, y cerrar el applet.


Más información
  • Si el icono del Online applet no aparece en el área de notificación de la barra de tareas, abra el lanzador de aplicaciones (Alt+F2) y escriba mdkapplet. Su icono aparecerá en la bandeja de la barra de tareas y usted será capaz de hacer clic derecho en el icono para seleccionar Lanzar applet al iniciar. Puede escribir mdkapplet - F en la consola lo cual tendrá el mismo efecto (Ver Man Page).
  • Si el applet muestra un mensaje de error indicando que la base de datos URPMI esta bloqueada, revisar Man Page para solucionarlo.

Actualizar desde el Centro de Control de Mandriva

Actualizar a través del Centro de Control de Mandriva también permite actualizaciones que corrigen bugs, instalar nuevas versiones del software, e instalar parches para solucionar los problemas de seguridad en el sistema.

Para actualizar su sistema, diríjase a Mandriva Control Center (Configurar su computadora), Haga click en Administración de Software y luego en Actualizar su sistema Image:drakrpm-update-icon.png drakrpm-update

La primera vez que utilice esta herramienta, le requerirá que configure una fuente de los reposirotios (llamado "mirror"). YUsted puede elegir un sitio cercano a su ubicación(un .fr si usted esta en Francia, por ejemplo), para permitir descargas mas rapidas. Técnicamente, usted puede elegir cualquier mirror, ya que en teoría están todos sincronizados.

Posteriormente, la herramienta le solicitara estar conectado a internet para verificar si existen nuevas actualizaciones disponibles.

En cualquier caso, la herramienta de actualización Image:drakrpm-update-icon.png drakrpm-update mostrará las actualizaciones disponibles de la siguiente forma:

The window displaying the list of available updates.
¡Téngalo en cuenta!
La herramienta de actualización de Mandriva siempre instalara la versión mas reciente disponible del software.

Actualizar usando la linea de comandos

Consulte los siguientes articulos:


Preventing certain packages from being updated

It is possible to prohibit the update of certain packages. It is unusual, but under certain circumstances it might be desirable to keep an older package rather than update to the latest and greatest.

To prevent updating a package, edit the file /etc/urpmi/skip.list and enclose the name of the package between two slashes. For example:

/kmail/
Please note !
It is possible to use rational expressions in the /etc/urpmi/skip.list. It should be understood that the word or the expression will be "matched" with a list of packages of the form name-version-release.arch. This enables you to specify an architecture, a release, etc.

Update to a New Version of Mandriva

Precaucion !
Updating a complete system is a serious operation. If you are not completely comfortable with what you are doing, you might want to reconsider and opt for a fresh install instead. Whatever you decide, it is highly recommended that you perform a complete system backup before you begin. At the very least, you should maintain a backup of the users' /home directories.


Automatic Update

Automatic updates of Mandriva via the Mandriva Applet (also called Mandriva Online) allows upgrading to a current version of Mandriva, since version 2008.1. When a new version of Mandriva is available, the applet's icon will become a blue arrow like below:


A dialog box will appear to ask to you whether you really wish to upgrade:

After pressing "Okay", the upgrade begins.

Please note !
Please make sure that you have disc space available on the partition "/" (or "/var" if it is separate). The idea is to have as much free disc space as occupied disc space (in other words free space should be 50% of total space).
Precaucion !
The applet may indicate success and instruct you to restart the system when in fact all packages are not yet installed. As long as the blue arrow is showing packages remain to be installed, therefore, do not restart as long as you see that icon. If the icon is orange, have patience: the applet is searching for packages to update. This may take several minutes.


Updating Via the Mandriva Installer

This is the method recommended for beginners because it is easy, is supported by Mandriva, and requires little knowledge of the system.


It is possible to use the Mandriva installer to update the system. The installer program will detect your current version of Mandriva and will offer the option to update it. To launch the Mandriva installer, use one of many the methods described in Installing Mandriva.


Tip !
It is strongly recommended to have separate partitions for " /" and for " /home". This makes it possible to keep the system files separate from user data.

At the time the update is executed, your personal data (files, parameters, etc) will be preserved. Your system configuration (where you have saved or changed parameters with Mandriva Control Center) will also be preserved to the extent possible. Nevertheless, the configuration files of certain applications will have to be updated. In this case, your old configuration files will be found renamed with the ".rpmsave" suffix.


Tip !
The "etc-update" package contains a small script etc-update which is quite practical. It will compare new package configuration files to old configuration files and will require you to take some action (delete the existing configuration, reuse the existing configuration, or merge both files). However, it requires a good knowledge of the configuration files because edits will be made manually.


You are not required to use the same repository for updates as that used for your installation. You could have installed with the liveCD and updated from a network repository, for example.

Changing Sources

This is the simplest method, but not as well supported. Indeed, the Mandriva installer (preceding method) performs tests and corrections more thoroughly than urpmi or drakrpm used in this method.

Tip !
The number of packages installed via this method will be relatively important. Urpmi or drakrpm often show their limits in this case. It is advised that you may need to start the update again several times in succession until there are no more updates reported available.


Updating Via the Mandriva Control Center

Use Image:drakrpm-edit-media-icon.png drakrpm-edit-media to change the address of repositories, by replacing 2008.0 for instance with 2008.1 in the address of the repository.


Launch Image:drakrpm-edit-media-icon.png drakrpm-edit-media to obtain a list of sources:


Archivo:Drakrpm-edit-media.png
The tool to manage your media sources, necessary to fetch the package.


Then, edit each source in turn:


Replace the existing value with new (in this example, they replace devel / cooker with official / 2008.0):


To help you, here is the list of repositories identified for every distribution:

Distribution Value to be identified in address
Mandriva Linux 2008 Spring official/2008.1
Mandriva Linux 2009 official/2009.0
Mandriva Linux 2009 Spring official/2009.1
Mandriva Cooker devel/cooker

It is necessary to edit each of the sources in the window. Then click "Ok". They will then appear in Mandriva Control Center.

It is then necessary to launch an update with Image:drakrpm-update-icon.png drakrpm-update, or with the command urpmi --auto-select as above.


On the Command Line

It is necessary to do the following as root.


  • Make a copy of your good urpmi.cfg (configuration file of the repositories):
    cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi.cfg.bak
  • Remove all existing media sources (repositories):
    urpmi.removemedia -a
  • Configure available sources by pointing your browser to easyurpmi and following the instructions there.
  • If you installed the Powerpack edition, use the club.commercial source on MirrorFinder.
  • To launch the update itself, you have two options. The first option allows more control over what happens:
  1. Either you know various Mandriva packages and you will be able to answer some questions of urpmi concerning the conflicts and dependencies. Then launch the command:
    urpmi --auto-select
  2. Or you do not wish to deal with questions, and let urpmi make a "safe bet" by prohibiting the installer from uninstalling software:
    urpmi --auto-select --keep
  • Finish the kernel update by installing kernel-latest. Normally, this package is already installed if you had Mandriva 2007 Spring (or later) before the update, but as a safeguard to ensure you have the latest kernel, it doesn't take much time and will do no harm to launch the command:
    urpmi kernel-latest
    .
  • That's it. Restart the system and meet the new version of Mandriva Linux.
Tip !
You can confirm the version of Mandriva Linux you have installed by typing the command cat /etc/mandriva-release.

Complete System Reinstallation

Technically, this is not an update, it is a fresh installation. The method is mentioned here because sometimes it is still used to update systems. To carry out this type installation, you must have a /home partition separate from the others:

  • Safeguard all important data by copying it into the /home partition.
  • Generate a list of packages currently installed on the system and save it somewhere under the /home partition.
  • Install Mandriva Linux according to one of the methods mentioned in Installation
  • During the "Partitioning" stage of installation, format all partitions except the /home partition.
  • Supplement the installation with the packages which were present before, according to the list generated previously.
  • Restore the important data previously safeguarded

You will find the method described in detail in the page: Installing Mandriva Linux.


Risks Incurred by this Update

This update consists of replacing all the software, the libraries, and the data files with new versions. This is not a minor operation, therefore, it is necessary to be conscious of the enormous risks one takes when making such an update (even if the update becomes increasingly simple and reliable as it has under Mandriva).

Precaucion !
Remember to backup any important data or configuration files.


  • Equipment not working any more or not any better: This problem is generally dependent on the kernel or packages for detection/hardware configuration such as udev or pulseaudio. It is important to report bugs in order to solve problems like this. This problem is also called a "regression" and is what Mandriva tests try to avoid at all costs.
  • Loss of the configuration of certain applications: The configuration files sometimes cannot be updated because of irreconcilable differences between versions (for example, updating apache 1.X to 2.X). For the system applications, a new configuration file, quasi-virgin, is installed and the old configuration file is copied with the extension ".rpmsave". The program etc-update allows the detection of these configuration files and proposes their resolution (but you must know its syntax and repair is done manually). For the application's users (who do not require complete access to the machine), problems can also appear for the same reasons.
  • Problems involving insufficient disc space: When adequate disk space is not available, the update (installer, urpmi or rpmdrake) is unable to install all packages. To overcome this problem, anticipate adequate free disc space in the partition / or /var (if the latter is separated from /) and when the update is finished, continue to update packages (described at the beginning of this page) until no more packages remain to be installed.

How to Update from Version N to N + 1

Since version 2009 (therefore this does not concern Mandriva 2008.1 or previous) Mandriva offers to upgrade automatically from version N to n + 1 via the automatic update applet. Before applying the upgrade, the applet asks for confirmation in a window. If you do not want to perform this upgrade, check the box "do not ask again" then click on "Not". You will receive no more such notification but you will still have opportunity to upgrade to a new version when it becomes available.

Archivo:Upgrade2.png

If you wish to completely disable this function for your whole system (and not only for one user) for example on the 2008.1 version, while still receiving updates for 2008.1, it is necessary to modify the file /etc/sysconfig/mdkapplet by changing the value false to true variable for the line "DO_NOT_ASK_FOR_DISTRO_UPGRADE".

Update the Linux Kernel

The Linux kernel is a specific type of update. The kernel must be updated deliberately. It is recommended that users read the following paragraphs as well as the article "The Mandriva Kernel" before undertaking a kernel update.


Risks Associated with this Update

The installation of a new kernel should not cause any problems as long as the system is not executed under that kernel. To execute the system under a specific kernel, it is necessary to restart the machine and choose the entry in the grub menu list which corresponds to the new kernel (note that all previously installed kernels remain available in the menu, but the last kernel installed is selected by default). If you experience problems, reboot and select a previous kernel from the menu list.


Regression

Even if there are few risks of serious problems, you may find that a peripheral which functioned perfectly before the update does not function afterward. This problem is called “regression” and must be avoided (as users are frustrated when they update a system that functioned perfectly only to find it broken after an "update"). It is one of the reasons, for example, that Mandriva 2007 Spring has the same kernel as the 2007 release (with some additions). This makes it possible to have the same hardware compatibility in both versions.


DKMS

DKMS was introduced in the 2005 release because updating the kernel still posed some risk of error at the time, even for experienced users. To avoid this error, DKMS allows the automatic compilation of the drivers on your system which must be recompiled for compatibility with the new kernel. This is particularly useful if you use the proprietary NVIDIA or ATI graphics drivers on your system (or import drivers from packages other than the Linux kernel, for example the gspca drivers for USB cameras). Previously, one had to compile the drivers themselves, or never update or change a kernel. This utility helps automate the update process. But understand, DKMS requires the kernel source code to function.


For this reason, always install kernel-devel ((or kernel-source) corresponding to the kernel which you use when you update the kernel in order to install the kernel source code on your system. If you do not, DKMS will not be able to compile the drivers automatically for your new kernel, and the hardware managed by those drivers might not work when you restart your system under the new kernel (which is the default choice during boot). Consequently, if you use a driver for a graphics card you could be unable to start the graphic server and be stuck in text mode.


To discover kernels and sources installed on your system, use the command

Image:Konsole.png
[root@Computadora ~]# rpm - qa ¦ grep ^kernel ¦ grep - v latest

You must have a "Devel" version for every version of kernel installed (see Nomenclature of the Mandriva Linux Kernel).


It is possible to automate the update of kernel and sources together as necessary for DKMS , by installing virtual packages kernel - (version) - latest and kernel - (version) - devel-latest, for instance:

 kernel-desktop-latest-2.6.22.16-1mdv2008.0
kernel-desktop-devel-latest-2.6.22.16-1mdv2008.0


Mandriva Linux 2008 changed the implementation of DKMS with the introduction of '"dkms binaires'" packages. To avoid confusing users with the installation of compilers and kernel source code, DKMS modules are compiled by Mandriva, wrapped, and published on mirrors. Contrary to the old system of packages, Dkms sources, Dkms binary packages are valid only for individual kernels and must, therefore, be installed with Image:drakrpm-update-icon.png drakrpm-update or Urpmi when kernel is installed.


Virtual packages -latest (ex: fglrx-kernel-desktop-latest or nvidia96xx-kernel-desktop-latest) allow the automatic installation of the last available corresponding version of the Dkms package. They are installed by default on Mandriva 2008. The -latest system is also used by the kernel under Mandriva to automate the installation of the most recent available kernel. The old system of Dkms package sources is kept if you decide to install an unsupported kernel (in effect, Dkms binary packages will be published only for supported kernels, in "hand", which excludes kernels -tmb, for instance.)


More information on DKMS...

Oops !

This problem is now extremely rare: A "kernel panic" (the equivalent of the Blue Screen Of Death under Windows), is often a problem with a driver bug. Generally this type of problem can only be solved by the Linux kernel developers.

Return to a Previous Kernel

It is always possible to choose the previous kernel in the first menu encountered when booting the machine (the boot loader menu) if the new kernel has a problem. In effect, all kernels are installed in parallel and kernels are not uninstalled (in other words, the new does not replace the old). Then, using the utility Image:drakboot --boot-icon.png drakboot --boot, it is possible to select your preferred kernel as default (it will be chosen by default during every start of the machine).

Updating Mandriva Linux on 2007 Spring or Newer

For Mandriva Linux 2007 Spring a simpler way to update the kernel was introduced (see Version Notes for more information). It is necessary to install package kernel-latest and as soon as a new kernel is made available by the Mandriva development team, it will be offered for download with Image:drakrpm-update-icon.png drakrpm-update. Note that it will not be chosen for update by default as other updates will because installation of a new kernel must be voluntary.

There is one package related to the kernel source: kernel-source-latest. In most cases, it should also be installed. See notes above.

From Mandriva Linux 2008, this package is installed by default and you only have to deal with these details in the rare case of a problem.

Updating Versions Prior to 2007 Spring

For versions of Mandriva previous to 2007 Spring, you must use urpmi or Image:drakrpm-icon.png drakrpm to deliberately install a new kernel. The best way to know if a new kernel is available for you is to verify directly on a mirror that there is a package called kernel-2.6. XX-Ymdv with the subsequent number version of your kernel (you acquire your kernel version number with uname - r). Then, you can follow the availability of new kernels by subscribing to the list "security-announce" (to see Help) or by using the flux RSS feed of Sophie.

One simple way to update the kernel from the command line using urpmi in an older version of Mandriva goes like this:

  • Find your kernel version
Image:Konsole.png
[root@Computadora ~]# rpm -qa 'kernel*'

For example in this list:

kernel-2.6.24.7-2mnb-1-1mnb1
kernel-headers-2.6.24-6mnb1
kernel-desktop-devel-2.6.24.7-1mnb-1-1mnb1
kernel-desktop-latest-2.6.24.7-2mnb1
kernel-desktop-devel-2.6.24.7-2mnb-1-1mnb1
kernel-desktop-2.6.24.7-2mnb-1-1mnb1
kernel-desktop-devel-latest-2.6.24.7-2mnb1

The most recent kernel installed on this system is "kernel-desktop-2.6.24.7-2mnb-1-1mnb1". You know this because the patch number (2.6.24.7-2nmb-1-1mnb1) is the highest in the list.

  • Fetch a list of updates
Image:Konsole.png
[root@Computadora ~]# urpmi –update kernel

This command spits out a long list of files followed by a list of 37 prospective kernels:

one of the following packages is needed:
 1- kernel-desktop586-2.6.24.5-1mnb-1-1mnb1.i586: Linux kernel for desktop use with i586 & 1GB RAM (to install)
 2- kernel-server-2.6.24.7-2mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install)
 3- kernel-laptop-2.6.24.7-2mnb-1-1mnb1.i586: Linux kernel for improved laptop battery runtime with i686 & 4GB RAM (to install)
 4- kernel-laptop-2.6.24.4-3mnb-1-1mnb1.i586: Linux kernel for improved laptop battery runtime with i686 & 4GB RAM (to install)
 5- kernel-server-2.6.24.5-1mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install)
 6- kernel-server-2.6.24.5-2mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install)
 7- kernel-desktop-2.6.24.4-3mnb-1-1mnb1.i586: Linux Kernel for desktop use with i686 & 4GB RAM (to install)
 8- kernel-server-2.6.24.4-3mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install)
 9- kernel-desktop586-2.6.24.4-3mnb-1-1mnb1.i586: Linux kernel for desktop use with i586 & 1GB RAM (to install)
 10- kernel-desktop586-2.6.24.7-1mnb-1-1mnb1.i586: Linux kernel for desktop use with i586 & 1GB RAM (to install)
etc., etc., etc.
  • Pick the same kernel observed in the first command with the higher patch number

The next step would be to pick through that list of 37 kernels and find the option that is closest to "kernel-desktop-2.6.24.7-2mnb-1-1mnb1" with a larger patch number. For example if I saw:

34- kernel-desktop-2.6.24.7-3mnb-1-1mnb1

I would choose "34" and press enter. The kernel would then download and install.

If you use lilo as your boot loader, an new/old selection is added to the bottom of the menu and updates the Master Boot Record.

Reboot, pick the new kernel at the bottom of the menu, and if it works, edit your /boot links for vmlinuz and initrd.img are automagically move to the new kernel.

If works, you may choose to remove the two bottom entries from /etc/lilo.conf and do a lilo -v.

Of course, if you are running a recent version of Mandriva, this step is still possible, but hardly necessary.

Herramientas personales