23

I would like to install Ubuntu 14.04.02 LTS on my machine which currently has Mageia 4.1.

So, I have the following partitions: One for /, one for swap and one for /home.

I have some important data on /home which I wouldn't like to lose (I have backed them up, but I would prefer to keep them) after a clean install. I plan to reformat partitions one and two as above and keep the /home one.

Will I be able to tell Ubuntu to do so during an installation? By this I mean: Will it be able to recognize the /home partition and keep all its data intact while formatting the rest? And one more question: Will it be able to keep the users as they are our will I be forced to change them too? (I have the bad feeling that it won't be able to keep the users as they are...)

Fabby
  • 35,017
Jason
  • 333

1 Answers1

31

Keep the /home partition

Steps updated for Ubuntu 22.04

Yes! You can keep the existing home partition using one of the advanced installation options called Something Else

enter image description here

After choosing this option, you will be able to tell the installation process to use the existing / and /home partitions.

Select the existing Ubuntu system partition /.

enter image description here

Click the Change... button below and make sure:

  • The Use as: is Ext4 journaling file system
  • The format partition box is checked
  • The Mount point: is /

Once everything as set, click OK, you will see a warning popup message like:

enter image description here

Click Continue.

Select the existing Ubuntu HOME partition /home.

Note the partition will not be marked as Home. Click the Change... button below and make sure:

  • The Use as: is Ext4 journaling file system
  • The format partition box is NOT checked
  • The Mount point: is /home

enter image description here

Once everything as set, click OK, you will see a warning popup message like before.

The final Install Type window will look something like this:

enter image description here

Note:

  • The system partition must have the mount point / and format box is checked.
  • The Home partition must have the mount point /home and format box is NOT checked.

Warning: If the format box for the home partition is checked, you will lose all your personal files.

Once you are satisfied, click Install Now and continue as usual.

Keeping the users

Before you start the install process

From inside the Mageia installation, run the follwoing command:

cat /etc/passwd

This will give you the list of current usernames and user-numbers. Write the names and numbers down, as you will need them later when you recreate the users in Ubuntu. Thanks Arronical for the comment.

During installation

During Ubuntu you will be prompted to create the first user. This user will have sudo privileges. This user is internally identified as user number 1000. Assuming that Mageia uses the same convention, you should use the same username you had before. Ubuntu will setup to use your existing /home/username.

After installation

For all other users, you will have to wait till after the installation. See Why can't I click the button to add a new user? for details. If you create them in the same order as you did in Mageia, they will get user numbers in the same order as 1001, 1002, etc. Again, use the same usernames, and their existing home folders will be assigned to them. (You will be prompted to choose the existing folders or create new ones.)

Cleaning up

Note: your home folder /home/$USER contains your data as well as configuration files (your preferences) for the applications you use. These are kept in hidden folders with names starting with a dot (.). Since configurations in Mageia may not always match that in Ubuntu, you may get some errors when running an application for the first time. If this happens, you may need to delete the corresponding folder (or file) with dot in the the beginning. Alternately, you may want to delete all the hidden folders and files inside your home folder to get a fresh start in terms of application configuration.

Also see Changing to another distro: can the -home partition be kept?

Hope this helps

user68186
  • 37,461