Conceptually, all you have to do is copy your home directory over to the new space, then tell the system that that area.
To do this you will just need to get the name of the device that your new hard drive is mounted on, copy your home folder there, and then rename the drive in your /etc/fstab to /home.
For example:
say I have just installed, partitioned, etc, a new hard disk- my second one on this system- and want to copy my home folder over onto it. All I have to do is type:
- Code: Select all
mount
at the console. It will provide me with a long list of all the mounted partitions on my system. Since this is my second hard disk on this machine, it will most likely be /dev/sdb. The first partition on that device will be /dev/sdb1, the second /dev/sdb2, and so on.
sidenote:
This naming system may seem obtuse, but it actually does make sense.
/dev is the folder for devices; sd means "scsi device" since scsi emulation is used for most drives now; and the b represents the fact that it is my second drive. my first one would be /dev/sda.
So, now that I have my list of mounted partitions, I look for one that makes sense under the above naming system, and find the mount point (the directory name) associated with it. It will probably be /media/something-or-other. Move your home folder over to that location using the previously mentioned methods. A smart person would make sure they had a backup before they did this.
Next, you'll want to change the place that it mounts at. At your terminal, type :
- Code: Select all
sudo nano /etc/fstab
and add something along these lines:
- Code: Select all
/dev/sdb1 /home <fstype> defaults 1 2
to the bottom of it. Save it, and the next time the system reads fstab, your new hard disk will be automatically mounted to /home. For more information about fstab and its structure, type
- Code: Select all
man fstab
at your terminal.
cp -a -v -u ... takes care of everything (permissions and all that ...)
yeah, I shouldve included the -v option, and -a is just an alias for -dpR.