Updating your system
From Mandriva Community Wiki
Updating the distribution's packages
Update using the Mandriva Online applet
The Mandriva Online service is an easy way to update packages on your Mandriva Linux distribution. It automatically notifies the user of available updates and helps install those updates which correct bugs, install newer versions of software, and patch security problems in the system. It is as if you performed the update via the Mandriva Control Center, which we will describe in the next section, with less need for user intervention.
From the first launch of Mandriva, the update applet appears at the bottom right of your system tray:
- means that your Sources are not configured. Since Mandriva 2007 Spring, the first click on the Mandriva Online applet launches the interface to configure your sources exactly as if you clicked Menu > Tools > System Tools > Configure your computer and then Configure media sources.
Once your sources are configured, the applet will automatically check for new updates. If new updates are available, the applet will show you another icon:
- means the applet is currently searching for new updates.
- means that a new version of Mandriva Linux is available and that you have the opportunity to upgrade.
- means that new updates are available for your system. Click once on the applet and enter your user password. The update window will then display the list of available update with descriptions.
A right click allows you to check updates again, configure the applet, and close it.
Updating via the Mandriva Control Center
Updating through the Mandriva Control Center also allows updates which correct bugs, install new versions of the software, and install patches to fix security issues in the system.
The first time that you launch the tool, it will require you to configure a source of file repository updates (also called a "mirror"). You should choose a site close to you (a .fr if you are in France, for example), to allow for quicker downloads. Technically, you could choose any mirror randomly because in theory, all the mirrors are synchronized.
Subsequently, the tool will simply require you to make sure that you are connected to check whether new updates are available.
In any case, the update tool drakrpm-update will present the updates available as follows:
Updating Using the Command Line
Consult the articles
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:
Update to a New Version of Mandriva
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.
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.
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.
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.
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.
Updating Via the Mandriva Control Center
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|
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 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):
- 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:
- 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:
- 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:
- That's it. Restart the system and meet the new version of Mandriva Linux.
Updating an existing Mandriva Free installation to Mandriva Powerpack
Assume you have a present Mandriva Free installation and then subscribed to Mandriva Powerpack. No need to install everything from scratch but it is sufficient to run the upgrade helper application (be sure that the computer is connected to the Internet):
/usr/bin/mdkapplet-restricted-helper 2010.0(substitute 2010.0 with the version number you have, use
cat /etc/releaseto find out)
Then a dialog window will open and ask you for your email address and password which has been used for the powerpack registration. Now the related repository lists will be downloaded and added to the list of paket sources.
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).
- 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.
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.
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 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
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:
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 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...
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 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 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 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
For example in this list:
kernel-18.104.22.168-2mnb-1-1mnb1 kernel-headers-2.6.24-6mnb1 kernel-desktop-devel-22.214.171.124-1mnb-1-1mnb1 kernel-desktop-latest-126.96.36.199-2mnb1 kernel-desktop-devel-188.8.131.52-2mnb-1-1mnb1 kernel-desktop-184.108.40.206-2mnb-1-1mnb1 kernel-desktop-devel-latest-220.127.116.11-2mnb1
The most recent kernel installed on this system is "kernel-desktop-18.104.22.168-2mnb-1-1mnb1". You know this because the patch number (22.214.171.124-2nmb-1-1mnb1) is the highest in the list.
- Fetch a list of updates
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-126.96.36.199-1mnb-1-1mnb1.i586: Linux kernel for desktop use with i586 & 1GB RAM (to install) 2- kernel-server-188.8.131.52-2mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install) 3- kernel-laptop-184.108.40.206-2mnb-1-1mnb1.i586: Linux kernel for improved laptop battery runtime with i686 & 4GB RAM (to install) 4- kernel-laptop-220.127.116.11-3mnb-1-1mnb1.i586: Linux kernel for improved laptop battery runtime with i686 & 4GB RAM (to install) 5- kernel-server-18.104.22.168-1mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install) 6- kernel-server-22.214.171.124-2mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install) 7- kernel-desktop-126.96.36.199-3mnb-1-1mnb1.i586: Linux Kernel for desktop use with i686 & 4GB RAM (to install) 8- kernel-server-188.8.131.52-3mnb-1-1mnb1.i586: Linux Kernel for server use with i686 & 64GB RAM (to install) 9- kernel-desktop586-184.108.40.206-3mnb-1-1mnb1.i586: Linux kernel for desktop use with i586 & 1GB RAM (to install) 10- kernel-desktop586-220.127.116.11-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-18.104.22.168-2mnb-1-1mnb1" with a larger patch number. For example if I saw:
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.