InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   New Hard Drive (http://infinitemac.com/showthread.php?t=4973)

gp-se 12-17-2009 01:24 AM

New Hard Drive
 
Hey guys, I got a new hard drive, can I clone my current hard drive to the new one? will it clone everything including bootloader\hidden EFI partition?
I'm running: Snow Leopard 10.6.2
Chameleon RC3
thanks guys

LawlessPPC 01-17-2010 03:41 PM

if you use a utiltiy like hdclone then yes this a sector for sector copy

Imkantus 01-17-2010 08:14 PM

You can also create a partition on the new HD and copy the content using the Disk Utility but this will force you to install your prefered bootloader on the new HD again.

If you want to clone the hole partition table, I would just use dd. :)

srs5694 01-18-2010 01:39 AM

Using dd (or any other byte-for-byte exact copy) has several drawbacks:

  • If the taget disk is smaller than the original, one or more partitions will be truncated, which will be a serious problem. This will also lose the backup partition tables if you use a GUID Partition Table (GPT) partitioning scheme.
  • If the target disk is larger than the original and you use a GPT scheme, the backup GPT data structures will be copied to the wrong location. I don't know offhand how Mac OS deals with this, but it could be bad. This problem can be corrected by at least some disk partitioning tools. Until the problem is corrected, you might not be able to create new partitions to use the extra space.
  • A low-level dd copy will recreate the current partitions' sizes and positions exactly. If you want to resize any partition, you'll have to do this after the fact, and possibly move partitions to make room. Such actions are both risky and time-consuming.
  • The GUIDs of the disk itself and the partitions (in GPT), as well as the filesystems (in both GPT and MBR) will be duplicated on the copy. This may be OK if you intend to wipe the original disk clean and start fresh with it, or move it to another computer; however, if you intend to re-use the original disk on the same computer, duplicate GUIDs could cause problems. I've not studied how Mac OS reacts to this situation, though, so I don't know how serious a problem this would be in practice. I recommend completely wiping the GPT or MBR data structures and starting again if you go this route.
  • A whole-disk byte-for-byte copy is likely to take longer than a filesystem copy using Disk Utility or something similar. The extent of this difference will depend on the utility in question and how full the disk is.


Overall, IMHO it's better to use Disk Utility, Carbon Copy Cloner, or something similar to move a system from one hard disk to another. I've done precisely this with Carbon Copy Cloner many times. These utilities can not be relied upon to copy the boot loader from the original disk's MBR to the new disk's MBR, though. For that, either use dd or be prepared to boot using the boot loader on the new disk or an emergency optical disc to boot the system and then re-install your boot loader. To use dd, the following command should work, assuming the original disk is /dev/disk0 and the new disk is /dev/disk1:

Code:

dd if=/dev/disk0 of=/dev/disk1 bs=440 count=1
Be sure to get the disk devices right! If you don't, you'll end up wiping out the boot loader on the old disk rather than copy it to the new disk! This command copies just 440 bytes, so it will complete very quickly, compared to a whole-disk copy (omitting the bs and count parameters).