1

When installing Ubuntu, I don't want to format the partition that is going to be /. Installation wizard prompts me that Directories containing system files (/etc, /lib, /usr, /var...) that already exist will be deleted. Can somebody list all of them? Does it include /home?

  • Why don't you want to format the root partition? It is highly recommended when installing the OS and will prevent many possible issues. – earthmeLon Oct 11 '15 at 20:06
  • I tried to reinstall Ubuntu and installation froze(and it already had removed some files). And I had my /home in the same partition. I don't have anywhere to put my home folder as it is huge, so just want to get my system to boot normally until I can fix this mess. – Grindinys Oct 11 '15 at 20:10
1

Most directories contain 'system files', except those in /home/. However, since you say your home directory is on the same partition, you would lose that data if you were to proceed.

When installing Ubuntu, you are given the option of having one partition for all directories, or mounting different partitions for specific directories.

One setup may have /, /bin, /home, etc on one partition, while another setup may have /, /bin, etc on a partition, with /home on another partition. The benefit of the second setup is that you can re-install linux root (/) without touching your home directory (/home).

However, since you have the first setup, in this situation, you would be deleting all of the data on that partition, which includes your home directory.

If you have a LiveCD, you can mount your drive and move any data onto another HDD. When installing Ubuntu, be sure to use the second setup to prevent this in the future. Another option would be to place your HDD into another Linux machine, mount the HDD, and pull off the data.

Example:

I have an SSD (/dev/sda) and HDD (/dev/sdb). When I install Ubuntu, I select to create an ext4 partition on all of the SDD. I also create an ext4 partition on the HDD. I then tell Ubuntu to use the SSD as the root (/) partition, and tell it to use the HDD as the home (/home) partition.

Tomorrow I accidentally run a bad command that I will not place here (let's say I just removed all the files in /bin/). I can then load up an Ubuntu CD, format the SSD (/dev/sda1) partition, point to my HDD for home (without formatting). After it installs, I will be on a fresh Ubuntu install with all of my home data.

  • so, if I understand this correctly, even if I copy my home folder and temporarily place it in /, it will be deleted, because, well, it's in /, and / directory contains these "system files", so it gets wiped? – Grindinys Oct 11 '15 at 20:29
  • Exactly. It's misleading you into thinking it will be selective of it's destruction. It's going to destroy and re-create that partition, and all of it's contents. Again, you can prevent this in the future by creating separate partitions for root (/) and home (/home). From then on you would be able to destroy the root partition without losing your home data. – earthmeLon Oct 11 '15 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.