Because running out of space on a MacBook Pro 13'' 2009 (type A1278), I cloned its 160 GB Hitachi drive to a 1 TB Seagate HDD. The MacBook is installed with OS X El Capitan (10.11).
Summary: The cloned OS starts, login possible, new volume size not detected, disk utility crashes when trying to access the partitioning tool.
First steps done:
- Cloned the whole drive (low level)
- Activated the root user in the System Preferences
- Connected the cloned drive to a MacBook running OS X Lion 10.7.5
- Deleted the recovery partition to allow expanding the main partition.
- Tried to expand the main partition using first the native disk utility, and then Stellar Partition Manager. No success with both.
Expanding the partition from the Terminal:
I expanded the partition from the terminal, inspiring myself from this tutorial and its comments http://blog.kyodium.net/2010/11/increase-disk-and-partition-size-in.html:
- Switched to root user with the
- Listed the drives with
- Unmounted the "Macintosh HD" partition of the original drive:
diskutil unmount /dev/disk1and cloned drive
diskutil unmount /dev/disk2
- Showed the partition scheme of the original drive:
gpt show /dev/disk1
- Deleted the partition scheme on the cloned drive:
gpt destroy /dev/disk2
- Created a new partition scheme on the cloned drive:
gpt create -f /dev/disk2
- Created again the same partitions, but with increased size for the "Macintosh HD" one and the Recovery partition moved 800 MB before the end of the hard drive:
gpt add -b <start> -s <size> -t <GUID_from_disk1> /dev/disk2
- Checked everything by repeating step 3 and using
gpt show ...on both drives.
- Cloned the recovery partition
dd if=/dev/disk1s3 of=/dev/disk2s3
- Repeated step 8.
- The "Macintosh HD" partition from the cloned drive shows with the correct size around 800 GB when externally attached to the MacBook running Lion 10.7.5.
- When the hard drive is inserted into the original MacBook, the OS starts correctly and allows to login. (I had to perform some verification and minor repair of the "Macintosh HD" volume on the MacBook running Lion for the OS to completely load.)
- The disk utily for Mac OS X 10.11 El Capitain still sees the wrong size of 160 GB for the "Macintosh HD" Volume and when clicking on the "Partition" button, the disk utility crashes. The MacBook still displays the message that the start disk is full.
When creating the partitions at step 6, was it an error keeping the GUID of the original drive with the
Here are the hard drives and partitions as seen from the terminal:
sh-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *160.0 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS Senza titolo 159.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *160.0 GB disk1 1: EFI 209.7 MB disk1s1 2: Apple_HFS Macintosh HD 159.2 GB disk1s2 3: Apple_Boot Recovery HD 650.0 MB disk1s3 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk2 1: EFI 209.7 MB disk2s1 2: Apple_HFS Macintosh HD 815.8 GB disk2s2 3: Apple_Boot Recovery HD 650.0 MB disk2s3 sh-3.2# diskutil cs list No CoreStorage logical volume groups found sh-3.2# diskutil unmount /dev/disk1s2 Volume Macintosh HD on disk1s2 unmounted sh-3.2# diskutil unmount /dev/disk2s2 Volume Macintosh HD on disk2s2 unmounted sh-3.2# gpt show /dev/disk1 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 310902592 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 311312232 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC 312581768 7 312581775 32 Sec GPT table 312581807 1 Sec GPT header sh-3.2# gpt show /dev/disk2 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 1593425880 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 1593835520 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC 1595105056 358420079 1953525135 32 Sec GPT table 1953525167 1 Sec GPT header sh-3.2#