This is possible and (at least theoretically) safe.
You will need to look closely at the partitions of both drives. This is something that must be done on a partition-by-partition basis, not a drive-by-drive basis.
First of all, create a rescue disk and make sure that you can boot into it.
Next, I would recommend finding out how to reinstall your bootloader; this is something that you will need to do after moving partitions around so it's probably easiest to do it first. For lilo this is as simple as typing
Now boot off the rescue disk; you can't create a reliable image of a partition if it's already mounted, and you get various problems if things like the active /sbin/ directory suddenly moves. So you don't want to do this on a live system.
Take a backup of your system, in case you delete something you shouldn't.
gnuparted would be a useful program here, as it lets you resize and copy partitions without deleting their contents. Use this rather than fdisk.
To create an image of a partition, you can use
cat /dev/device | bzip2 > image.bz2
You can then restore that image onto another partition of the same size using
bzcat image.bz2 > /dev/device
You can also copy files using
cp -dprx /path-from /path-to
Linux doesn't have any special immovable files like Windows does, so this will always work. It's a good way to copy a partition's contents to a bigger or smaller directory. The x
flag means to stay on one partition.
After changing the partitions around, you will need to update the /etc/fstab file to point to the new locations of each mount-point.
I would advice making a written plan of how you want to do this before you start in case you end up overwriting something you shouldn't.
You will probably have at least one swap partition; this can be safely deleted. You can create a new swap partition using