Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a hard drive in my laptop with a windows and an ubuntu partition. I got an SSD to replace my hard drive, but it has a slightly lower capacity. I've already partitioned the SSD to the sizes I want, and each partition on the new disk is larger than the amount of used space on my old hard drive.

I was going to use dd, but it appears that it requires partitions to be the same size.

How can I copy my old partitions onto my new ssd? I'm copying my boot partition too, so how can I make sure the new disk is bootable, and the new partitions are exactly the same as the old ones (but with less free space)?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Don't bother to partition SSD disk.

I would suggest to shrink the partitions on the old disk first to fit the size of the SSD, then dd old disk to new one

But make a backup first.

share|improve this answer

You can definitely use dd, as long as the data on the larger drive is notably smaller than the SSD and that no data exists in the area that is beyond the SSD's storage limits.

Just do a straight up dd sector by sector from the source drive to the SSD until the SSD is "full" and then use parted to fix up the incorrect partition table that says the SSD has larger geometry than it really does by "deleting" and "recreating" the truncated partition with the correct geometry (this doesn't delete data in that partition, it simply changes the start and end of that partition).

Alternatively, as already mentioned, use a tool like GParted to shrink down the partition to less than the size of the SSD, clone it over using either dd (it will have correct geometry and no risk of data loss this time) or Clonezilla (faster than dd because it only clones the occupied areas of the drive rather than everything - you still need to resize the partition down beforehand), and then resize the partition on the SSD up again afterwards to fill any empty space below the total capacity.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.