Other languages Deutsch ; English ; Español ; français ; Nederlands ; |
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.
|
Contents
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 inMCC-> Local disks -> Manage disk partitions
, see drakdisk documentation. - 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 inMCC-> Boot -> Set up boot system
. See drakboot documentation. - 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 drakboot again.
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.
- If you don't want the
Preparations
- Carefully read the current Release Notes and Errata, linked from Main Page, to see if there is something you need to prepare for.
- Back up any important data.
- Advanced users may have done changes that need to be reverted for problem free upgrade:
- If third party repositories have been added, be sure to make a backup/copy of
/etc/urpmi/urpmi.cfg
. The info in that backup can be used if you later need to re-add them. DO NOT just restore the third party repo lines in urpmi.cfg. The file contents and the matching files in /var/lib/urpmi will be created when the repo is re-added. - If any package names have been added to
/etc/urpmi/skip.list
, remove them. - Disable or remove all debug and third party repositories shown by
drakrpm-edit-media
(MCC -> Software Management -> Configure media sources for install and update
). - 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 houses such libraries you can use the command:
rpm -qa --queryformat "%{NVRA}\n" |grep i586 |grep devel
- Remove packages now not in configured repositories, shown by
urpmq --not-available
. They may be re-installed after the upgrade if needed.
- If third party repositories have been added, be sure to make a backup/copy of
- Perform a normal full system update (most importantly rpm and urpmi).
- 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:
task-plasma5
. If you don't need full Plasma set it istask-plasma5-minimal
. Other desktops follow the same scheme, liketask-gnome, task-xfce
, 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
Stop the graphic interface
# systemctl isolate multi-user |
Delete the current repositories
# urpmi.removemedia -a |
Add the new repositories
# urpmi.addmedia --distrib --mirrorlist http://mirrors.mageia.org/api/mageia.<n+1>.$ARCH.list |
Test the upgrade, all the packages are downloaded and the upgrade simulated
# urpmi --replacefiles --auto-update --auto --download-all --test |
Note, if there isn't enough room in the file system containing /var/cache/urpmi/rpms to hold all of the rpm packages and there is enough space in another file system, then replace the directory /var/cache/urpmi/rpms with a symlink to a directory on that other file system. Once the upgrade has completed, replace the symlink with a normal directory, if desired. It there isn't enough space on any of the file systems, you can with some risk of it failing, skip this test and proceed with starting the upgrade.
For example, assuming /home is on a file system with enough room
# mkdir /home/rpms |
# rmdir /var/cache/urpmi/rpms |
# ln -s /home/rpms /var/cache/urpmi/ |
After the upgrade has finished, if desired
# rm -f /var/cache/urpmi/rpms |
# mkdir /var/cache/urpmi/rpms |
If the test is OK, start the upgrade
# urpmi --replacefiles --auto-update --auto --download-all |
When it is complete reboot the system
# shutdown -r now |
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 userdrake documentation. When doing the upgrade, and the installer arrives at the "User management" step, click on "Advanced":
Then, you can add the correct IDs here:
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":