2

I want to make sure that at the next system installation/restoration my files are not lost. Using tweakers I can change Window's default folders (e.g. move "My documents" from C: drive to D:).

Right now I have Linux Mint 15 Mate installed on partition / and the rest of HDD mounted to /home. Is this right approach?

If yes, how can I move default folders to this partition? If no, what is the best approach?

slm
  • 363,520
  • 117
  • 767
  • 871
javlon
  • 85
  • 3

2 Answers2

2

Key directories

In Unix/Linux there are 2 directories that are critical to the system in terms of what makes one system unique when compared to another system. These directories are /etc and /var. The /etc directory contains all the configuration files for the various services that run on a given system.

The /var directory contains various databases about the system such as what packages are installed on it as well as logs about what's been happening on the system.

The 3rd directory that's important, not so much to the system but to the user, is the /home directory. This directory houses data that's of value to the users. Things like documents, mp3s, videos, etc. are kept here, typically.

Partitioning

The /home directory is often times segregated to its own partition, more because of history than for any really practical reason at this point. It's completely fine to go with this model even today, but it really doesn't by you anything, especially when the / and /home are sharing the same physical HDD.

It gives you a little protection in the sense that if the /home directory fills up, the system's primary directory / should in theory still have free disk space, after /home has been filled, but really this is no big deal, IMO.

Best approach?

This is a completely subjective question, in Unix/Linux you have to do what makes sense for your particular situation, hence this is why there are so many choices for things like partitioning, default shell, etc.

So what should you do?

I would make a concerted effort to make sure that you keep all files related to "user" data in some organized fashion under your /home directory and also to take steps to back it up. Either to another system on your network, or to some attached storage to the system.

It's pretty trivial to backup your /home directory using a tool such as rsync, and this can be scripted so that it runs in an automated fashion from a cron, for example.

slm
  • 363,520
  • 117
  • 767
  • 871
0

I'm on OSX, which is similar in setup. I have a standard user account (let's call it JOHN) for daily use, so no admin rights. I have a second account with admin rights. My laptop has one physical drive with two partitions. The SYSTEM partition is for the OS, DATA is for all user data. Whenever I have to reinstall, I can wipe the SYSTEM partition, then reinstall and recreate the user JOHN on the SYSTEM partition. Same goes for the admin user.

Then I login as admin, go to /Users (/home on linux), rename the JOHN folder to JOHN1, and create a symlink JOHN to DATA/Users/JOHN. Then I logout, login as user JOHN, and all is back to normal. I keep the admin user on the SYSTEM partition. I don't keep any data there to keep the size of user data on the SYSTEM partition as low as possible. If partition DATA is messed up, I can still login.

For first time use, copy the JOHN folder to the DATA partition, with proper rights. I would use rsync for this, as it keeps all the rights like they are. After reinstalling, the user might have gotten a new system id, so you have to chown the folder to the new user. On OSX this has never been a problem. I've done this several times now.

SPRBRN
  • 1,117
  • 4
  • 20
  • 38