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.

Can't boot into windows after resizing partitions

I tried to resize my bootcamp and mac partitions recently

I cannot boot into windows now

Get an error about missing MBR

Do you think you could help me here?

I read about using GPT fdisk on another thread

These are the results I got from it

Wanted to check before doing anything


Sanjayas-MacBook-Pro:~ sanjaya83$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 38913/255/63 [625142448 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 - 349609376] HFS+

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

4: 0C 1023 254 63 - 1023 254 63 [ 351289344 - 273852416] Win95 FAT32L

Sanjayas-MacBook-Pro:~ sanjaya83$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 1.0.1


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!

You may need to deactivate System Integrity Protection to use this program. See

https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

for more information.


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: 625142448 sectors, 298.1 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 55739070-E42E-4414-947D-F1AAD2EB65D0

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 625142414

Partitions will be aligned on 8-sector boundaries

Total free space is 1453 sectors (726.5 KiB)


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

1 40 409639 200.0 MiB EF00 EFI System Partition

2 409640 350019015 166.7 GiB AF00 Customer

3 350019016 351288551 619.9 MiB AB00 Recovery HD

4 351289344 625141759 130.6 GiB 0700 BOOTCAMP


Command (? for help):

MacBook Pro (13-inch Early 2011), OS X El Capitan (10.11.1)

Posted on Dec 1, 2015 5:12 PM

Reply
152 replies

Jan 18, 2016 9:54 AM in response to Loner T

I would like to give it a shot, although I'm not sure how successful I'll be with the file exit code 8 that seems to re-appear after I use disk utility in recovery mode as well as when I use fsck.


It seems that 1 reboot after I fix the file system, exit code 8 comes back. this error causes me problems with clonezilla since it will not create the disk image if there is this error. I am usually able to create the image right after fixing the error.


can someone tell me if file exit code 8 is related to an OS/software issue or whether it's related to a hardware issue ? having trouble finding in-depth info related to this error.


after I figure it all out and fix the issue I would then proceed to redistribute my partition sizes with camptune.

Jan 18, 2016 7:23 PM in response to Loner T

i will try to copy the output when i run fsck -fy.


i used to run this command in single user mode, running it twice it seems that it fixes the error. but it returns after 1 reboot.


more recently i have tried running disk utility in recovery mode. since then i have restarted into OS X a couple of times, restarted into windows and back to OS X, and the file exit code 8 hasn't appeared, 'yet'


when/if it does, i will post the output

Jan 19, 2016 4:45 AM in response to zero7404

You can also boot from an external OS X installation - How to install OS X on an external drive connected to your Mac - Apple Support - and run fsck and/or repairDisk. Do you have a CoreStorage volume on your source disk?


Cloning a drive using Clonezilla also includes UUIDs of the source disk. If both old and new disks are connected to the system simultaneously, file corruption is possible. Consider GPT Fdisk to change the UUIDs of the new cloned disk to avoid such issues.

Jan 19, 2016 6:22 PM in response to Loner T

ok, so i am getting file exit code 8 within DU. unfortunately i cannot find any log files to copy/paste the output.


instead i ran fsck -fy from single-user mode then took a snapshot of the output displayed. i'm sorry if this is crude, didn't have any other way to do it at this time.


or if there are log files stored somewhere i can just dig them up and post. in the meantime, this is what i have:


https://drive.google.com/file/d/0B5FH3snPwEXydmdZYUJTM0U3bzQ/view?usp=sharing

Jan 19, 2016 8:22 PM in response to Loner T

Loner T,


this is a single SSD on a late 2013 macbook pro. the SSD is 256 GB, I have loaded windows on the partition i created using bootcamp.


i bounce between OS's frequently. Everything works fine in OS 10, boots normally, runs fine (except that my finder is unresponsive after a fresh boot - relaunch fixes that).


i attempted to run the command you suggested, it wants to delete the EFI partition.


Admins-MBP:~ adminuser$ diskutil repairDisk disk0

Repairing the partition map might erase disk0s1, proceed? (y/N) n

Repair canceled


Here's what partitions are on the SSD now:


Admins-MBP:~ adminuser$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 60.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data Windows 189.8 GB disk0s4

Jan 19, 2016 9:36 PM in response to Loner T

after fixing the invalid file count from within single user mode, i have to wait for du to report exit code 8 again. usually after fixing, i just get exit code 0.


i would then run diskutil as you suggested .... what is a POSIX error code ?


this exit code is coming up for Macintosh HD, do you think it's caused by the OS or there could be a bad sector on the SSD ?


is exit code 8 common ? i'd want to make sure all partitions are healthy before using camptune and before trying to save the disk image using clonezilla.

Jan 20, 2016 4:52 AM in response to zero7404

POSIX is set of standards, which were intended to "unify" variants/derivatives of Unix. The OS X branch has parts of BSD, OSF, NeXT and some of its own but to allow portability of interfaces between variants/derivatives.


Here is my diskutil repairDisk run on a normally-booted OS X.


diskutil repairDisk disk0

Repairing the partition map might erase disk0s1, proceed? (y/N) y

Started partition map repair on disk0

Checking prerequisites

Checking the partition list

Adjusting partition map to fit whole disk as required

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking the EFI system partition's folder content

Checking all HFS data partition loader spaces

Checking booter partitions

Checking booter partition disk0s3

Repairing file system

Checking Journaled HFS Plus volume

Checking extents overflow file

Checking catalog file

Checking multi-linked files

Checking catalog hierarchy

Checking extended attributes file

Checking volume bitmap

Checking volume information

The volume Recovery HD appears to be OK

File system check exit code is 0

Updating boot support partitions for the volume as required

Reviewing boot support loaders

Checking Core Storage Physical Volume partitions

Verifying storage system

Checking volume

disk0s2: Scan for Volume Headers

disk0s2: Scan for Disk Labels

Logical Volume Group 57578357-3715-48A5-AB8A-4107AF12F7FB on 1 device

disk0s2: Scan for Metadata Volume

Logical Volume Group has a 24 MB Metadata Volume with double redundancy

Start scanning metadata for a valid checkpoint

Load and verify Segment Headers

Load and verify Checkpoint Payload

Load and verify Transaction Segment

Incorporate 0 newer non-checkpoint transactions

Load and verify Virtual Address Table

Load and verify Segment Usage Table

Load and verify Metadata Superblock

Load and verify Logical Volumes B-Trees

Logical Volume Group contains 1 Logical Volume

Load and verify 11EBF920-AA4B-4EC6-AC7F-7CC70E69883C

Load and verify 8A0116D5-7E1E-44D8-B2A0-8D4E4D48298D

Load and verify Freespace Summary

Load and verify Block Accounting

Load and verify Live Virtual Addresses

Newest transaction commit checkpoint is valid

Load and verify Segment Cleaning

The volume 57578357-3715-48A5-AB8A-4107AF12F7FB appears to be OK

Storage system check exit code is 0

Repairing storage system

The volume disk0s2 cannot be repaired when it is in use

Checking volume

disk0s2: Scan for Volume Headers

disk0s2: Scan for Disk Labels

Logical Volume Group 57578357-3715-48A5-AB8A-4107AF12F7FB on 1 device

disk0s2: Scan for Metadata Volume

Logical Volume Group has a 24 MB Metadata Volume with double redundancy

Start scanning metadata for a valid checkpoint

Load and verify Segment Headers

Load and verify Checkpoint Payload

Load and verify Transaction Segment

Incorporate 0 newer non-checkpoint transactions

Load and verify Virtual Address Table

Load and verify Segment Usage Table

Load and verify Metadata Superblock

Load and verify Logical Volumes B-Trees

Logical Volume Group contains 1 Logical Volume

Load and verify 11EBF920-AA4B-4EC6-AC7F-7CC70E69883C

Load and verify 8A0116D5-7E1E-44D8-B2A0-8D4E4D48298D

Load and verify Freespace Summary

Load and verify Block Accounting

Load and verify Live Virtual Addresses

Newest transaction commit checkpoint is valid

Load and verify Segment Cleaning

The volume 57578357-3715-48A5-AB8A-4107AF12F7FB appears to be OK

Storage system check exit code is 0

Updating Windows boot.ini files as required

The partition map appears to be OK

Finished partition map repair on disk0


I suggest looking at Using Disk Utility to verify or repair disks - Apple Support and the linked articles. Unless absolutely necessary, I prefer using DU over fsck. Please also see the fsck man page, since fsck is a wrapper for underlying file system-specific utilities.

Feb 2, 2016 8:44 PM in response to Loner T

Loner,


exit code 8 is back again .... here is what I'm seeing in terminal .... just bewildered because I also did a diskutil repairDisk disk0 before doing this check.


I did it in terminal, within OS 10. Not from single user mode or recovery mode. what was the root cause of this again ? I am just checking the Macintosh HD volume.


Admins-MBP:~ adminuser$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 60.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data Windows 189.8 GB disk0s4

Admins-MBP:~ adminuser$ diskutil verifyVolume disk0s2

Started file system verification on disk0s2 Macintosh HD

Verifying file system

Using live mode

Performing live verification

Checking Journaled HFS Plus volume

Checking extents overflow file

Checking catalog hierarchy

Checking extended attributes file

Checking volume bitmap

Checking volume information

Checking volume information

Invalid volume file count

Checking volume information

Invalid volume file count

Invalid volume file count

(It should be 794329 instead of 794800)

The volume Macintosh HD was found corrupt and needs to be repaired

File system check exit code is 8

Error: -69845: File system verify or repair failed

Underlying error: 8: POSIX reports: Exec format error

Admins-MBP:~ adminuser$

Can't boot into windows after resizing partitions

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