Woah, the latest version of your favorite Linux-based Operating System is available! This means that after installing it you will have at your disposition all the new fashioned applications and cool additional functionalities.
For beginners, the idea is to cut your hard disk into several pieces allowing each part to be erased or to be modified without touching anything on other parts. It permits to protect some parts of your hard disk.
However, you have to flush the entire disk of your machine just to install the new one. And it is a pain to put a backup of your 100 Go collection of music and movies on an external disk.
You spent also so much time setting your environment that doing it once again looks like a real waste of time. Everything you did to achieve an environment close to perfection will be wasted with your disk data…
Perhaps you feel that installing the latest OS is a pain just for that.
To avoid such a situation, you have the possibility to install your OS while preserving your personal data. How? Read the following lines.
Following screenshots are taken from Ubuntu 10.04 LTS installer. But it is possible to do similar operation with other distributions as well (Centos, Suze, Fedora…).
The machine used is a Virtual machine of 8 Go of Disk and 512 Mo of shared memory.
After initializing the installation with language choice, keyboard setting, or whatever, you will be asked to prepare your disk space.
For your case, choose the option Specify partitions manually.

You will be redirected to a new screen. This is the place when you will set your partitions. Now Create a new partition table on the disk you want.
In the case of my virtual machine, I have only one disk. It is also the case for most of laptops used.

You will see free space created from your hard disk (here 8 Go). This space is going to be cut into smaller pieces. So click on Add.

The first mounting point (the place in the directory folder where you base the access of this part of the disk), has to be what is called root, the lowest level. This is identified by “/”. Here we use 4 Go as disk space, feel free to enter a value adapted to your needs.
In the option “use as”, you can find a list of system files. For instance Windows uses NTFS partitions for its install. In our case, ext3 can make the deal. You can also use ext4 if you wish.
This partition is going to contain the programs you install and Operating System data. That’s why it is the primary partition.
Set up your partition as on the screen below. Then click on OK.

You will be back to the main screen, add a new partition with Add

The second partition is called swap. You have basically to put a memory space equal to 2 times the amount of shared memory of your system.
In our case, the virtual machine has 500 Mo, so we set 1000 Go. Check how much shared memory you have before setting it. After setting it click on OK.

You will be back to the main screen, so let’s go to set up the 3rd partition. Add a new partition.

This partition has to use “/home/” as a mounting point. In Linux based systems, home is the directory containing all the users data. So basically it is the partition of the disk that has to be kept independant and not erased when you reinstall a new OS.
For our case, the disk was empty, so a new partition existed. But if you reinstall a new OS on a disk already partition, don’t forget to associate “/home/” as a mounting point for this partition. This permits to keep user’s data safe with your environment settings also if you are reinstalling the same type of distribution as before (Always try to keep a gnome or KDE desktop!).
Use the rest of amount of memory for this partition.

OK, you are done, congratulations!

What you have to remember about the partitions:
- One used as a root, mounted at “/”. This can be erased each time you want to make a fresh install.
- Swap area, always two times equal to the shared memory of your machine. This can also be erased when you do a fresh install.
- One partition mounted at “/home”. When you reinstall an OS, do not erase the data on it!