1

I have 1 TB HDD, and a new 250 GB SSD.

The HDD has these partitions:

  • 499 MB (EFI)
  • 256 GB (Boot, Page File) - Only 120 GB of this partition is used. the rest is free.
  • 499 MB (Recovery Partition)
  • 736 GB (Primary Partition)

I only want the EFI+Boot+Recovery to be copied to the SSD. The SSD has 238 GB usable space.

How can I accomplish this with dd? I'm planning to boot up a Ubuntu live image and used dd to copy. The size of the SSD is less than the 3 partitions in size. But the partitions only hold 121 GB of actual data.

I only want to accomplish this with Ubuntu tools. I've already googled this a lot, I don't want to use Windows software to do this and I don't want to use Clonezilla.

Shayan
  • 1,524

2 Answers2

1

For the EFI and Recovery partitions, you can use dd in a straight forward way: Create the partitions on the new SSD with exactly the same size, then use dd if=/dev/sdXN of=/dev/sdYN bs=2M with X being the old disk, Y the new disk and N the partition number.

Things are different with the root partition: dd has no concept of free space or used space - so it is the wrong tool to copy a 256 GB partition into a smaller one. This gives you 2 possibilities:

  • Create a new partition with a new file system on the SSD and then copy the data on the file level
  • Temporarily reduce the size of the boot partition to fit on the new disk, then use dd to copy it over.

In addition to that: I recommend you reevaluate using clonezilla - it does what you need in an automated and battle-proven way.

Eugen Rieck
  • 20,271
0

gparted live ile boot ettiğiniz sistemde büyük boyutlu partisyonu yeniden boyutlandırma ile küçültme yapın. "https://gparted.org/livecd.php" Böylece kaynak sürücünüzü nisbeten küçük boyutlu ssd sürücünüze uygun boyuta getirerek kopyalama için hazırlamış olursunuz.