Note - Follow instructions at your own peril! I'm confident they will work, but I don't want to be responsible for losing all your stuff
As someone who has
/home on a dedicated partition (but not hard drive) I can say its possible, although it's much easier to do with the ubuntu installer when you first install ubuntu.
However, if you need to do this without reinstalling ubuntu I would say it's best to put a small linux OS or livecd (I recommend Puppy Linux due to its small size) onto a USB stick or CD and use that to adjust your Hard Disk setup and
/etc/fstab file, which contains the list of which partitions and Hard Drives hold which folders. I'll continue assuming you use puppy linux to do this, but the steps are easy to follow if you use - for example - an ubuntu livecd.
Once puppy linux is installed (use unetbootin to do this if you are using a USB stick) first need to use Gparted (the graphical partition editor included with puppy linux) to ensure the new hard drive is formatted correctly. It isn't crucial, but it is helpful to use the same filesystem across the two hard drives. I would also suggest you create a partition for
/tmp and a partition for
/home. The reasoning for this will become clear.
Once you have these partitions created you need to mount the HDD containing the Ubuntu installation, and copy the contents of the
home folder to the partition you have created for it. There shouldn't be anything in
Next, open the file
etc/fstab for text editing.
Note - ensure you open the file within the ubuntu drive, otherwise you'll be editing the mount details for the livecd/puppy linux
The layout of the
fstab file is like this:
(The tabs weren't rendered so I put where they go in square brackets. They aren't strictly necessary but they make the file a hell of a lot easier to read)
append this line twice, once for the
home directory, and once for
tmp. Ensure that the
ext4 line is changed to match the filesystem used by the partition, and that the
unique-partition-id field is changed to match the UUID of the partition. that value can be found in gparted (or the ubuntu disk management utility on a livecd).
Delete the contents of the original home directory - ensuring all files copied across - then save the changes to
etc/fstab and restart.