Search code examples
linuxcopyclonedd

Hard drive clone using dd


I have two hard drives:

sda ST3500...blabla (doesn't matter) and sdb WD...blabla. I want to clone sda to sdb using dd.

I ran:

dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror,sync.

The problem is that dd also clones the label of sda (ST3500...) onto sdb. While booting SUSE from sdb it searches for WD... and fails to boot. Is there a way to clone a whole drive with dd and maintaining the target drive label/model information?


Solution

  • The label is in the filesystem, not in the hard drive. It can be modified by filesystem tools such as tune2fs -L for ext2/3/4 filesystems. Simply modify the label after cloning.