Copying partitions from a larger hard disk to a smaller one

Copy MBR and Partition table using dd

This will create the exact partition layout from disk1 to disk2
$sudo dd if=/dev/sda of=/dev/sdb count=1 bs=512

Better way to copy MBR and the partition table

sfdisk -d /dev/sda | sfdisk --force /dev/sdb

Copying actual partitions

There are two required partitions on the source partition:
$sudo dd if=/dev/sda1 of=/dev/sdb1 conv=notrunc,noerror
$sudo dd if=/dev/sda2 of=/dev/sdb2 conf=notrunc,noerror

2 thoughts on “Copying partitions from a larger hard disk to a smaller one”

Leave a Reply

Your email address will not be published. Required fields are marked *