Here is a guide that I have posted often (the search button is very handy....)
# Clone a distro to another drive or move directories around
Install drive in box and ensure BIOS can detect it. Boot into Linux and login to your user's account. Open an x terminal and partition and format the new drive as you wish
Code:
[fancy@tinwhistle fancy]$ su -
Password:
[root@tinwhistle root]# fdisk /dev/hdb
Exit with
w to write the partition table.
Format the partitions with the chosen filesystems:
mke2fs /dev/hdbX -> ext2
mke2fs -j /dev/hdbX -> ext3
mkswap /dev/hdbX -> swap
mkreiserfs /dev/hdbX -> reiserfs
mkfs.xfs /dev/hdbX -> xfs
Make directories for source and destination mount points. You need these to keep out of an endless loop of copying itsself over and over.
Code:
[root@tinwhistle root]# mkdir /mnt/source
[root@tinwhistle root]# mkdir /mnt/destination
Mount your os partitions that you want to clone on /mnt/source
Mount your partitions on the new drive, making directory entries for your separate partitions (/boot, /home, /var etc.). If you are just copying a directory such as var, just cd to the directory you wish to copy instead of mounting partitions on /mnt/source.
Now, cd to /mnt/source and pipe it over with tar
Code:
[root@tinwhistle root]# cd /mnt/source
[root@tinwhistle source]# tar cf - . | (cd /mnt/destination && tar xBfp -)
Edit /etc/fstab as needed, install the boot loader if you moved a whole distro, and it should work when it is installed in it's final position.