Do you find the switch between Linux distributions frequently? When upgrading, do you favor clean installations more site updates? Why do you hate having a backup of all your personal data, or else you will lose?
What if I told you this does not have to happen?
It is actually quite easy to switch between different Linux distributions or perform clean installations and still retain all of your personal data. We’ll show you what to do, so it’s all set up regardless of your current situation.
How does it work?
What is the magic that allows you to keep all your personal information? Separate partitions: Simple.
Whenever you install Linux, you have to tell the installer what partition settings you would like to have on your hard drive. If Linux is the only operating system on your hard drive, chances are you have one or two partitions. This includes the main partition, usually in ext4 format, which includes the operating system and all its data.
Optionally, you can also have an additional partition called the “swap partition.” All it does is allow a portion of your hard drive to be used as RAM space overflow as well as the location where the RAM data is stored during hibernation.
However, you have the freedom to create as many partitions as you want, and you are also able to tell the installer which partitions to use for the folders. In order to achieve the effect we want, we will need to create an additional ext4 formatted partition. The first one should have (the root folder) “/” mounted on it, and the other partition should have “/ home” installed on it. All your personal data is stored in the “/ home /”Folder, which means that all your personal data will be stored in the second partition.
Once you are wanting to change Linux distributions or perform an upgrade, you are free to get rid of the first partition containing the operating system and installed applications. However, the second partition that has all your personal files and preferences may remain intact.
Then, when the new Linux installation is done, you can tell the installer to format the first partition (start from scratch), but leave the second partition alone and simply mount it on “/ home”. So all you need to do is make sure you set the same username and password as before, and everything should be back to the way it was.
The only thing you would still have to do is reinstall the applications, but you will not have to reconfigure them because your settings were stored along with your other personal files. The only disadvantage of this is that the maintenance of the configuration, while the switching between the distributions may not be compatible. For example, although Fedora and Ubuntu GNOME use as much as the default desktop server, the Ubuntu application is very different, and the Fedora configuration could cause problems. Keep in mind.
Make sure that when you are giving the space two partitions, it gives each of them enough space. If your first, root partition is very small, you will not be able to install very many applications, and if the second partition is too small then you will not have much space to save your personal files. Partition sizes are strict limits.
I would suggest giving your first partition 15 GB and 20 GB of space if you do not plan to install a lot of applications. If you plan to install many applications or games (which absorb large amounts of space) then you are better off with 50+ GB. Players should look at the games that are interested in the installation and add up the amount of space each occupies. If you find that your partition sizes were not appropriate for your use, you can always resize booting in a live environment and running a partitioning tool.
Already have Linux installed?
If you already have a Linux installation in place and have everything (including the boot folder) on the same partition, do not worry. It only takes a few steps to achieve the configuration you need. The steps are the following:
- Download the live ISO environment from your favorite Linux distribution, and burn it to a CD / DVD or write it to a USB drive.
- Boot in your newly created media.
- Use a partitioning tool like GParted to resize the ext4 partition to the size you want it to be.
- Use the same tool to create a new ext4 partition in the empty space created by resizing the first partition. Take note of what the partition is. It must remain as
/ Dev / sdXY, where X is a letter designating the unit and Y is a number designating the partition. An example is
/ Dev / sda2.
- Mount the two partitions, and copy the contents of the boot folder to the new partition. Make sure you are copying over the entire contents of the startup folder, and not to the startup folder itself. Otherwise, when everything is done, all your stuff will be in “/ home / home / user”, which will not work.
- Now open a terminal and run the command
sudo geditto open the Gedit text editor. Now use the menus to open the file that is located in / etc / fstab on the first partition.
- Add the following line to the end of the file
/ Dev / sdXY / Home mistakes ext4 = Reassembly-ro 0 1. Again, be sure to replace
/ Dev / sdXYwith the current designation for the partition.
- Save and restart. Be sure to remove the actual environment brackets so that it boots again in your normal installation.
The different is not obvious, but your personal data will now be on a separate partition that will stay out of the way while changing distributions or performing updates! No doubt, I recommend that people try to do this, since the benefits far outweigh the only drawback of limited space within the partition. However, it is always capable of firing up the live environment and resizing the partitions as needed.
Have you placed the startup folder on a separate partition? What advice would you give readers when they are making their own partition? Let us know in the comments!
Dont miss any updates