|

How to Replace One Linux Distribution With Another From Dual Boot [Keeping Home Partition]

If you have a Linux distribution installed, you can replace it with another distribution in the dual boot. You can also keep your personal documents while switching the distribution.

How to Replace One Linux Distribution With Another From Dual Boot

Suppose you managed to successfully dual boot Ubuntu and Windows. But after reading the Linux Mint versus Ubuntu discussion, you realized that Linux Mint is more suited for your needs. What would you do now? How would you remove Ubuntu and install Mint in dual boot?

You might think that you need to uninstall Ubuntu from dual boot first and then repeat the dual booting steps with Linux Mint. Let me tell you something. You don’t need to do all of that.

If you already have a Linux distribution installed in dual boot, you can easily replace it with another. You don’t have to uninstall the existing Linux distribution. You simply delete its partition and install the new distribution on the disk space vacated by the previous distribution.

Another good news is that you may be able to keep your Home directory with all your documents and pictures while switching the Linux distributions. 

Let me show you how to switch Linux distributions.

Replace one Linux with another from dual boot

Let me describe the scenario I am going to use here. I have Linux Mint 19 installed on my system in dual boot mode with Windows 10. I am going to replace it with elementary OS 5. I’ll also keep my personal files (music, pictures, videos, documents from my home directory) while switching distributions.

Let’s first take a look at the requirements:

  • A system with Linux and Windows dual boot
  • Live USB of Linux you want to install
  • Backup of your important files in Windows and in Linux on an external disk (optional yet recommended)

Things to keep in mind for keeping your home directory while changing Linux distribution

If you want to keep your files from existing Linux install as it is, you must have a separate root and home directory. You might have noticed that in my dual boot tutorials, I always go for ‘Something Else’ option and then manually create root and home partitions instead of choosing ‘Install alongside Windows’ option. This is where all the troubles in manually creating separate home partition pay off.

Keeping Home on a separate partition is helpful in situations when you want to replace your existing Linux install with another without losing your files.

Note: You must remember the exact username and password of your existing Linux install in order to use the same home directory as it is in the new distribution. 

If you don’t have a separate Home partition, you may create it later as well BUT I won’t recommend that. That process is slightly complicated and I don’t want you to mess up your system.

With that much background information, it’s time to see how to replace a Linux distribution with another.

Step 1: Create a live USB of the new Linux distribution

Alright! I already mentioned it in the requirements but I still included it in the main steps to avoid confusion.

You can create a live USB using a start up disk creator like Etcher in Windows or Linux. The process is simple so I am not going to list the steps here.

Step 2: Boot into live USB and proceed to installing Linux

Since you have already dual booted before, you probably know the drill. Plugin the live USB, restart your system and at the boot time, press F10 or F12 repeatedly to enter BIOS settings.

In here, choose to boot from the USB. And then you’ll see the option to try the live environment or installing it immediately.

You should start the installation procedure. When you reach the ‘Installation type’ screen, choose the ‘Something else’ option.

Replacing one Linux with another from dual boot
Select ‘Something else’ here

Step 3: Prepare the partition

You’ll see the partitioning screen now. Look closely and you’ll see your Linux installation with Ext4 file system type.

Identifying Linux partition in dual boot
Identify where your Linux is installed

In the above picture, the Ext4 partition labeled as Linux Mint 19 is the root partition. The second Ext4 partition of 82691 MB is the Home partition. I haven’t used any swap space here. 

Now, if you have just one Ext4 partition, that means that your home directory is on the same partition as root. In this case, you won’t be able to keep your Home directory. I suggest that you copy the important files to an external disk else you’ll lose them forever.

It’s time to delete the root partition. Select the root partition and click the – sign. This will create some free space.

Delete root partition of your existing Linux install
Delete root partition

When you have the free space, click on + sign.

Create root partition for the new Linux
Create a new root partition

Now you should create a new partition out of this free space. If you had just one root partition in your previous Linux install, you should create root and home partitions here. You can also create the swap partition if you want to.

If you had root and home partition separately, just create a root partition from the deleted root partition.

Create root partition for the new Linux
Creating root partition

You may ask why did I use delete and add instead of using the ‘change’ option. It’s because a few years ago, using change didn’t work for me. So I prefer to do a – and +. Is it superstition? Maybe.

One important thing to do here is to mark the newly created partition for format. f you don’t change the size of the partition, it won’t be formatted unless you explicitly ask it to format. And if the partition is not formatted, you’ll have issues.

It’s important to format the root partition

Now if you already had a separate Home partition on your existing Linux install, you should select it and click on change. 

Recreate home partition
Retouch the already existing home partition (if any)

You just have to specify that you are mounting it as home partition.

Specify the home mount point
Specify the home mount point

If you had a swap partition, you can repeat the same steps as the home partition. This time specify that you want to use the space as swap. 

At this stage, you should have a root partition (with format option selected) and a home partition (and a swap if you want to). Hit the install now button to start the installation.

Verify partitions while replacing one Linux with another
Verify the partitions

The next few screens would be familiar to you. What matters is the screen where you are asked to create user and password.

If you had a separate home partition previously and you want to use the same home directory, you MUST use the same username and password that you had before. Computer name doesn’t matter.

To keep the home partition intact, use the previous user and password
To keep the home partition intact, use the previous user and password

Your struggle is almost over. You don’t have to do anything else other than waiting for the installation to finish.

Wait for installation to finish
Wait for installation to finish

Once the installation is over, restart your system. You’ll have a new Linux distribution or version.

In my case, I had the entire home directory of Linux Mint 19 as it is in the elementary OS. All the videos, pictures I had remained as it is. Isn’t that nice?

Similar Posts

  • After I changed my ubuntu with manjaro, now I couldn’t boot into manjaro and In boot menu I have ubuntu and windows but there isn’t manjaro and when I select ubuntu, it brings grub CLI and I can boot into manjaro with selecting grub.cfg but I have to repeat that every time and with grub-update after boot nothing changes.
    It looks that there isn’t manjaro in my boot manager.

  • Nice write up. Bonus question – what about triple booting? Can I have two distros touching the same home partition?

    If I have the space for it can I just shrink my Ubuntu partition and add a Mint partition?

    Thanks in advance,
    AJ

  • Hi from France.
    Many thanks for this guide.
    My question is about the applications configuration files that are in the Home : the ones in Linux Mint are, maybe, not the same and/or not at the same release than the ones of the new Linux.
    So do I would have to check and delete all configuration files of the Mint app and then recreate config files for the app of the new Linux ?
    Or, as I have enought unallocated space, create a separate Data partition, transfer my personnal files in this new partition and at the partitionning phase in addition to the root partition delete/format and create I do the same with the Home.

    You do not mention the selection of the device for boot loader, I believe there could be here a potential problem with some BIOS UEFI ?
    Thank you for yr advice.

    • “My question is about the applications configuration files that are in the Home : the ones in Linux Mint are, maybe, not the same and/or not at the same release than the ones of the new Linux.”

      I don’t have a definite answer for that. It could work for some (even if the versions are different) and it may not work for some.

      “Or, as I have enought unallocated space, create a separate Data partition, transfer my personnal files in this new partition and at the partitionning phase in addition to the root partition delete/format and create I do the same with the Home.”

      Sure. You may experiment with that.

      “You do not mention the selection of the device for boot loader, I believe there could be here a potential problem with some BIOS UEFI ?”

      That’s possible. Some installers (like Ubuntu) is smart enough to locate the bootloader location. If not, you may update grub from one of the earlier installed distros.