Cloning Partitions via Terminal
I've been mucking about with asr, diskutil, and dd but I haven't been able to solve this question that I have.
Lets say we have this:
#: TYPE NAME SIZE IDENTIFIER
0:GUID_partition_scheme *751.3 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 750.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
I figured out how to clone the normal boot volume (via .dmg), but how could I directly clone disk0s3 onto disk1s3? Is this even possible?
Note: I understand I can do this all with dd, BUT it takes forever and ever.
If you do it with dd you'll also have problems if the partitions are a different size. You should be able to grow the partition later, but shrinking it is a no-go.
It doesn't look like the CLI diskutil supports the restore command found in the Disk Utility GUI. Does this need to be a command line solution?
Try adding a reasonable blocksize to your dd:
dd if=/dev/disk0s3 of=/dev/disk1s3 bs=1M
thanks besson and mduell
I used $ asr restore -source /dev/disk0s2 -target /dev/disk1s2 -erase -verbose
and for some reason it added the recovery hd as well (if its obvious to someone else why this happened, you clearly understand how much of a novice I am)
However, if you have lets say (bootcamp):
Type: Microsoft Basic Data
Name: Name of Bootcamp Partition
Size: GBs on GBs
How could I:
find the exact size of disk0s4 and could i then use asr to restore it on disk1s4 if its the same size partition?
Also, even if I could speed up dd, is there a way for it to ignore writing blank/unused space onto the target drive?
I'm just trying to learn unix.
|All times are GMT -4. The time now is 04:13 PM.||
Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2014, vBulletin Solutions, Inc.