How do I clone a larger disk to a smaller disk using clonezilla?
Solution 1
The error appears to stem from the use of GPT partitions. The workaround is to use the manual creation of partition table option from clonezilla. The commands needed are HERE:
sgdisk /dev/sdX -R /dev/sdY
where:
sdX = Disk A
sdY = Disk B
Note the order of the disks or else you will have a problem: GPT table recovery.
Solution 2
My solution is the same as JackeJR but I like to elaborate my case.
I have tried a disc to disc clone from a 930GiB HDD (source drive) with a GPT partition table to 890GiB SSD (destination). Please note I am a Linux user and I have a dual boot with windows 10. I have tried to left unchanged all the partitions and to reduce slightly the size of my data partition only.
- With gparted, I resized the bigger data partition in order to have an overall size that fits the destination SSD, and moved all free space at the end
- I used clonezilla-Live from USB pen, with advanced mode and
-icds
enabled.
It failed. It looks like Clonezilla fails, at start, to clone the partition table to the destination disk because it wrongly uses sfdisk utility that is for older partition types instead of sgdisk utils. My solution:
- The same as previous (overall size must fit)
-
I manually copied the partition from one drive to another, using Clonezilla shell with
sgdisk
(only for GPT partitions):sgdisk /dev/sdSourceDeviceName -R /dev/sdDestinationDeviceName
Performed Clonezilla disc-to-disc clone, selecting the option
-icds
: Skip checking destination size before creating partition table, and then the option-k
: Do NOT create partition table on boot sector on target machine. (In this case Clonezilla uses the destination partitions as they are, and resizes partitions when sizes are smaller, in order to fit, it performs a good "best effort").
It worked. I obtained all the partitions the same size as source (Yes I only reduced the bigger partition a bit). Dual boot with windows keeps working well.
Related videos on Youtube
Comments
-
R J almost 2 years
I have a larger disk
Disk A
and a smaller diskDisk B
.Disk A
contains a few partitions but the total size of all the partitions is smaller than the capacity ofDisk B
.Disk A
is a GPT formatted disk.
I tried using clonezilla (ubuntu, precise pangolin version) in expert mode and selected the
icds
option but on starting the cloning process, it always errors out with an error indicating that it is unable to create the partitions.Is there any way to make this work?
-
Pablo A almost 5 yearsBeware where you put the
-R
(--replicate
), Counterintuitively the OP use command -R target source (my suggestion was rejected)