Skip to main content

Upgrade Mandriva 2010 to 2011

Part of the fun of Linux, for me at least, is the ability to fix things when they go wrong. And things generally go wrong when you don't follow the advice of conventional wisdom. Plus, my personal mantra is "fix it until it breaks".

One of those great pieces of common wisdom when discussing Mandriva is that you only upgrade within major versions, like from Mandriva 2010.1 to 2010.2, but when moving between major versions, like from Mandriva 2010 to 2011, you do a clean install.

If you have followed other convention wisdom, you have a separate physical partition for /home. With that configuration in place, you can do a clean install of the root filesystem and keep all you personal files and settings. But that can also pose problems since there is not always a clean upgrade path for the personal configuration files that live in the dotfile and hidden directories of your home directory. More on that at another time.

I wanted to upgrade (not update) from Mandriva 2010.2 to 2011.0 just to see what would happen. A look at the Notes for 2011.0 would indicate that such an option is possible with relative ease. Well, not really. Here's what you need to do.

After you have made certain that all you data is backed up and secure, the first step of the update is to update all the packages on your system.

# urpmi --auto-update --auto -v

Next, all the references to the 2010.2 repositories must be deleted.

# urpmi.removemedia -av

Then, 2011.0 repositories must be added. I also use the PLF repositories, so those need to be added those as well. You can do this automatically with EasyURPMI at PLF.

For the full Mandriva repos (all on one line):

# urpmi.addmedia --distrib --mirrorlist 'http://api.mandriva.com/mirrors/basic.2011.0.$ARCH.list'

For the PLF repos (all on one line):
# urpmi.addmedia --distrib --mirrorlist 'http://plf.zarb.org/mirrors/2011.0.$ARCH.list'

Note that the commands contain the variable $ARCH. I did that so you could copy the command and it would automatically detect your i586 or x86_64 system as appropriate.

Even after this has been done, some of the individual repos (the non-free ones) that are deliberately not enabled. To enable these, in your menu go to Tools : System Tools : Configure Your Computer. This launches the Mandriva Control Center. Then select Software Management : Configure media sources. Tick the boxes next to the repos Main Backports, Contrib Backports, Non-free, Non-free Updates, Non-free Backports, PLF Non-free and PLF Non-free Backports. Click on OK when you are all done and exit the Control Center.

If you want to avoid the lengthy trip through the menu system, execute drakrpm-edit-media in a terminal window.

If anyone is aware of a script that can have the same result, I would like to hear of it.

I have always found it better to do this kind of upgrade without the GUI running. So far, if you've been following along on your own system preparing for the upgrade, you've been able to cut and paste commands between your browser and a terminal window, but once the GUI disappears, that becomes impossible. Since the command to perform the actual update is a long one, let's create a shell script to execute it.

Using whatever text editor you prefer, create a file named 2011_upgrade.sh, make it executable with chmod +x and have it contain the following (all on one line):

#!/bin/sh urpmi --auto --auto-update --replacefiles 2>&1 | tee 2011_upgrade.log # upgrade 2010.2 to 2011.0

Now, using Crtl-Alt-F2, open a virtual terminal and log in as root. Stop the dm service to shut down the window manager with:

# service dm stop

Now log back in as root, change to your home directory and run the 2011_upgrade.sh script.

The urpmi package manager now wants to install a lot of packages and urpmi is smart enough to know to install certain system-critical packages first. But urpmi cannot install python-numpy because if version conflicts. This causes the upgrade process to fail to install any python packages which will seriously munge your system and which prevents the installation of packages which depend n the newer version of python..

Don't panic and most importantly, don't reboot. Your system is running now and there is no guarantees that it will on a reboot.

The solution is simple. That is we should uninstall python-numpy manually and then re-install the most current version; this will allow urpmi to update python and unblock the installation of many more packages.

The problem we encounter is that the urpme command doesn't know how to uninstall python-numpy without also uninstalling every other package that depends on it. Normally that's a good behavior, but not for in this instance.

We'll need to use the rpm command to uninstall only the one package and then use it's smarter cousin urpmi to successfully update all of python.

# rpm -ev --nodeps python-numpy

and then,

# urpmi python-numpy

There may be similar notifications for other files. I was notified about libkexiv2 and x11-driver-input-evtouch. The same trick using rpm -ev --nodeps works with them as well.

With these problems fixed, run the 2011_update.sh script once more. Keep fixing and re-running until there are no more packages to update. Once that state is reached, it will be safe to reboot into Mandriva 2011.0. When 2011.1 is released, the same technique can be used, but there should be fewer problems.

One problem that did occur post-upgrade concerns networking. Mandriva 2011 implements a new network manager and your old network configuration files won't work with it. While you can use the network section of the Mandriva Control Center to fix this (I had to delete the connection and re-create it to make it work), it's easier to add NM_CONTROLLED=yes to the end of each ifcfg-* file in /etc/sysconfig/network-scripts. That's all that is necessary for the new Network Manager to control them.

Otherwise, everything works fine and I'm now running Mandriva 2011.0. That the upgrade worked as smoothly as it did is a testament to the work and expertise of the Mandriva team. If I come across other issues, I'll address them here.

UPDATE
Because I did not like many of the changes implemented in Mandriva 2011, I reverted all my desktops and servers to Mandriva 2010.2 and they were upgraded to Mageia when that became available.

Comments

Popular posts from this blog

DOS4GW.EXE Version 2.01a and Alternative DOS Extenders

DOS4GW.EXE The Tenberry DOS extender DOS4GW.EXE was used by many early DOS games. I still enjoy playing many of these games and DOS4GW.EXE is usable with DOSBox , so they can be played on Linux. However, the version of DOS4GW.EXE that was included with the game was whatever was current at the time. The most recent version that includes many bugfixes that possibly affected the games when used with DOSBox have been fixed in the latest version, 2.01a. It's not free at US$49, but you can downloaded it here . Simply substitute it for whatever version of DOS4GW.EXE your game provided and enjoy the bug-fixed goodness. Tenberry also makes a "high-performance" "pro" version of DOS4GW.EXE, but it costs $300. I think that they could sell quite a few of these to hobby users (since, you know, DOS is dead) for US$5. Open Souce to the Rescue There are better performing, free and Open Source alternatives available and worth a look. DPMI Explained Let's unders

Return to Castle Wolfenstein for Modern Linux

Return to Castle Wolfenstein is a first-person shooter originally released on November 19, 2001. The game, like many other classic games, is available at GOG.com and costs only US$5.99. iortcw for Linux Don't bother with old and crusty Linux binaries offered by idsoft; they are problematic and it's painful to use them on a modern Linux. Fortunately for us, there are more modern GPL-licensed Linux binaries available for 32- and 64-bit systems as well as high resolution textures packages. The project at GitHub provides source code that can also be compiled for MS Windows using MinGW. iortcw for Windows and Mac You can download pre-compiled binaries for 32- and 64-bit Linux, MS Windows and Mac from here . Let's put our files in /usr/local/games/rtcw . As root, extract the downloaded .ZIP file for your architecture to  /usr/local/games/rtcw . All we are missing are the game data files. I purchased them from GOG.com. The game installer downloaded from GOG.com can be

Unreal Tournament GOTY/UT99 for Modern Linux

Released on November 16, 1999, Unreal Tournament (also known as UT99) is an arena first-person shooter for Multiplayer on-line competition or you can play against bots off-line. It features several game types, with more details provided at Wikipedia . The game was re-released on February 25, 2000 as Unreal Tournament Game of the Year Edition (GOTY) which included the three bonus packs released previously and additional mods, or game modifiers that had become popular. It is the GOTY version that is available from STEAM or  GOG.com . The GOG version for Windows installs in Linux and plays well using WINE , PlayOnLinux or Codeweaver's Crossover . There is a Linux binary available in two versions, one for the original game and one for the GOTY edition . Also provided at that site is the Official Bonus Pack with a Linux installer. All these Linux installers are created with makeself . There are some issues using such a crusty old Linux binary. Let's see why getting a Lin