You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Missing bootcamp after resizing the partition of mac

Hi ,


I need your help. After resizing the partition for the MAC HD( made it smaller as i need more space for windows), my win 7 64 doesn't boot anymore.

I have posted some details as what others have done. Please help me fix this. Thank you and Merry Christmas


diskutil list

Peeble-Montaners-MacBook:~ peeble_montaner$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *250.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 120.5 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s5

4: Microsoft Basic Data 90.0 GB disk0s4


diskutil cs list

Peeble-Montaners-MacBook:~ peeble_montaner$ diskutil cs list

No CoreStorage logical volume groups found

Peeble-Montaners-MacBook:~ peeble_montaner$


sudo gpt -vv -r show /dev/disk0Peeble-Montaners-MacBook:~ peeble_montaner$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=250059350016; sectorsize=512; blocks=488397168

gpt show: /dev/disk0: Suspicious MBR at sector 0

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

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

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 235332144 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

235741784 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

237011320 75605640

312616960 175779840 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

488396800 335

488397135 32 Sec GPT table

488397167 1 Sec GPT header


Peeble-Montaners-MacBook:~ peeble_montaner$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 30401/255/63 [488397168 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 - 235332144] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 235741784 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 312616960 - 175779840] Win95 FAT32L

Peeble-Montaners-MacBook:~ peeble_montaner$

Posted on Dec 25, 2014 11:28 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 25, 2014 11:46 AM

You will need two software applications.


1. Testdisk (http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step) to locate the 'lost' NTFS partition which is currently located in the gap between GPT3 and GPT 4. It should between sectors 237011320 and 75605640.

Enzoerwin wrote:


235741784 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

237011320 75605640

312616960 175779840 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

2. Once the partition is located GPT Fdisk (http://sourceforge.net/projects/gptfdisk/) is used to manipulate GPT4 to allow Windows to boot. There is a thread that you can use a reference Bootcamp disk0s4 gone after Yosemite update.


3. In Testdisk use the highlighted partition type.


User uploaded file

4. The 'lost' NTFS partition should be similar to the following...


User uploaded file


5. If you have questions about any of the steps, please post back on this discussion.

13 replies
Question marked as Top-ranking reply

Dec 25, 2014 11:46 AM in response to Enzoerwin

You will need two software applications.


1. Testdisk (http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step) to locate the 'lost' NTFS partition which is currently located in the gap between GPT3 and GPT 4. It should between sectors 237011320 and 75605640.

Enzoerwin wrote:


235741784 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

237011320 75605640

312616960 175779840 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

2. Once the partition is located GPT Fdisk (http://sourceforge.net/projects/gptfdisk/) is used to manipulate GPT4 to allow Windows to boot. There is a thread that you can use a reference Bootcamp disk0s4 gone after Yosemite update.


3. In Testdisk use the highlighted partition type.


User uploaded file

4. The 'lost' NTFS partition should be similar to the following...


User uploaded file


5. If you have questions about any of the steps, please post back on this discussion.

Dec 26, 2014 4:41 AM in response to Loner T

Hi Loner,


Thanks for the quick reply. I am trying test disk and have this below. Shall i just continue. Thanks


TestDisk 7.0-WIP, Data Recovery Utility, October 2014

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


Disk /dev/rdisk0 - 250 GB / 232 GiB (RO)


Write access for this media is not available.

TestDisk won't be able to modify it.


- No partition from this disk must be mounted:

Open the Disk Utility (In Finder -> Application -> Utility folder)

and press Unmount button for each volume from this disk

- This media may be physically write-protected, check the jumpers.






>[ Continue ] Continue even if write access isn't available

[ Quit ] Return to disk selection

Dec 26, 2014 5:19 AM in response to Loner T

Hi Loner T,


Actually i already continued the analysis, but is it this slow? will post the result once done.




Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


Disk /dev/rdisk0 - 250 GB / 232 GiB - 488397168 sectors (RO)

Analyse sector 315392000/488397167: 00%



check_FAT: Unusual media descriptor (0xf0!=0xf8)

Warning: number of heads/cylinder mismatches 255 (FAT) != 1 (HD)

Warning: number of sectors per track mismatches 63 (FAT) != 1 (HD)


EFI System 40 409639 409600 [EFI]

Mac HFS 409640 235741783 235332144

Mac HFS 235741784 237011319 1269536


Mac HFS 256137240 257406775 1269536

Mac HFS 257406776 312354815 54948040

Dec 26, 2014 7:54 AM in response to Loner T

Hi Loner T,


This is the result of the test disk. What should i do next. Thanks


TestDisk 7.0-WIP, Data Recovery Utility, October 2014

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


Disk /dev/rdisk0 - 250 GB / 232 GiB - 488397168 sectors (RO)


The harddisk (250 GB / 232 GiB) seems too small! (< 867 GB / 808 GiB)

Check the harddisk size: HD jumpers settings, BIOS detection...


The following partitions can't be recovered:

Partition Start End Size in sectors

> MS Data 328783272 504563111 175779840

MS Data 334182408 544337920 210155513

MS Data 343936024 554091536 210155513

MS Data 434767488 644923000 210155513

MS Data 474410272 684565784 210155513

Mac HFS 476622466 1695087114 1218464649 [ّ F| ';~Q?^Bv~P ~YLl *;~Q?^A]

MS Data 488396792 698552304 210155513

MS Data 488396799 664176638 175779840

Mac HFS 488397124 489666659 1269536



[ Continue ]

NTFS, blocksize=4096, 89 GB / 83 GiB


TestDisk 7.0-WIP, Data Recovery Utility, October 2014

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


Disk /dev/rdisk0 - 250 GB / 232 GiB - 488397168 sectors (RO)

Partition Start End Size in sectors

>P EFI System 40 409639 409600 [EFI]

D Mac HFS 409640 235741783 235332144

D MS Data 124026896 334182408 210155513

D MS Data 133780512 343936024 210155513

D MS Data 153003433 328783272 175779840

D MS Data 224611976 434767488 210155513

D Mac HFS 235741784 237011319 1269536

D Mac HFS 256137240 257406775 1269536

D Mac HFS 257406776 312354815 54948040

D MS Data 264254760 474410272 210155513

D MS Data 278241280 488396792 210155513

D MS Data 312616960 488396799 175779840

D MS Data 319749779 319755952 6174

D MS Data 319755952 319762125 6174 [Boot]

D MS Data 326173563 326194301 20739 [NO NAME]

D Mac HFS 346636570 350855713 4219144

D MS Data 353250435 353256608 6174

D MS Data 353256608 353262781 6174 [Boot]

D MS Data 353256643 353262816 6174

D MS Data 353262816 353268989 6174 [Boot]

D MS Data 353268992 353271871 2880 [EFISECTOR]

D MS Data 354413913 355785896 1371984 [GW ث݊ b~^dS

D Mac HFS 358687784 401155113 42467330

D Mac HFS 420330682 424549825 4219144

D Mac HFS 455134867 458241675 3106809

D Mac HFS 487127592 488397127 1269536

Structure: Ok. Use Up/Down Arrow keys to select partition.

Use Left/Right Arrow keys to CHANGE partition characteristics:

P=Primary D=Deleted

Keys A: add partition, L: load backup, T: change type, P: list files,

Enter: to continue

FAT32, blocksize=512, 209 MB / 200 MiB

Dec 26, 2014 10:23 AM in response to Loner T

Hi,


I have searched those with 210155513. the first 2 have the can't open filesystem. the 3rd have that EFI as below. unfortunately i maybe pressed a wrong button and i am back to the analyse page. doing the analysis again. so sorry. 😟


estDisk 7.0-WIP, Data Recovery Utility, October 2014

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


MS Data 124026896 334182408 210155513




Can't open filesystem. Filesystem seems damaged.


ttp://www.cgsecurity.org


MS Data 133780512 343936024 210155513




Can't open filesystem. Filesystem seems damaged.

TestDisk 7.0-WIP, Data Recovery Utility, October 2014

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org


Disk /dev/rdisk0 - 250 GB / 232 GiB - 488397168 sectors (RO)


Partition Start End Size in sectors


1 P EFI System 40 409639 409600 [EFI]

Dec 26, 2014 12:58 PM in response to Loner T

Hi Loner,


I got this. Does it look i can still recover it? Please advise what to do next. Thanks



MS Data 278241280 488396792 210155513

Directory /


>dr-xr-xr-x 0 0 0 24-Dec-2014 17:29 .

dr-xr-xr-x 0 0 0 24-Dec-2014 17:29 ..

dr-xr-xr-x 0 0 0 27-Oct-2013 01:42 $Recycle.Bin

dr-xr-xr-x 0 0 0 27-Oct-2013 09:28 Boot

dr-xr-xr-x 0 0 0 9-Dec-2014 00:33 Games

dr-xr-xr-x 0 0 0 28-Oct-2013 16:04 Intel

dr-xr-xr-x 0 0 0 27-Oct-2013 11:34 MSOCache

dr-xr-xr-x 0 0 0 14-Dec-2014 23:14 Nexon

dr-xr-xr-x 0 0 0 14-Jul-2009 11:20 PerfLogs

dr-xr-xr-x 0 0 0 5-Jul-2014 14:31 Program Files

dr-xr-xr-x 0 0 0 23-Dec-2014 23:06 Program Files (x86)

dr-xr-xr-x 0 0 0 14-Dec-2014 23:19 ProgramData

dr-xr-xr-x 0 0 0 27-Oct-2013 01:41 Recovery

dr-xr-xr-x 0 0 0 24-Dec-2014 18:05 System Volume Information

dr-xr-xr-x 0 0 0 11-May-2014 23:01 Users

dr-xr-xr-x 0 0 0 24-Dec-2014 09:18 Windows

dr-xr-xr-x 0 0 0 31-Aug-2014 09:52 http_filter

dr-xr-xr-x 0 0 0 30-Oct-2014 02:48 temp

dr-xr-xr-x 0 0 0 22-Jun-2014 23:25 wifidata

-r--r--r-- 0 0 8192 27-Oct-2013 09:28 BOOTSECT.BAK

-r--r--r-- 0 0 2062 28-Oct-2013 16:03 RHDSetup.log

-r--r--r-- 0 0 383786 21-Nov-2010 11:23 bootmgr

-r--r--r-- 0 0 3012534272 25-Dec-2014 21:35 hiberfil.sys

-r--r--r-- 0 0 4016713728 25-Dec-2014 21:35 pagefile.sys

Dec 26, 2014 1:50 PM in response to Enzoerwin

Yes, you can recover this.



GPT 3 Start GPT 3 Size GPT 3 End NTFS Start Sector Offset NTFS Size NTFS End

235741784 1269536 237011320 278241280 41229960 210155513 488396792


The 'Sector Offset' being positive is good. A negative value means you lose GPT#3. The NTFS size is roughly 105GB which is good. The one bothersome fact is that you will still have a gap of 41229960 sectors, which is roughly 20GB. Was this what you intended to extend your Windows partition by?


A. You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 7 and 8.


Rebuild GPT4 using start/end offsets


Sudo gdisk /dev/rdisk0

P (print the full list of parts)

D (delete)

4 (part 4)

N (new part)

4 (part 4)

278241280 - Start offset in bytes (start point for Bootcamp part)

+210155513 (Size offset as opposed to End offset)

0700 (Windows part type)

P (print list of all parts just to see what changes will be made)

W (Write the new GPT)

Y (Yes! really write the new GPT)


This will delete and re-write the GPT partition info for /dev/disk0s4.


B. Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes).


Sudo gdisk /dev/disk0

P (Print list of parts)

R (Recover)

H (chooses Hybrid)

Partitions numbers to be hybridized: 2 3 4

Y (Good for GRUB question)

N (part 2 boot flag)

N (part 3 boot flag)

Y (part 4 boot flag make NTFS bootable partition)

W (Write the new MBR)

Y (Yes! write the new MBR)

Reboot


Test 1 - Does Bootcamp Volume show up in Finder?

Test 2 - Can you see files in Bootcamp Volume?

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

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


If you see a hanging underline cursor at the top left on a black screen, and it does not proceed further, you may need Windows Startup Repair or a tool called EasyBCD.

Dec 26, 2014 7:24 PM in response to Enzoerwin

It is not recommend that the Windows partition be resized. The most reliable tool (and it is a commercial tool) is called Winclone. It can also backup/restore Windows or move it to different drives, etc.


If you are willing to spend the money, I highly recommend it - https://twocanoes.zendesk.com/hc/en-us/categories/200158478-winclone.


Another tool is GParted. It is a partition editor and it is free, but requires a little bit more work.


The primary challenge with all such tools is keeping the GPT and MBR in sync and keeping the bootability of WIndows intact.

Dec 26, 2014 11:10 PM in response to Loner T

Thanks for the response.

Lucky was able to resize with partition mini, really need it cause the windows partition is already too small.

l also just backup the important files like the saves.


In another note, is there an easy way to clone the whole HD and copy it to a new one.

I want to purchase a new bigger HD so i can avoid this resizings. Thanks again for your help.

Missing bootcamp after resizing the partition of mac

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