From Mageia wiki
Jump to: navigation, search
(Preparations)
(Preparations)
Line 114: Line 114:
 
* Back up any important data.
 
* Back up any important data.
 
* Perform a full system update (most importantly rpm and urpmi).
 
* Perform a full system update (most importantly rpm and urpmi).
 +
* Disable or remove all debug and third party repositories shown by drakrpm-edit-media (mcc, Software Management, Configure media sources for install and update).
 
* Remove any packages shown by "urpmq --not-available". They may be re-installed after the upgrade if needed.  
 
* Remove any packages shown by "urpmq --not-available". They may be re-installed after the upgrade if needed.  
 
* A '''64 bit system''' must have any '''32 bit development libraries uninstalled.''' You can identify these by the word "devel" in the name. To know if your system have such libraries you can use the command:  
 
* A '''64 bit system''' must have any '''32 bit development libraries uninstalled.''' You can identify these by the word "devel" in the name. To know if your system have such libraries you can use the command:  

Revision as of 19:07, 12 May 2021


Drakconf multiflag.png
Other languages
Deutsch ; English ; Español ; français
Synopsis:
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.

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
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".
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.
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.

Preparations

  • Carefully read the Release Notes and Errata to see if there is something you may need to prepare for.
  • Back up any important data.
  • Perform a full system update (most importantly rpm and urpmi).
  • Disable or remove all debug and third party repositories shown by drakrpm-edit-media (mcc, Software Management, Configure media sources for install and update).
  • Remove any packages shown by "urpmq --not-available". They may be re-installed after the upgrade if needed.
  • A 64 bit system must have any 32 bit development libraries uninstalled. You can identify these by the word "devel" in the name. To know if your system have such libraries you can use the command:
rpm -qa --queryformat "%{NAME}-%{version}-%{RELEASE}.%{ARCH}\n" |grep i586 |grep devel
  • If 3rd party repositories have been added, be sure to make a backup/copy of the urpmi.cfg file located in the /etc/urpmi directory.
  • It is good to free some space, particularly uninstall old kernels, fat games...
  • Make sure you have a task-* package for your favourite desktop installed. This ensures no needed packages for the desktop will be missing after the upgrade. Example: Template:Pkg. If you don't need full Plasma set it is Template:Pkg. Other desktops follow the same scheme, like Template:Pkg, etc, some have the "-minimal" variant too.

Not supported:

  • Upgrading directly from earlier than previous release
  • Using any of the Live images - due to the Live system being copied "as is" to the target system.
  • Upgrading a Mageia installation which was NOT in UEFI, towards a UEFI-mode

- In these cases, you have to do a fresh installation. (Possibly keeping the /home directory.)

Help

Also see the procedures described in current Release Notes which currently is more detailed. There you also find descriptions for DNF.

How to do a simple upgrade in text mode

After having started and updated your system:

Open a console and enter the root mode Template:User to root

Stop the graphic interface Template:Root console

Delete the current repositories Template:Root console

Add the new repositories Template:Root console

Test the upgrade, all the packages are downloaded and the upgrade simulated Template:Root console

If the test is OK, start the upgrade Template:Root console

When it is complete reboot the system Template:Root console

Dragon-head.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