M BUZZ CRAZE NEWS
// news

Keeping data separate from OS

By Mia Morrison

Is there a simple way to configure windows/linux/mac so that the OS is installed on a separate HDD/SSD to all the user data which is stored on one or more drives?My motivations are:

  • Quick and easy system restore of clean OS and applications
  • New installation of an operating system
  • Potential protection against virus' encrypting the OS drive for ransom
  • Simple backup/restore of the data on user drives

I don't know if it's possible, but ideally it would be great if it's possible to use a script that would assign these drive mappings to tell the new OS to where it can find the locations of user documents/videos/music etc

1

3 Answers

For linux, just install / on a seperate drive from /home. A sample fstab could look like

/dev/sda1 / ext4 defaults 1 1
/dev/sda1 swap swap defaults 0 0
/dev/sdb1 /home ext4 defaults 1 2
3

For Windows you can take look at folder redirection and roaming profile. You should evaluate if your network infrastructure could support this.

This link provides a method to accomplish your task on OSX. It is pretty old but it still works and uses the command line. A similar method can be used by going into System preferences - > Users and Groups - > Right click user - > advanced options - > change home directory. You can assign a mounted partition using this method as the home.

The link shows a method to move the /Users directory to a separate partition.

Basically the following steps in terminal

sudo mv /Users /UsersOld
//this is so your data doesn't disappear

sudo mkdir /Users
sudo chown root:admin /Users
sudo chmod 755 /Users //This makes a new /Users directory
sudo touch /etc/fstab
sudo cp/etc/fstab /etc/fstab.orig //this saves your original fstab
sudo vi /etc/fstab //use this to edit your fstab and include the UUID of the partition

Append the following line at the end of the file: (get this information from going to disk utility and clicking cmd + I on the drive, must be mounted) UUID=TheValueYouCopiedAbove /Users hfs auto

After editing, your file should look similar to:

UUID=84BA91DE-C37F-F13D-B5C9-FECA5184DEB7 /Users hfs auto

Then unmounts and remount.

sudo mv /UsersOld/* /UsersOld/.[^.]* /Users/
sudo rmdir /UsersOld

Then test it. Additional information on changing appearance can be found on the link above.

I realize it is not automated but I hope it helps. Also, you can do this with individual user accounts by replacing /Users with /Users/[account name]. I ran into some trouble when trying to boot them from encrypted partitions (see my question OSX Automatic Unlock and Mount Encrypted User Account on Separate Partition) but otherwise it should work just fine.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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