From Mageia wiki
Jump to: navigation, search
Drakconf multiflag.png
Other languages

Deutsch ; English ; français


Presentation

This page deals with the different ways to upgrade a Mageia operating system from version n to n+1 (It is not possible to upgrade to a version number beyond n+1).
The upgrade procedure is different from a simple packages update.

Requirements

In order to choose the right upgrade method, you may need to know several features of your existing system:

  • If it has a separate partition for /home. You can find out by looking in MCC-> Local disks -> Manage disk partitions, see here
  • Its architecture, whether 32 or 64-bit. You can use the uname -i command in a console. The result will be x86_64 for 64-bit and i586 for 32-bit.
  • Its firmware mode: BIOS or UEFI. The answer lies in your firmware setup. It may be more simple to see if there is a /EFI sub-directory (for UEFI) in /boot or to look in MCC-> Boot -> Set up boot system. See here
  • The disks partitioning mode: MS-DOS (also called MBR) or GPT. As a root (Administrator) user, you can use the parted -l command in a console to view the partition table for your boot disk.
  • The installed desktop environment/s.
  • The user-names list with their UID's and GID's. See below
  • The bootloader in use. Have a look in MCC-> Boot -> Set up boot system. See here.

You also need to know which of the above features you want to change in the new system - if any.

Finally, whatever your decision is, always:

  • read the errata and the release notes. Each release has its own errata and release pages, and a section dedicated to upgrades.
  • backup your data
  • update your current Mageia version

Vocabulary

For the purposes of this guide, the different upgrade scenarios (as shown in the following table) are named according to which partitions you choose to retain or format during the upgrade:

Situation No formatting of partitions only / is formatted / and /home are formatted
Name Simple upgrade Clean install New install

If you have more than one bootable OS available on your system, we call that "dual-boot" if there are two OSes and "multi-boot" for more than two (though often simplified to "dual-boot" whatever their number is). e.g.: A clean installation in dual-boot.

Notepad.png
Please note!
You can't do a clean install if you don't have a separate /home partition.

Upgrade choice

Media possibilities

You need to choose the relevant upgrade media according to your upgrade plan.

Media Simple upgrade Clean installation New installation
Live no yes yes
Classical yes yes yes
CLI (changing the repositories) yes no no


Notepad.png
Please note!
Netinstall.iso is not really a media in itself, but a way to boot - and then load a media that is present locally or via a network. Consider it in terms of Classical media.

Advantages, drawbacks and special considerations

Simple upgrade
Advantages: Quick (no post-configuration), easy (no questions from the installer).
Drawbacks: Any currently existing problems, instabilities, useless data, etc. might possibly be retained. Some upgrades can be risky if major changes are involved (e.g. KDE4 > Plasma5)
Special considerations:
  • In cases of important graphic evolutions (e.g. KDE4 -> Plasma5) it is safer to do the upgrade in text mode. See the HowTo below.
  • It is impossible to change any of the characteristics listed above.
  • Third-party applications are not updated. It may be safer to uninstall them along with any third party repositories prior to the upgrade.
  • The bootloader configuration is updated and in cases of dual-boot, manual configuration may be required.
  • When the installer asks you to choose between "Upgrade" or "Installation", you will choose "Upgrade".
Notepad.png
Please note!
If you want to change the architecture from 32-bit to 64-bit, an upgrade is not possible as the root partition / must be formatted.


Clean installation
Advantages: Clean the system (see Simple upgrade drawbacks), the minor configuration required (icons, widgets, wallpapers, bookmarks, data ... are preserved), low risk of failure.
Drawbacks: Needs some skills (to choose the partitions and the desktop, to create the users, ...). Some configuration to redo (e.g. networks, some devices not fully supported), and all manual configurations done in /etc are erased.
Special considerations:
  • Take care that the installation preserves the same user UID's and GID's. See the HowTo below.
  • Needs a separate /home partition.
  • Third-party applications are not updated. It may be safer to uninstall them along with any third party repositories prior to the upgrade.
  • Allows moving from 32-bit to 64-bit architecture and vice-versa.
  • Bootloader configuration is updated and in cases of dual boot, manual configuration may be required.
  • When the installer asks you to choose between "Upgrade" or "Installation", you will choose "Installation". See the Installation manual.
New installation
Advantages: Everything is clean, including /home.
Drawbacks: Longer process and more skills required. It is like an initial installation - the whole configuration must be re-done.
Special considerations:
  • It is an opportunity to change the disk partitioning.
  • Bootloader configuration is updated and in cases of dual-boot, manual configuration may be required.
  • If no dual-boot, it is also an opportunity to move from BIOS to UEFI mode.
  • When the installer asks you to choose between "Upgrade" or "Installation", you will choose "Installation". See the Installation manual.
Notepad.png
Please note!
Although it is technically possible (using Gparted for example) to manually convert an MS-DOS (MBR) disk to GPT without losing the data, it is easier to let the installer do this for you automatically.


Whatever in dual-boot
Advantages: Add the possibility to use two or more OSes on the same computer and, if wanted, to share the data.
Drawbacks: The bootloader is rewritten and skills are needed to re-configure it if necessary.
Special considerations:
  • If you don't want the Mageia bootloader to be installed by default, take the necessary steps during the installation in order to keep your preferred bootloader. See the Installation manual.

Help

How to do a simple upgrade in text mode

After having started and updated your system:

Open a console and enter the root mode
Konsole.png
[user@computer ~]$ su -
[user@computer ~]$ _
Stop the graphic interface


Konsole.png
[root@computer ~]# systemctl isolate multi-user
[root@computer ~]# _
Delete the current repositories


Konsole.png
[root@computer ~]# urpmi.removemedia -a
[root@computer ~]# _
Add the new repositories


Konsole.png
[root@computer ~]# urpmi.addmedia --distrib --mirrorlist http://mirrors.mageia.org/api/mageia.<n+1>.<arch>.list
[root@computer ~]# _
Test the upgrade, all the packages are downloaded and the upgrade simulated


Konsole.png
[root@computer ~]# urpmi --replacefiles --auto-update --auto --download-all --test
[root@computer ~]# _
If the test is OK, start the upgrade


Konsole.png
[root@computer ~]# urpmi --replacefiles --auto-update --auto --download-all
[root@computer ~]# _
When it is complete reboot the system


Konsole.png
[root@computer ~]# shutdown -r now
[root@computer ~]# _


Dragon.png
Here be Dragons!
To be extra careful, you can at the very beginning enter the command script upgrade_log.txt to fetch the error messages during the upgrade. At the end, enter the command exit to stop the record. You will find the backtraces in the file /root/upgrade_log.txt

How to preserve user IDs in a clean install

When doing a clean installation, you have to re-create the users and their already existing respective IDs. By default, Mageia 5 and above will attribute user UIDs and GIDs beginning at 1000 (previous to Mageia 5, they began at 500). If these IDs are not correct, you have to change them. To do that, first fetch the IDs via the MCC of your current system: MCC -> System -> Administration tools -> Manage users on system. Write down all the user IDs and don't forget to check the group IDs for those users, too, because it does occasionally happen that they're not the same as the user IDs. See the MCC documentation. When doing the upgrade, and the installer arrives at the "User management" step, click on "Advanced":

WikiUpgrade1en.png


Then, you can add the correct IDs here:

WikiUpgrade2en.png


You have a further opportunity to modify the IDs in the "Summary" stage at the end of the installation.
In the "System" section, click on "Configure" next to "User management":

WikiUpgrade3en.png