Partition pain

I was trying to free up some space from my windows 10 partition to go back to my Mac OS X 10.10.2 partition. You used to be able to do this in either boot amp or the disk utility just by dragging the sliders, I'm sure...i couldn't get it to work in Mac I looked online and read somewhere that Windows 10 could do it natively.


In Windows 10 disk management o resized the bootcamp partition to free up some space. This then created an empty partition, so I headed back to OS X, but it didn't seem to see it in disk utility, aback to Windows 10, I thought if I formatted it as fat32 os X would see it and be able to reclaim the space.


That's when the sh*t hit the fan:


-cant boot into os X

-cant boot into Windows 10


when booting the screen is black for a long time then the machine tries to book Windows but says there's no bootable media (or something similar).


I tries command + R to load online help/utilities but disk utility their recognises all the partitions but cannot seem to do anything with them, like delete or repair etc. It says it can't make changes to the boot map (apologies not exact mssage(s) have subsequntly been drinking to numb the misery of it. Am away from home, so don't have any bootable media Or any backups with me.


basically I've broken the guild map I think but because everything's greyed out in the utilises, I can't erase any partitions (if that's what I need to do).


would someone please give me some advice? - will it be possible to save the data on the os X partition? (Not so bothers about Windows 10)???


thanks in advance


david


Macbook pro retina 15inch 2012

Posted on Dec 28, 2015 9:10 PM

Reply
79 replies

Dec 29, 2015 11:57 PM in response to Loner T

Hi, as per your instructions, I e created a us A key version of mountain lion (the version it automatically downloaded).


User uploaded file


Have attached a screen shot (for some reason it's showing it sideways on here to me, hopefully you'll be able to see though).


DIsk01 - my os X el cap partition

disk02 - Windows 10

disk03 - the partition space I was stupidly trying to reclaim for OS X from the Windows 10 partition.


AS you (might) be able to see from the picture, all disks are now "partition type Windows_LDM"...


please can can you advise as to what the next step would be to:


A) see if I can recover at least my OS X (disk01) partition?


and


B) what to do next to just get the machine working again (with or with out the data on my partitions)?


many thanks so far, much appreciated and hoping for good news


d

Dec 31, 2015 6:20 PM in response to m0ng

m0ng wrote:


Sorry. Hope I'm not making you rip your hair out.


btw ever now and again I'm getting an error come up in OS X saying "the disk inserted is unreadable by os x" or something similar...


anyway:


User uploaded file

Create a blank new GPT, and create new entries using these start/end values. You need to use the n command and maintain the sequence and code column.

Dec 31, 2015 8:25 PM in response to Loner T

K. These are the issues now:


1. The bootcamp drive now appears in finder and the files therein seem to be as was (i haven't tried booting into windows, see 3.)

2. The mac hd partition is a different story, see pic, greyed out.

3. When i press option during bootup no drives other than the SD card that this os x el cap is installed on appear.


User uploaded file

Jan 1, 2016 5:37 PM in response to m0ng

Please verify all values for typos.


1. Create a new GPT.

2. x (Experts menu)

3. l (Alignment)

4. 1 (1 sector)

5. m (Main Menu)

6. n (New)

7. 1 (GPT #1)

8. 40 (Start)

9. 409639 (End)

10. EF00 (EFI)

11. n (new)

12. 2 (GPT#2)

13. 409640 (Start)

14. 702397983 (End)

15. AF00 (OSX)

16. n (New)

17. 3 (GPT#3)

18. 702397984 (Start)

19. 703667519 (End)

20. AB00 (Recovery HD)

21. n (New)

22. 4 (GPT#4)

23. 703668224 (Start)

24. 977104985 (End)

25. 0700 (NTFS)

26. p

27. w

28. y


Reboot and check OS X and Windows partitions. Try to boot from internal disk OS. Windows is not ready yet.

Dec 28, 2015 9:22 PM in response to m0ng

m0ng wrote:


I was trying to free up some space from my windows 10 partition to go back to my Mac OS X 10.10.2 partition. You used to be able to do this in either boot amp or the disk utility just by dragging the sliders, I'm sure...i couldn't get it to work in Mac I looked online and read somewhere that Windows 10 could do it natively.

This has never been supported. Please see Boot Camp: Resize the Windows partition . Snow Leopard was a bit more forgiving, but not many others.



In Windows 10 disk management o resized the bootcamp partition to free up some space. This then created an empty partition, so I headed back to OS X, but it didn't seem to see it in disk utility, aback to Windows 10, I thought if I formatted it as fat32 os X would see it and be able to reclaim the space.

Windows has no idea it is running on a Mac and overwrites the Mac EFI.


would someone please give me some advice? - will it be possible to save the data on the os X partition? (Not so bothers about Windows 10)???

Use OS X: About OS X Recovery - Apple Support and boot into Internet Recovery. Find a 16GB Flash drive, if you can, and How to install OS X on an external drive connected to your Mac - Apple Support and boot from this. Boot from this external disk, and we can inspect the internal disk for recoverability.

Dec 31, 2015 3:30 PM in response to m0ng

The SD Card may have a loose connection. You need to boot into Recovery HD of the SD card by powering down and starting with Command+R or Alt/Option key. Once you are in Recovery console,


Step A - Disable El Capitan temporarily (About System Integrity Protection on your Mac - Apple Support)


1. Boot into Local Recovery (Command+R).

2. Start Utilities -> Terminal.

3. Type csrutil disable in Terminal and press Enter/Return.

4. Type csrutil status.

5. Boot normally, and type csrutil status to confirm that all individual entries are still disabled.


Once you boot normally, we can proceed further with Gdisk again.

Jan 1, 2016 5:37 PM in response to m0ng

If you look at Re: Partition pain, there is a message

Partitions will be aligned on 8-sector boundaries

If you compare https://discussions.apple.com/content/attachment/662192040 and compare it to


m0ng wrote:


here we are:


Last login: Fri Jan 1 05:12:28 on ttys000

davids-MacBook-Pro:~ m0ng$ sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 977105059

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 2014

2048 407592 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 2008

411648 701986336 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

702397984 480

702398464 1269056 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

703667520 704

703668224 273436672 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

977104896 131

977105027 32 Sec GPT table

977105059 1 Sec GPT header

davids-MacBook-Pro:~ m0ng$

You can see the issue. The start/end must match exactly.


Please redo the GPT after you change the sector alignment to 1 sector as shown...


sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 1.0.0


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

NOTE: Write test failed with error number 1. It will be impossible to save

changes to this disk's partition table!


Partition table scan:

MBR: hybrid

BSD: not present

APM: not present

GPT: present


Found valid GPT with hybrid MBR; using GPT.


Command (? for help): p

Disk /dev/disk0: 500118192 sectors, 238.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 22749ACF-207D-458E-B255-5DF02C39DC2D

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 500118158

Partitions will be aligned on 8-sector boundaries

Total free space is 1325 sectors (662.5 KiB)


Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 250801735 119.4 GiB AF05 OSY-MBP13

3 250801736 252071271 619.9 MiB AB00 Recovery HD

4 252071936 500117503 118.3 GiB 0700 BOOTCAMP


Command (? for help): x


Expert command (? for help): ?

a set attributes

c change partition GUID

d display the sector alignment value

e relocate backup data structures to the end of the disk

g change disk GUID

h recompute CHS values in protective/hybrid MBR

i show detailed information on a partition

l set the sector alignment value

m return to main menu

n create a new protective MBR

o print protective MBR data

p print the partition table

q quit without saving changes

r recovery and transformation options (experts only)

s resize partition table

t transpose two partition table entries

u replicate partition table on new device

v verify disk

w write table to disk and exit

z zap (destroy) GPT data structures and exit

? print this menu


Expert command (? for help): l

Enter the sector alignment value (1-65536, default = 2048): 1


Expert command (? for help): p

Disk /dev/disk0: 500118192 sectors, 238.5 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 22749ACF-207D-458E-B255-5DF02C39DC2D

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 500118158

Partitions will be aligned on 1-sector boundaries

Total free space is 1325 sectors (662.5 KiB)


Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 250801735 119.4 GiB AF05 OSY-MBP13

3 250801736 252071271 619.9 MiB AB00 Recovery HD

4 252071936 500117503 118.3 GiB 0700 BOOTCAMP


Expert command (? for help):



Dec 31, 2015 11:27 PM in response to m0ng

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.

  1. Sudo gdisk /dev/rdisk0
  2. P (Print list of parts)
  3. R (Recover)
  4. O (print current Hybrid MBR)
  5. H (chooses Hybrid)
  6. Partitions numbers to be hybridized: 2 3 4
  7. Y (Good for GRUB question)
  8. N (part 2 boot flag)
  9. N (part 3 boot flag)
  10. Y (part 4 boot flag make NTFS bootable partition)
  11. O (print current Hybrid MBR)
  12. W (Write the new MBR)
  13. Y (Yes! write the new MBR)
  14. Reboot


Here is sample Q&A for this section. Please notice the Press Enter/Return.


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): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): Press Enter/Return

Set the bootable flag? (Y/N): Y


Test 1 - Does Bootcamp Volume show up in Finder? (This works)

Test 2 - Can you see files in Bootcamp Volume? (This works)

Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

Test 4 - If Test 3 is successful, select Bootcamp and Click Restart.


If all looks normal, please back up OS X, Windows and create Windows System Restore point.

Dec 30, 2015 1:22 AM in response to m0ng

Your Mac originally shipped with Mountain Lion, which is why you were offered ML. Since you were on El Capitan before the problem started, can you upgrade the external USB to El Capitan, if possible, before we proceed further? There are significant differences between ML (10.8) and ELC (10.11) and it would better to avoid issues resulting from such differences.

Dec 30, 2015 7:43 PM in response to Loner T

Thank you once again for your reply.


I managed to download ELC today. Despite what I thought, my USB key is 16GB but, with moutain lion installed from the recovery method, it says there is not enough room to install ELC. (I heading into town tmrw to try and pic up something bigger 32gb should be ok I hope..)


In the meantime, I tried formatting disk03 partition (see pic from last post) to see if I could make that hfs+ and install ELC on there instead - however it tells me it cannot erase the partition or alter the GUID map. I'm sorry I forget the exact wording because it very already given up and packed up for tonight - perhaps this is because the partitions were made or alter under ELC or Windows 10??


Now it seems more a question of if I'll ever get the machine working again, let alone see my data again that's on the disk01 partition...do you agree?


I have a genius appointment on Saturday, but would like to fix it before then with your help if possible.


Thanks again.

Dec 31, 2015 4:58 AM in response to Loner T

HI,


i realise it's New Year's Eve tonight and you will most probably be out enjoying yourself, (have fun). If you have time before you go, please note I've bought a 32gb sd card and am on my way home about to download gpt Fdisk. Please can you walk me through any special steps to getting ELC on the sd card or how I might use gpt to claim my partitions back?


if you can't because you are busy, I fully understand. Hopefully somebody else with no plans tonight (like myself) will be available or I'll just have to wait.


d

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Partition pain

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.