Revision 2 as of 2008-10-05 05:37:47

Clear message

Setting up /home on a separate partition is beneficial because your settings, files, and desktop will be maintained if you upgrade/reinstall/use a different distro. This works because /home has a subfolder for each user's settings and files. Also, fresh installs for linux typically like to wipe whatever partition they are being installed to, hence the need to put /home on a different partition.

** Setup Partitions ** This is beyond the scope of this page. You can probably use the ubuntu live cd, and gparted (somewhere under the system menu). Memorize or write down the location of the partition, something like /sda3 or /hda3. Its been suggested to use either ext2 or ext3 over vfat. Using vfat is not supported and may fail, since vfat does not support permissions.

** Setup Fstab ** gksu gedit /etc/fstab Add a line for your partition, maybe something like the following line: <pre> UUID=???????? /media/home ext3 nodev,nosuid 0 2 (identifier ) (location ) (format) ( some options ) </pre>

You should replace the ?'s with the UUID of the intended /home partition The UUID can be found by running these commands: cd /dev/disk/by-uuid/ ls -l

Finally, mount the partition with: sudo mount -a

Check that you can copy files over, at least as root (ie with sudo).

** Copy /home to the New Partition ** sudo rsync -aS /home/. /media/home/.

** Make the Switch ** Rename your /home directory: sudo mv /home /old_home

Re-create a /home directory with: sudo mkdir /home

Edit fstab so that your new home partition actually points to /home, by changing /media/home to /home

and finally, remount the partition with: sudo mount -a

** After a reboot ** If everything is working, it should work after a reboot, but a reboot is the ultimate test. This guide has you move your /home to /old_home. If anything doesn't work, simply move that back, and take out any additions to your fstab. If everything IS working, you can delete /old_home, of course.

** Technical Notes and Resources ** Rsync was chosen over cp and find|cpio because it seemed to maintain permissions. http://ubuntu.wordpress.com/2006/01/29/move-home-to-its-own-partition/ http://ubuntuforums.org/showthread.php?t=46866

http://ubuntuforums.org/showthread.php?t=791693