How to upgrade from Rock/Lx 4.1 to Lx 4.2

Note: This thread was edited 2021-07-19. The goal was to make it very specific to the Lx 4.1 to 4.2 distribution upgrade which was more complicated than these usually are. Also to get the entire process in one post.

Note: Read through this entire thread to be sure you understand all that is involved in every step. If you have questions please ask in a thread in English/Support forum. (You can use an online translator like DeepL if you need to.)

  • OpenMandriva Lx version:

Rock/Lx 4.1

  • Desktop environment (KDE, LXQT…):


  • Description of the issue (screenshots if relevant):

The purpose of this thread is to provide an example of how to transition an existing Rock/Lx 4.1 system to Lx 4.2. If you want to install Lx 4.2 the ISO’s are at SourceForge.

  • Relevant information (hardware involved, software version, logs or output…):

Transition from Lx 4.1 to 4.2 involves a number of steps that need to be done correctly and in the correct order.

  1. First use Software Repository Selector to set your repositories to Release instead of Rock. This connects your operating system to the Lx 4.1 repositories.

Change this:

To this:

  1. Upgrade your existing Lx 4.1 system:

$ dnf clean all ; sudo dnf clean all ; sudo dnf upgrade

  1. Now you want to use Software Repository Selector to change your repos back to Rock. In other words the reverse of what we did above. Also we only want “Main” repositories enabled for this procedure. Be sure to disable any 3rd party repos. So use this command to check this. We want to see exactly this:
$ dnf repolist
repo id                                                                                          repo name
rock-updates-x86_64                                                                             OpenMandriva Rock - x86_64 - Updates
rock-x86_64                                                                                      OpenMandriva Rock - x86_64

(If you have a znver1 system obviously you will have znver1 instead of x86_64.)

  1. Now we are ready to begin the distribution upgrade to Lx 4.2 with this command:

$ dnf clean all ; sudo dnf clean all ; sudo dnf --allowerasing distro-sync

In my test case there were 1993 packages to download and 3600+ transactions done by dnf. Your numbers will probably be different but this is a big transaction.

  1. Towards the end of the dnf distro-sync process there will be series of scripts that run that will, in each instance, offer the user a choice between a new file or .rpmnew and an existing file or .rpm.

The following are screen shots showing the scripts that run at the end of the “dnf --allowerasing distro-sync” process. These are various scripts that ask the user basically whether to keep an existing file or “install the package maintainers version”.

Some users have been selecting the default for every one of these by simply pressing the enter key and they do end up with a working system.

However a better answer is:

  1. Always select to keep the old files for /etc/shadow, /etc/gshadow, /etc/passwd, and /etc/group. This is your users, groups, and passwords so you normally want to keep these.

  2. It is best to select the new file for sddm.conf, any grub or grub2 config files, and any /etc/yum.repos.d/whatever files.


For whatever reason KDE devs sometimes make some significant changes to sddm.conf. Since this is what starts your Plasma desktop it is important to update this file so everything initiates properly.

The grub files need to be updated so what is in grub menu works properly with newer kernels.

The /etc/yum.repos.d directory contains your repo files. We want users to have the new files for these because they have changes to use the newly implemented Mirrorbits mirror manager which is a big improvement over the previous method of managing mirrors. Also keeping the old mirror manager will connect many users to mirrors that are no longer updated. This will cause problems but it also is easy to fix.

  1. Then before you reboot there are 4 more commands you will want to run:

$ sudo rpm --rebuilddb -vvv

$ sudo dnf autoremove

$ sudo dnf install plasma-workspace-x11

$ sudo dnf reinstall distro-release-theme

Now you are ready to reboot to your new Lx 4.2 system.


$ dnf clean all ; sudo dnf clean all — this removes and old software from dnf cache and forces dnf to update to the very latest metadata file at for the enabled repositories. This ensures that user is getting the latest packages available.

$ sudo rpm --rebuilddb -vvv — will rebuild rpm database and get rid of an error message that is telling you that you have changed the database to sqlite from berkley database. (The error message itself can safely be ignored.)

$ sudo dnf autoremove — will remove about 117 (in my test) redundant packages left over from Lx 4.1 repositories that could cause confusion to your system.

$ sudo dnf install plasma-workspace-x11 — this is necessary because of what may be considered a bug. For Lx 4.2 developers split the packages for plasma-workspace-wayland and plasma-workspace-x11. For some reason dnf installs plasma-workspace-wayland only. Users are welcome to try both. Some users may find that Plasma Wayland may have glitches or may not work well with their hardware. Where you can choose these is in the lower left corner of the sddm login screen.

If you use Auto Login there is a setting in SystemSettings to select either Plasma Wayland or Plasma (x11).

$ sudo dnf reinstall distro-release-theme — this is to reinstall correctly the files needed for the beautiful OpenMandriva grub2 menu theme. Otherwise user will see an ugly black/white grub2 menu.

Users with additional repositories enabled should be able to figure out what to do. If not then ask in Support forum.

Users with 3rd party software I have no idea what may happen. If 3rd party software presents any problem then there should be a separate thread created for each instance in English/Support forum. But do be aware that by upgrading from Rock/Lx 4.1 to Lx 4.2 you now have an entirely new system tool-chain. However so far we have not seen any major issues with this.

OpenMandriva recommends users to keep their Lx 4.2 system up to date from Konsole(terminal) with:

$ dnf clean all ; sudo dnf clean all ; sudo dnf update

OM recommends user does this at least monthly if not weekly. Normaly our stable releases like Lx 4.1/4.2 do not get a lot of updates. Users wanting more up to date software should try our OM Lx Rolling branch.

This should be easier to do than it was to write this for sure. Probably easier to do than to read this “How To”. :grinning:

If you experience any issues please report each issue in a English/Support forum thread. (You can use an online translator like DeepL if you need to.)

1 Like

This screen shot shows an error you will see that you can safely ignore.