0

First of all, sorry for any English mistakes or print screen in French... I'm Belgian.

I've had a lot of problems with an iMac 2009 27", mostly with Mac OS. Strangely, Windows (10) works with little to no issue, so I finally decided to run this computer Windows-only. Well... Honestly, I even tried to install Ubuntu, but quickly abandonned.

My abandon of Mac OS led me to a repartitionning of the drive... I kept the Mac OS drive, the bootcamp one, created a shared partition, and (just in case, but I'd like to delete them) two partitions for Linux (OS and Swap).

After that... Windows refused to boot. I managed to find a solution by "repairing" the MBR (or GPT?). Windows boots, but I'm not sure I did everything perfectly.

My big problem now is that I'd like to acess my Share partition. I can, from Mac OS. But from windows, all my other partitions show as "GPT protective partition". And there seems to be nothing I can do.

enter image description here

I'd like to be able to access this Share partition. Even better, I'd like to merge this Share partition with both Linux partition. But I don't want to lose data or screw my MBR/GPT again.

I'm currently on Windows... I'll boot on Mac OS when my computer gets cold (it doesn't boot mac os when warm, that's my main problem), and give you any additional required information.

In advance, thanks for you help!

More informations, that you would probably ask:

iMac-de-Antoine:~ antoine$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data LINUXOS                 32.0 GB    disk0s4
   5:       Microsoft Basic Data SWAP                    5.0 GB     disk0s5
   6:       Microsoft Basic Data DATA                    320.9 GB   disk0s6
   7:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s7



iMac-de-Antoine:~ antoine$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 1.0.1

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.



Command (? for help): i
Partition number (1-7): 7
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: A45E8584-415A-4B66-9E37-1FAA60981CC3
First sector: 1678133248 (at 800.2 GiB)
Last sector: 1953523711 (at 931.5 GiB)
Partition size: 275390464 sectors (131.3 GiB)
Attribute flags: 0000000000000000
Partition name: 'BOOTCAMP'



Command (? for help): i  
Partition number (1-7): 6
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: BEE4F0DE-2837-4C06-877F-3ADB72B1D173
First sector: 1051031584 (at 501.2 GiB)
Last sector: 1677871103 (at 800.1 GiB)
Partition size: 626839520 sectors (298.9 GiB)
Attribute flags: 0000000000000000
Partition name: 'DOS_FAT_32_Untitled_5'



Command (? for help): p
Disk /dev/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00002E14-03EA-0000-EA68-000054300000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 787861 sectors (384.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI system partition
   2          409640       976972135   465.7 GiB   AF00  Customer
   3       976972136       978241671   619.9 MiB   AB00  Recovery HD
   4       978241672      1040741671   29.8 GiB    0700  DOS_FAT_32_Untitled_4
   5      1041003816      1050769439   4.7 GiB     0700  DOS_FAT_32_Untitled_3
   6      1051031584      1677871103   298.9 GiB   0700  DOS_FAT_32_Untitled_5
   7      1678133248      1953523711   131.3 GiB   0700  BOOTCAMP

More informations:

iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
gpt show: error: bogus map
gpt show: unable to open device '/dev/disk0': Undefined error: 0
iMac-de-Antoine:~ antoine$ 


iMac-de-Antoine:~ antoine$ sudo fdisk /dev/disk0
Disk: /dev/disk0    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 - 1678133247] <Unknown ID>
*2: 01 1023 254  63 - 1023 254  63 [1678133248 -  274468864] DOS FAT-12  
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     

I can clearly understand I messed up... But don't know what to do to repair. =/

NEW, after messing up again with partitions:

iMac-de-Antoine:~ antoine$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5


iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
Password:
gpt show: /dev/disk0: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640   976562496      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   976972136     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
   978241672   699629432      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1677871104      262144         
  1678133248   275390464      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header


iMac-de-Antoine:~ antoine$ sudo fdisk /dev/disk0
Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [ 976972136 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] HPFS/QNX/AUX

New informations 05-08-16: @david

Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>
 2: AF   25 127  15 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: 0B 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] Win95 FAT-32
*4: 07 1023 254  63 - 1023 254  63 [1678133248 -  275390464] HPFS/QNX/AUX



Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>
 2: AF   25 127  15 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: 0B 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] Win95 FAT-32
*4: 07 1023 254  63 - 1023 254  63 [1678133248 -  275390464] HPFS/QNX/AUX
iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640   976562496      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   976972136     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
   978241672   699629432      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1677871104      262144         
  1678133248   275390464      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header



/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5



iMac-de-Antoine:~ antoine$ diskutil list /dev/disk0s4
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5
9
  • The screenshot doesn't help much because neither the share nor the Linux partitions are really visible. Boot to OS X and enter sudo gpt -r show /dev/disk0 in Terminal or install a decent partitioning tool in Windows (hmm gdisk for Windows should work) and post the result.
    – klanomath
    Apr 20, 2016 at 16:28
  • Nice job filling @klanomath's request. Could you add the output from sudo fdisk /dev/disk0. Also, what version of OS X are you using. Can I also assume the partition to be shared is the 320.9 GB disk0s6? Apr 20, 2016 at 18:39
  • I'll post results of both command lines tomorrow. For the other questions: El Capitan, and yes, disk0s6 is supposed to be shared. I'd gladly merge it with s4 and s5 if possible without risk, since I abandonned the idea of installing ubuntu.
    – capi-chou
    Apr 20, 2016 at 21:31
  • I edited the first post with your request. I hope you'll have a solution...
    – capi-chou
    Apr 21, 2016 at 19:29
  • You have to put a @David somewhere in you comment, otherwise I will not be notified. When posting a comment, click on help for more information. Apr 22, 2016 at 1:44

1 Answer 1

0

FIX WITH ACCESS TO SHARED PARTITION

To get Windows to boot, you can try entering the following in gdisk from OS X. Before entering the command, you will have to disable System Integrity Protection (SIP). If Windows boots, you will be able to access the new shared partition from Windows. If Windows does not boot, follow the instructions in the section titled "FIX WITHOUT ACCESS TO SHARED PARTITION".

Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 4 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #4 (MBR partition #3)
Enter an MBR hex code (default 07): 0b
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$ 

FIX WITHOUT ACCESS TO SHARED PARTITION

To get Windows to boot, you can try entering the following in gdisk from OS X. Before entering the command, you will have to disable System Integrity Protection (SIP). If Windows boots, you will not be able to access the new partition from Windows.

Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 3 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default AB): ab
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$ 
8
  • it worked, windows boots now! Many many thanks. Indeed, I still cannot access the Data (shared) partition.
    – capi-chou
    Apr 29, 2016 at 9:58
  • @capi-chou: I can post instructions that will allow Windows to see the shared partition. If you follow the instructions, Windows may not boot. If this happens, you would need to execute the command bootrec, which will rebuild the C:\boot\BCD file. This command can only be run from the Windows installation media. After running the command, Windows again will boot. So do you have your Windows installation DVD and do you want to proceed? Apr 29, 2016 at 16:53
  • I may still have an old Windows DVD somwhere, but my optical drive is dead anyway. But if a usb recovery drive is enough (I suppose I only need to get access to DOS command line), you can proceed.
    – capi-chou
    Apr 30, 2016 at 7:42
  • @capi-chou: I updated my answer. You can try to see if windows will be able to access the shared partition. You may not need the Windows installation media. If you do, you have no way of boot from the DVD (optical) drive. There is no way to boot the Windows installation media from a USB port on your model Mac. Apr 30, 2016 at 18:22
  • I tried your "FIX WITH ACCESS TO SHARED PARTITION". Good news: windows still boots. Good news: I can see the shared volume from windows disk management. Bad news: it shows as "non allocated". I can build a new volume... but I got an alert saying that this would make any other OS installed on the same drive unable to boot. I didn't take the risk... Can I?
    – capi-chou
    May 6, 2016 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .