I want a separate partition on my SSD (about 10 GB or so) since I re-install often. I want to be able to put things that are really important to me that I don't want to upload to the cloud. I would like it to be accessible by windows as well. If I could encrypt it, that would be nice too.
1 Answer
There is no way to stop the root user (sudo) from doing all and everything with drives attached to our computer. This includes deleting files, formatting partitions, and partitioning drives.
There are means to protect files on a partition from being accidentally overwritten by mounting it as read-only in Ubuntu but this alone will of course not stop Windows, and it will not stop Root to remount the drive with write access. We can even hide a partition but it will not be accessible then and as soon as we try to re-partition it this will be gone too.
While installing any OS we inevitably need to be Root. We then will always be able to partition and format all drives attached to our computer, hence will also be able to delete all data with a single bad command.
Therefore the only means to protect our data is performing regular backups on an external drive that will not be attached to our computer on installing any OS. This backup should always be made before we install anything, or re-partition.
For data in the GB rather than the TB range such an external storage could also be a pen-drive or an SD-card we can write protect with a hardware switch, provided the hardware switch was read correctly by the new OS (which sadly appears to not always be the case).