In Ubuntu 20.04, how can I create partitions seperate from /home, /root etc. for storing files?

To elaborate on the title, I just want my documents (text, media or whatever) to be safe from deletion in case of a re-installation of Ubuntu and at the same time to remain accessible now. Just as things are in Windows: no matter how many times you re-install the OS in c:, the data in other partitions remain intact.

At the time of installing the Ubuntu, I did create extra partitions for the purpose but couldn't mount them. I was warned that the partitions, unless mounted, would be unusable (and that is what has happened), but I wasn't sure where to mount them: /usr, /usr/local? Some answers to similar questions in this forum seem to suggest /data or /workdata as mounting points, but I don't remember any such options offered during installation. I have even gone half-way through a mock re-installation but still haven't found those options.

By way of a bit of extra information, I have used Ubuntu 14.04 for a number of years. It was installed in the c: drive of a Windows system, and all the other partitions remained intact, in the form of 'media/.../ntfs'. They wouldn't mount at booting, but their icons showed up on the launcher. A click would mount them and the Ubuntu system could freely communicate with them. A similar configuration will do for me.

I would be grateful for any useful advice from anyone more experienced than me.


Solution 1:

You create partitions while partitioning your drive. You apparently did that.

Partitions then need to contain a file system. To achieve that, a partition is formatted.

In Ubuntu, a formatted partition on an internal drive will not be automatically mounted. It will, however, be visible as an icon in the left pane of the file manager, and can be mounted on demand, i.e., by clicking on that icon. A formatted partition on an external USB drive will be automounted when the drive is inserted.

Ubuntu comes with the utility "Disks" (command: gnome-disks). It allows you to

  • Partition a drive or change partitions on a drive;
  • Format partitions;
  • Set partitions to automount during startup.

With these tools, you can obviously create a separate partition for data storage if you wish so, format it with an available file system of your choice, and configure it like you prefer, i.e. have it automount or only on demand.