External HDD – Using the dd Command on External Hard Drive with Partitions

ddexternal-hdd

I want to write a .raw file to the first partition of my external drive. I tried:
dd if=file of=/dev/sdb3 but it didn't give me a bootable drive since the correct command should had been: dd if=file of=/dev/sdb.

My question is would this command destroy data on the other two partitions that I have on the drive, or only on the first partition?

Best Answer

  1. It would destroy the partition table, since that's stored at the beginning of the drive.

  2. It would destroy as much drive contents as the size of the image itself. If it is large enough to reach into the second or third partitions then it will destroy those.

  3. MEMDISK will allow you to leave it as an image and boot it directly.

Related Question