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

I can't boot to Windows after resizing my Mac partition.

So, I recently decided to resize my bootcamp Win7 partition. This is something I have done successfully before, by:


1) Booting into Macintosh


2) Using Disk Utility to decrease the size of the Mac partition (20GB the first time)


3) Booting into Windows


4) Using Mini-Tool Partition Wizard (third-party) to allocate the free space to the Bootcamp partition.


There were a couple issues caused by this the first time around, mainly the fact that Macintosh didn’t recognize the fact that the free space had been taken, and had trouble reading from the Windows partition. However, I could live with that. I have since rebooted to both Mac and Windows several times without problem.


Recently, I decided I needed a bit more space, and so started to follow the above steps, shrinking the Mac partition an additional 15GB. Only when I went to reboot to reallocate the space, the Windows partition didn’t show up as a bootable option. Confused, I booted back to Mac, and the Bootcamp partition was still there, but renamed “disk0s4”, and unmounted. Reparing the disk failed (“Invalid BS_jmpBoot in boot block: 15921e”). The disk wouldn’t mount (not even sure if it was supposed to be mounted earlier, but that’s what it looks like). It also appears grayed-out in the list of drives to the left. It looks like I can create a dmg from the windows drive, although I haven’t done that yet (I will soon).


Any solutions for this? Although I will erase the drive if absolutely necessary, it would be preferred if that wasn’t the first option to try. I had no problems like this the first time I resized the disk.


(My mac partition is running Mavericks, if that is of any relevance)

MacBook, OS X Mavericks (10.9), Mid-2010 MC516

Posted on Aug 6, 2014 6:04 AM

Reply
50 replies

Aug 6, 2014 8:41 AM in response to Redyoshi510

Boot Camp 5.1: Frequently asked questions

How can a Windows partition be resized after Windows is installed?

You need to delete the Windows partition using the Boot Camp Assistant, and start over to change the size of the Windows partition. Back up your important Windows files first.

Please post the output of

1. diskutil list

2. sudo fdisk /dev/<BootcampDisk> (of the form disk0 as shown by 1.)

3. sudo gpt -vv -r show /dev/<BootcampDisk> (of the form disk0 as shown by 1.)

4. sudo dd if=/dev/<BootcampDiskSlice> count=1 2>/dev/null | hexdump -C (of the form disk0s4 as shown by 1.)

Aug 8, 2014 9:35 AM in response to Redyoshi510

The gpt command has two 'v's, so it is '-vv' rather than a '-w'.


1. Your NTFS partition is not intact.

2. The MBR can be fixed, but it is likely that you will need Testdisk to search for lost partitions (http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step).

3. Please post the output of the gpt command. This would help in determining the course of action.

4. If you care to, please remove personal information from your posts on a public forum. Just for your own safety.

Aug 8, 2014 7:38 PM in response to Redyoshi510

These steps correct the Partition ID, and the boot ability of the MBR partition that has Windows on it.You can type '?' for help in the following steps where you set the fdisk prompt.


To fix the MBR, in OSX Terminal


sudo fdisk -e /dev/disk0

setpid 4

07

flag 4

p

w

y

q


Please ignore the i386 message that you see in the following. Here is the set of commands in the utility. The utility starts at partition id 1. If you see any other messages, please post back.


sudo fdisk -e /dev/disk0

fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

Enter 'help' for information

fdisk: 1> ?

help Command help list

manual Show entire man page for fdisk

reinit Re-initialize loaded MBR (to defaults)

auto Auto-partition the disk with a partition style

setpid Set the identifier of a given table entry

disk Edit current drive stats

edit Edit given table entry

erase Erase current MBR

flag Flag given table entry as bootable

update Update machine code in loaded MBR

select Select extended partition table entry MBR

print Print loaded MBR partition table

write Write loaded MBR to disk

exit Exit edit of current MBR, without saving changes

quit Quit edit of current MBR, saving current changes

abort Abort program without saving current changes

fdisk: 1>

Aug 9, 2014 5:29 AM in response to Redyoshi510

Redyoshi510 wrote:


I have not yet run testdisk, should I do this?


Please do. If the NTFS header was intact, a Windows Startup Repair would suffice. Testdisk may report multiple start/end locations. In the wiki, there is an example of listing files within lost partitions.


You may lose Recovery HD, so I suggest building an external Recovery HD. OS X: About Recovery Disk Assistant

Aug 9, 2014 7:16 PM in response to Loner T

I ran testdisk in "analyze" mode, here are the last two screens in the sequence:

User uploaded fileUser uploaded file

I have it idling on this screen now as I don't want to mess up anything further. Right now, it looks like it's going to remove the Windows partition? It won't allow both "MS Data" lines to be set to "P" (it says the structure is damaged when I set it that way). I thought I should probably ask for advice on how to continue before making any mistakes. Thanks again for all the help so far.

Aug 9, 2014 8:16 PM in response to Redyoshi510

1. If you notice, after the EFI 'partition', You have one HFS entry starting at 409640 (this is your OSX installation) and there are no other entries of size 166015624, so this partition was not manipulated.


2. Then the next two entries are of the same size 1269544, but have two different start entries (the last entry is almost the same size 1269536 - less by 8 bytes). This indicates the two locations of Recovery HD. This happens when partitions are manipulated via Disk Utility. Recovery HD is moved, if necessary as part of resizing, even though it is not normally visible. The last entry is also your 'original' Recovery HD, and you can see how it moved.


3. The next two entries are possibly your NTFS partitions. You want to position on the first one, using up/down arrow keys, but do not use the left/right arrow keys. This tries to change the partition, which is not what is needed.


4. The line which says 'Keys' has an entry called 'P: list files'. The goal is to list files within this partition to see if it looks like a familiar set of files. If it does, note down the start/end/size.


If there is no familiar set of files, move on to the next MS Data entry in the list. It is possible that the partitioning may have over-written your NTFS data by putting some parts of recovery HD on it or vice-a-versa. This is a 'scavenging' operation to find a possible start/end, that can be used to run a Windows repair to bring up windows.

Aug 10, 2014 10:28 AM in response to Redyoshi510

Please check the second MS Data partition as well.


Because of the partition movement, the GPT may have to be updated as well as the MBR, if they are not synched. Such a change before any windows repair is attempted should also be tested for a valid NTFS header.


Windows repair should be attempted only if the entire NTFS partition can be first resuscitated.

Aug 10, 2014 3:40 PM in response to Redyoshi510

Please download GPT fdisk (gdisk) from http://sourceforge.net/projects/gptfdisk/.


Partition #4 needs to be deleted and recreated with start = 196993024, size=488396792.


GDisk can be executed with sudo gdisk /dev/disk0.


Type 'p' to print the current configuration.

Type 'd' to delete partition, then type 4 to remove it. Confirm with 'y', if necessary.

Type 'n' to add a new partition, then type 4, to add it back again.

Use the start and size as indicated.

Type 'w' to write the entry and confirm with 'y', if necessary.

Type 'p' to print the updated GPT.


Run sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

and look for 'R.NTFS' in the output. If this is correct, you may need to run Windows repair to fix the boot so it can seen and selected in System Preferences.


Please post here if you see any errors.

Aug 10, 2014 3:39 PM in response to Redyoshi510

well for starters windows 7 partition must have 20.00GB to function and if you are running it along side your apple OS you probably like with Linux ran over into windows partition and OR Your MBR for WinOS is now invalid. try to just use original instillation disc to get into recovery mode to rebuild you MBR. but if your partition is to badly damaged you can still recover most if not all of your data from windows partition before your either re install of the fresh OS or if you thought ahead your backup disc or image. in the future you should do in either do your partion resize with Dos or linux so you can undo your changes if you find out after the fact that you have a bad reboot ok

I can't boot to Windows after resizing my Mac partition.

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