|
|
Cloning Partitions via Terminal
|
|
|
|
Mac Elite
Join Date: Dec 2002
Location: Bay Area of San Jose
Status:
Offline
|
|
Hello All!
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:
//
/dev/disk0
#: 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.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
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?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
Try adding a reasonable blocksize to your dd:
dd if=/dev/disk0s3 of=/dev/disk1s3 bs=1M
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2002
Location: Bay Area of San Jose
Status:
Offline
|
|
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
IDENT: disk0s4
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.
(
Last edited by Dex13; Aug 23, 2013 at 04:25 PM.
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|