I've got a MacBook5,1, and I replaced the CD drive with a SSD. Then, I made a "DIY fusion drive". Before doing it, I was using the regular setup, with Boot Camp. Then I put the SSD and made the Fusion drive, and restore a Time Machine backup, so I didn't modify the wWindows partition. I was using that for more than a year.
Last week my "regular" HD started to fail (remember, it has a small partition for Windows and a big one as Macintosh HD), so I bought a new one with the same size of 1 TB.
I put both disks on sata connectors inside a desktop computer and i cloned it with acronis true image. Against all odds and after 5 hours, i put the new drive inside the macbook, and after 15 minutes filling the bar (I guess it was repairing something caused by the malfunctioning old HD), it finally booted. And it works perfectly, now I'm using it.
But today I realised that I can not boot on Windows. The partition is still there, but I can not boot when pressing option key on the startup. I can remember something about a maximum of 4 partitions in the disk due to MBR limits (or is it GPT? actually I never remember which are one or the other…), that's the reason why I think I haven't got a recovery partition. But now the disk have 5 partitions, and one of them which is new to me: the "Microsoft reserved".
Is there any way to recover it without losing Windows data? I was reading a post about something similar in this forum, but that guy hadn't got the DIY FD, and anyway I could't install gptfdisk because of a popt.h missing error…
Maybe this is useful:
diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 127.7 GB disk0s2
3: Apple_Boot Boot OS X 134.2 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk1
1: Microsoft Reserved 134.2 MB disk1s1
2: EFI EFI 209.7 MB disk1s2
3: Apple_CoreStorage 897.0 GB disk1s3
4: Apple_Boot Recovery HD 650.1 MB disk1s4
5: Microsoft Basic Data Windows HD 102.0 GB disk1s5
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh FD *1.0 TB disk2
Logical Volume on disk0s2, disk1s3
CF615BFD-DE74-4DB6-9048-DDD0C370D6DB
Unencrypted Fusion Drive
Answer @davidanderson:
I did the copy using Acronis for Windows.
sh-3.2# mount
/dev/disk2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk1s5 on /Volumes/Windows HD (fusefs_txantfs, local, synchronous)
localhost:/zzw3xSzLWDmPOMfw7vG9UG on /Volumes/MobileBackups (mtmfs, nosuid, read-only, nobrowse)
sh-3.2# sudo gpt -r show /dev/disk1
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 262144 1 GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE
262178 2014
264192 409600 2 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
673792 1751953408 3 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
1752627200 1269760 4 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1753896960 409600
1754306560 199217152 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
1953523712 1423
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
sh-3.2# sudo fdisk /dev/disk1
Disk: /dev/disk1 geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 0 0 2 - 1023 254 63 [ 1 - 1953525167] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
sh-3.2# sudo dd if=/dev/disk1 count=1 | xxd
1+0 records in
1+0 records out
512 bytes transferred in 0.000182 secs (2814526 bytes/sec)
0000000: 33c0 8ed0 bc00 7c8e c08e d8be 007c bf00 3.....|......|..
0000010: 06b9 0002 fcf3 a450 681c 06cb fbb9 0400 .......Ph.......
0000020: bdbe 0780 7e00 007c 0b0f 850e 0183 c510 ....~..|........
0000030: e2f1 cd18 8856 0055 c646 1105 c646 1000 .....V.U.F...F..
0000040: b441 bbaa 55cd 135d 720f 81fb 55aa 7509 .A..U..]r...U.u.
0000050: f7c1 0100 7403 fe46 1066 6080 7e10 0074 ....t..F.f`.~..t
0000060: 2666 6800 0000 0066 ff76 0868 0000 6800 &fh....f.v.h..h.
0000070: 7c68 0100 6810 00b4 428a 5600 8bf4 cd13 |h..h...B.V.....
0000080: 9f83 c410 9eeb 14b8 0102 bb00 7c8a 5600 ............|.V.
0000090: 8a76 018a 4e02 8a6e 03cd 1366 6173 1cfe .v..N..n...fas..
00000a0: 4e11 750c 807e 0080 0f84 8a00 b280 eb84 N.u..~..........
00000b0: 5532 e48a 5600 cd13 5deb 9e81 3efe 7d55 U2..V...]...>.}U
00000c0: aa75 6eff 7600 e88d 0075 17fa b0d1 e664 .un.v....u.....d
00000d0: e883 00b0 dfe6 60e8 7c00 b0ff e664 e875 ......`.|....d.u
00000e0: 00fb b800 bbcd 1a66 23c0 753b 6681 fb54 .......f#.u;f..T
00000f0: 4350 4175 3281 f902 0172 2c66 6807 bb00 CPAu2....r,fh...
0000100: 0066 6800 0200 0066 6808 0000 0066 5366 .fh....fh....fSf
0000110: 5366 5566 6800 0000 0066 6800 7c00 0066 SfUfh....fh.|..f
0000120: 6168 0000 07cd 1a5a 32f6 ea00 7c00 00cd ah.....Z2...|...
0000130: 18a0 b707 eb08 a0b6 07eb 03a0 b507 32e4 ..............2.
0000140: 0500 078b f0ac 3c00 7409 bb07 00b4 0ecd ......<.t.......
0000150: 10eb f2f4 ebfd 2bc9 e464 eb00 2402 e0f8 ......+..d..$...
0000160: 2402 c349 6e76 616c 6964 2070 6172 7469 $..Invalid parti
0000170: 7469 6f6e 2074 6162 6c65 0045 7272 6f72 tion table.Error
0000180: 206c 6f61 6469 6e67 206f 7065 7261 7469 loading operati
0000190: 6e67 2073 7973 7465 6d00 4d69 7373 696e ng system.Missin
00001a0: 6720 6f70 6572 6174 696e 6720 7379 7374 g operating syst
00001b0: 656d 0000 0063 7b9a 4803 555d 0000 0000 em...c{.H.U]....
00001c0: 0200 eefe ffff 0100 0000 af6d 7074 0000 ...........mpt..
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
sh-3.2# sudo gpt -r show /dev/disk0
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 249397856 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
249807496 262144 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
250069640 7
250069647 32 Sec GPT table
250069679 1 Sec GPT header
sh-3.2# sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 15566/255/63 [250069680 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 250069679] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
sh-3.2# sudo dd if=/dev/disk0 count=1 | xxd
1+0 records in
1+0 records out
0000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
512 bytes transferred in 0.000313 secs (1635555 bytes/sec)
00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 00fe ................
00001c0: ffff eefe ffff 0100 0000 afc2 e70e 0000 ................
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
sh-3.2# diskutil info disk1s1
Device Identifier: disk1s1
Device Node: /dev/disk1s1
Part of Whole: disk1
Device / Media Name: Untitled 1
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Partition Type: Microsoft Reserved
OS Can Be Installed: No
Media Type: Generic
Protocol: SATA
SMART Status: Verified
Disk / Partition UUID: 4DE8F5CA-515E-471A-8176-28E3ADC70B13
Total Size: 134.2 MB (134217728 Bytes) (exactly 262144 512-Byte-Units)
Volume Free Space: Not applicable (no file system)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Ejectable: No
Whole: No
Internal: Yes
Solid State: No
sh-3.2# ls -l "/Volumes/Windows HD/Boot/BCD"
-rwxrwxrwx 1 _unknown _unknown 28672 Apr 28 01:37 /Volumes/Windows HD/Boot/BCD
Best Answer
I can see two problems.
I will show how to fix the first problem.
Paste the following code in to the window.
Click the "Run" button. The script should prompt you for your login password. When the script finishes, you should get the following pop up window.
Quit the Script Editor and enter the following command at a Terminal window.
The result should be the same as shown below.
If everything worked out, you can quit the Terminal application and try booting Windows. If Windows still will not boot, let me know and we can try to fix the second problem.
Expanation
There are two partition schemes that are important here. They are the Master Boot Record (MBR) partitioning scheme and the Globally Unique Identifier (GUID) partitioning scheme. The MBR scheme contains a MBR Partition Table which allows for the definition of only 4 partitions. The GUID scheme contains the same 4 entry MBR Partition Table and a GUID Partition Table (GPT) whose length is determined at time of creation. This value is typically much larger than 4 entries.
When a disk is partitioned using the GUID scheme, only the first entry is used in the MBR table. On your, disk this table contained the following data.
The id of EE indicates the disk is GUID partitioned and the GPT should be used to determine partitioning. The next six columes (Starting/Ending cyl/hd/sec) exist for legacy purposes. Experience has taught me that on Mac computers, it does not matter what values are in these six columns. In your case, the first three contain the lowest possible valid values and the next three contain the highest possible valid values. What is important is the start and size columns. Your disk is divided into 1953525168 sectors where each sector is 512 bytes. The first sector is numbered 0 and contains the MBR which also contains the MBR table. The partition with the EE id is defined to cover the rest of the disk. This gives older legacy partitioning software the impression all space has been allocated on the disk. This is why you will see the phrase Protective Master Boot Record (PMBR) in other documentation.
Below is a partial list of the contents of the GPT on your disk.
Each table entry is 128 bytes long. Since the table occupies 32 sectors, one can compute the table can hold around 32 * 512 / 128 = 128 entries. (Actually, 128 is the default according to the man page documentation.) Note, there is a backup table/header at the end of the disk. The GUID's correspond to the following types of partitions.
Normally, the Disk Utility application hides the EFI and Apple_Boot partitions. The Microsoft Reserved partition does not belong and should be removed. The EFI partition usually occurs first. It is not used to boot the OS X operating system, but is required by OS X for other uses. The Apple_CoreStorage partition contains most of your OS X "Macintosh FD" volume. The Apple_Boot partition (I believe) contains your "Bootable Recovery Partition". The software, contained in this partition, is the replacement for the recovery software that was on the installation DVD. Finally, Microsoft Basic Data partition contains your Windows volume.
On your Mac, Windows requires a MBR scheme which is a conflict since OS X uses a GUID scheme. The following changes were necessary to the MBR partition table to fool Windows in to thinking your computer is using a MBR scheme.
When corrected the MBR partition table should appear as follows.
The command that was used to make the changes to this table on your disk is called
fdisk
. The values for the Starting/Ending cyl/hd/sec where chosen by the command. Other than flagging partition 4 as active, the script you ran only entered the id, start and size values.To be more precise, the exact command was
sudo fdisk -e /dev/disk1
. The interactive commands wereedit
,flag
andquit
. A description offdisk
can be found at this OS X Man Page. (Or by typingman fdisk
in a Terminal window.)