With Fedora 7 now out, I am posed with the task of upgrading my operating system. The problem is I know I have a lot of applications installed that aren’t a part of the new Fedora. So I thought there had to be a way to do this more easily. Here’s what I do now.

I always have had a separate drive (that is mounted as /data) in my machines to be used to store data. This ensured that, in the event of a fatal OS crash, precious data would be safe. Also on this drive (in a directory called /data/rpms) are all of the rpms of programs (and their dependencies) I have used over the lifespan of Fedora Core 6.

With that drive in mind here’s what we’ll do. The first step is to tar up the /home/ directory. This will take a long time and can result in a rather large file. We’ll name that file home.tgz . Once the file is tarred, move it to /data so it’s safe. Now we’ll create a post-install script (which will be called system_update and be stored in /data). Here’s what the script will look like:

#! /bin/sh

#update the newly installed OS

yum -y update

#install the rpms from /data/rpms

rpm -i /data/rpms/*rpm

#copy and unpack the /home directory

cp /data/home.tgz / ; tar xf /home.tgz



Run chmod u+x /system_update and then install the new OS making sure you DO NOT overwrite the /data drive.

With your OS installed and working you need to run your new script. But before you actually would run this script you will need to find out what the /data drive is called, create a new directory called /data, and mount that drive to the /data directory. NOTE: Add that drive into the new systems /etc/fstab so it is mounted at boot. Now issue the command /data/system_update and your machine should eventually reboot into a familiar system.

There might be some issues with configuration files held in ~/ directories depending upon what you migrate from and to. None of this is a guarantee of course. It has worked for me on a number of occasions. At times it has failed when trying to move from major release to major release. And of course if you are using a distribution like Ubuntu, you could modify this easily to use apt-get instead of yum.