We had a Clonezilla image that was too large and so I was testing out different possible methods for cramming that too-large disc image (500 GB) onto a smaller drive (150 GB). I tried just shrinking the partition on the original drive (down to 65 GB), but since the images we create a disc images this had no impact.
I found this article which, while attempting to explain how to cram a larger drive onto a smaller, also includes a screen shot of Clonezilla where Clonezilla tells us it cannot do so.
I tried anyway and it failed same as before. Maybe there is a way to do this (without hacking the files within the image as this clever thread discusses) but I didn’t find it in there.
Instead I opted to try using dd to copy the disc directly from large to small and let it fail when the small drive runs out of space. In theory this ought to work since the partition table, both of the partitions Windows creates, and all of files are located at the front of the drive.
It’s running now; I’ll add more later.
It works brilliantly. Just make certain your partition is significantly smaller than the available space on the destination drive so as to ensure all important data will fit before the copying of the large drive fails. (In my example the 500 GB drive contained a 65 GB partition which was much smaller than the 150 GB destination drive.)
On that note, here is some information on using dd to make such a copy. If you are going from same or small to same or large this will definitely work (and would be much faster than using Clonezilla as an intermediary).
sudo dd if=/dev/sda of=/dev/sdb bs=1M
In this case my source and destination were drives a and b respectively. The bs=1M is a lovely addition which will slightly speed up the process according to the below linked thread.
I used GParted to help figure out which were the source and destination drives. Be very careful. If you run dd in the wrong direction you have just copied empty space over what you intended to copy. I have done this; it sucks.
In doing my research I also came across this thread which contained some other useful possible solutions to the matter.
He includes my above mentioned use of dd but he also mentions using cat which I will echo here for your entertainment and edification.
sudo cat /dev/sda > /dev/sdb
This would basically take as input anything (in order) on a and output it to b. Again, this seems like a plausible solution for going from a larger to a smaller drive.
If I’m able to make a test I’ll add more information.
I tried using cat but I received permissions errors (including using sudo) and I gave up and used dd instead. I was running an Ubuntu 10.04 live CD so that may have contributed (but I’ve never seen sudo receive a permissions error using the live CD previously). Also, both drives were unmounted (though this is usually what is desired in a case like this).
If you are copying a Windows drive there is another recommended step. After you have copied your drive (using dd) you may want to run chkdsk. If it runs automatically, great. If not, boot into Windows and run this command to tell chkdsk to run on the next boot cycle. (In this example c represents your Windows drive.)
chkdsk c: /r
Sorry not to have anything more definitive than the dd solution (which is pretty good). If you have a vetted solution feel free to post it in the comments.