2

My current hard drive has an 80 GB NTFS partition running Windows (/dev/sda1) in addition to several Linux partitions. I purchased a new hard drive and want to move my Windows 8 partition to a new NTFS partition (/dev/sdb1) where size(/dev/sdb1) >= size(/dev/sda1). Are there any pitfalls to simply running this dd command from within my Linux distribution running on /dev/sda2?

dd if=/dev/sda1 of=/dev/sdb1 bs=32M

Details

  1. My Windows partition isn't currently mounted in Linux
  2. I don't need to fix the MBR, because when I reinstall Linux on the new drive, GRUB2 will overwrite it anyway.
  3. I know there are other options for performing this, like Clonezille, GParted, Acronis, Norton Ghost, Drive Image XML, ntfsclone, etc. but a single command seems the simplest and dd is highly versatile.

1 Answers1

2

it looks like you have considered the problems I would have (size, MBR, etc) so I'd say you are fine to proceed. the only caution I give is they call DD 'Destroy Disk' for a reason. it is most unforgiving and quite capable of trashing your system beyond recognition. just make sure to triple check your disk file names (/dev/sdaX) and your syntax just to make sure.

Frank Thomas
  • 35,097
  • 3
  • 77
  • 98
  • Good advice. Frankly, if this Windows partition were to be trashed, it would not be a problem since I use it about once a year, but copying the partition requires less effort than reinstalling the system. – Ricardo Altamirano Feb 20 '13 at 21:29
  • 1
    Even if you do mess it up, if you can still boot from the old windows partition, do so (with the new/broken partition accessible to it), and use either the windows installer recovery console (http://superuser.com/questions/450689/how-do-i-fix-my-mbr) or EasyBCD (http://neosmart.net/EasyBCD/) to try and fix issues with the GPT or windows' final-stage bootloader. Both take a lot less time and headache than a full reinstall. – Zac B Feb 20 '13 at 21:57