Link: http://embraceubuntu.com/2006/01/29/move-home-to-its-own-partition/ Having the “/home” directory tree on it’s own partition has several advantages, the biggest perhaps being that you can reinstall the OS (or even a different distro of Linux) without losing all your data. You can do this by keeping the /home partition unchanged and reinstalling the OS which goes in the “/” (root) directory, which can be on a seperate partition. But you, like me, did not know this when you first installed Ubuntu, and have not created a new partition for “/home” when you first installed Ubuntu. Despair not, it is really simple to move “/home” to its own partition. First, create a partition of sufficient size for your “/home” directory. You may have to use that new hard drive, or adjust/resize the existing partition on your current hard-drive to do this. Let me skip those details. Next, mount the new partition: Now, Copy files over: Make sure everything copied over correctly. You might have to do some tweaking and honing to make sure you get it all right, just in case. Next, unmount the new partition: Make way for the new “home” Mount the new home: Cursorily verify that everything works right. Now, you have to tell Ubuntu to mount your new home when you boot. Add a line to the “/etc/fstab” file that looks like the following: /dev/hda5 /home ext3 nodev,nosuid 0 2 Once all this is done, and everything works fine, you can delete the “/old_home” directory by using:
Outro comando para copiar: sudo cp -dpRx /home /media/home link: https://help.ubuntu.com/community/Partitioning/Home/Moving Copy /home to the New PartitionNext we will copy all files, directories and sub-directories from your current /home directory into the new partition: sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/. The --exclude='/*/.gvfs' prevents rsync from complaining about not being able to copy .gvfs, but I believe it is optional. Even if rsync complains, it will copy everything else anyway Check Copying WorkedYou should now have two duplicate copies of all the data within your home directory; the original being located in /home and the new duplicate located in /media/home. You should confirm all files and directories copied over successfully. One way to do this is by using the diff command: sudo diff -r /home /media/home The only difference that should exist is the excluded /.gvfs directory mentioned above. |