0

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
  • Multibooting is not your best option, using a virtual machine is. With multiple OSes running in VMs, you can share all the data you need without worrying about incompatible filesystem types, you can run the multiple VMs all simultaneously (no need to log out and reboot into a different OS), you can enlarge/shrink disks much more easily. Commented Jul 4, 2015 at 9:20

3 Answers 3

1

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
  • I feel unfair only being able to accept one answer as all three OS' have been covered in separate answer(!). Linux is my OS of choice though (+1'd the others though) - thanks
    – Bendy
    Commented Jul 8, 2015 at 19:43
  • could you clarify how to "install /" to get /home on sdb1 please?
    – Bendy
    Commented Jul 8, 2015 at 19:45
  • Perhaps the partitioning article on the arch wiki can answer some of your questions. Their installation guide also covers some of this, although your preferred distro probably has some gui tools for configuring stuff.
    – Forty-Bot
    Commented Jul 9, 2015 at 22:23
2

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

1

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.

http://lnx2mac.blogspot.com/2010/09/moving-os-x-users-to-separate-partition.html

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .