Need help cloning Linux hard drive

I was referred to Clonezilla in an attempt to clone a Linux hard drive to a new hard drive. I must say it worked quite well with one exception (and it did state it). The inability to resize volumes. I have one volume on the source that is 221GB. It is the "data" volume and only has 30-40 files and takes up 40MB. It does not need to be anywhere near that large. It is a 250GB SATA hard drive. I want to clone it to a 160GB SSD and I have every volume cloned with the exception of that one.

   My guess it that I could create the volume on the SSD and copy the files from the source to this smaller destination volume but I am at a loss on how to do it. I am not a Linux head. I need to do it with some kind of boot CD. I have both drives on-line at the same time but need some help creating the volume and copying the files to it from the source volume.
LVL 11
Who is Participating?
Garry GlendownConsulting and Network/Security SpecialistCommented:
Does the volume you want to reduce have system files on it? That is, will the cloned system boot without it? If so, just copy the rest of the system, leave out that one drive, boot the cloned system. Then create a small partition (or maybe leave it on the main drive without a separate partition) and manually mount the old drive's partition. Then copy the old content to the new partition/directory and you're done ...

e.g., if the drive was mount at "/data", make sure you have the mount point and create the partition with fdisk or a Linux graphical tool (depends on your distribution), or leave it as just a directory. If it's a directory, mount the new partition ("mount /dev/sda5 /data", with the correct device/partition)
Then mount the old partition, e.g. "mount /dev/sdb5 /mnt" (again enter the correct device/partition of course), and copy the content:
cd /mnt
tar cf - . | ( cd /data ; tar xvf - )

Open in new window

If you created the new partition manually, you may need to update/correct the file /etc/fstab ...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.