disk0s2 can't mount - Partition shows as "MBR part 255"

Something happened with my BootCamp configuration and now my MBP will only boot into windows. When I booted into recovery and checked the Disk Utility, the "disk0s2" was unmounted and couldn't be mounted. I tried to follow guides where people had similar issues, however, I believe I've dug my hole deeper.


I'm getting an error that there's a "suspicious" and "malformed" MBR at sector 0. I'm also getting an error the there is "no space available on device" when trying to add the partition back.


The image below shows my current gpt output. Can anyone help get my OSX partition back to bootable?


Thank you in advance!!!


User uploaded file

MacBook Pro

Posted on Jul 31, 2018 1:44 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 1, 2018 4:41 PM

Run


gpt remove -i 2 /dev/disk0

gpt add -i 2 -b 409640 -s 158339032 -t apfs /dev/disk0


If 'apfs' gives you an error, then


gpt add -i 2 -b 409640 -s 158339032 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0


Now run


diskutil repairDisk disk0


and reboot and test if macOS will boot properly.

Similar questions

81 replies

Aug 1, 2018 10:27 AM in response to Loner T

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

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

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

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

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

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 158339032 2 MBR part 255

158748672 78225408 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

236974080 4063

236978143 32 Sec GPT table

236978175 1 Sec GPT header

Aug 2, 2018 11:17 AM in response to Loner T

I ran the commands and restarted. It comes up to a flashing folder with a question mark.


The output of the "gpt -vv -r show /dev/disk0" is different now:


-bash-3.2# gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

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 236978175

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 158339032

158748672 78225408 2 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

236974080 4063

236978143 32 Sec GPT table

236978175 1 Sec GPT header

Aug 2, 2018 1:27 PM in response to Loner T

I did not get an error with "apfs."


Here's the latest output:


-bash-3.2# diskutil unmountDisk disk0

Unmount of all volumes on disk0 was successful

-bash-3.2# gpt remove -i 2 /dev/disk0

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

/dev/disk0s2 removed

-bash-3.2# gpt add -i 2 -b 409640 -s 158339032 -t apfs /dev/disk0

usage: gpt add [-b lba] [-i index] [-s lba] [-t uuid] device ...

-bash-3.2# gpt add -i 3 -b 158748672 -s 78225408 -t windows /dev/disk0

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

gpt add: /dev/disk0: error: no space available on device

-bash-3.2# 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

Problems were encountered during repair of the partition map

Error: -69770: Partition map check failed because no slices were found

Aug 2, 2018 8:41 PM in response to Loner T

Thanks for all of your help!


I'm not sure if disk0 is still my internal disk. How do I see that?


I ran the scripts you provided -- here's the output:


-bash-3.2# gpt add -i 2 -b 409640 -s 158339032 -t

7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0

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

/dev/disk0s2 added

-bash-3.2# gpt add -i 3 -b 158748672 -s 78225408 -t windows /dev/disk0

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

gpt add: /dev/disk0: error: no space available on device

-bash-3.2# gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

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 236978175

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

158748672 78225408 2 MBR part 12

236974080 4063

236978143 32 Sec GPT table

236978175 1 Sec GPT header

Aug 5, 2018 5:52 PM in response to Loner T

Here is the text:



-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 14751/255/63 [236978176 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: 0C 1023 254 63 - 1023 254 63 [ 158748672 - 78225408] Win95 FAT32L
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused




User uploaded file
Reply Forward


Aug 7, 2018 11:53 AM in response to Loner T

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *121.3 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_APFS 81.1 GB disk0s2

3: Microsoft Basic Data BOOTCAMP 40.1 GB disk0s3


/dev/disk1 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk1

1: EFI EFI 209.7 MB disk1s1

2: Apple_HFS HighSierra 999.3 GB disk1s2

3: Apple_Boot Recovery HD 650.0 MB disk1s3

Aug 8, 2018 6:23 AM in response to Loner T

00000000 33 c0 8e d0 bc 00 7c 8e c0 8e d8 be 00 7c bf 00 |3.....|......|..|

00000010 06 b9 00 02 fc f3 a4 50 68 1c 06 cb fb b9 04 00 |.......Ph.......|

00000020 bd be 07 80 7e 00 00 7c 0b 0f 85 10 01 83 c5 10 |....~..|........|

00000030 e2 f1 cd 18 88 56 00 55 c6 46 11 05 c6 46 10 00 |.....V.U.F...F..|

00000040 b4 41 bb aa 55 cd 13 5d 72 0f 81 fb 55 aa 75 09 |.A..U..]r...U.u.|

00000050 f7 c1 01 00 74 03 fe 46 10 66 60 80 7e 10 00 74 |....t..F.f`.~..t|

00000060 26 66 68 00 00 00 00 66 ff 76 08 68 00 00 68 00 |&fh....f.v.h..h.|

00000070 7c 68 01 00 68 10 00 b4 42 8a 56 00 8b f4 cd 13 ||h..h...B.V.....|

00000080 9f 83 c4 10 9e eb 14 b8 01 02 bb 00 7c 8a 56 00 |............|.V.|

00000090 8a 76 01 8a 4e 02 8a 6e 03 cd 13 66 61 73 1e fe |.v..N..n...fas..|

000000a0 4e 11 0f 85 0c 00 80 7e 00 80 0f 84 8a 00 b2 80 |N......~........|

000000b0 eb 82 55 32 e4 8a 56 00 cd 13 5d eb 9c 81 3e fe |..U2..V...]...>.|

000000c0 7d 55 aa 75 6e ff 76 00 e8 8a 00 0f 85 15 00 b0 |}U.un.v.........|

000000d0 d1 e6 64 e8 7f 00 b0 df e6 60 e8 78 00 b0 ff e6 |..d......`.x....|

000000e0 64 e8 71 00 b8 00 bb cd 1a 66 23 c0 75 3b 66 81 |d.q......f#.u;f.|

000000f0 fb 54 43 50 41 75 32 81 f9 02 01 72 2c 66 68 07 |.TCPAu2....r,fh.|

00000100 bb 00 00 66 68 00 02 00 00 66 68 08 00 00 00 66 |...fh....fh....f|

00000110 53 66 53 66 55 66 68 00 00 00 00 66 68 00 7c 00 |SfSfUfh....fh.|.|

00000120 00 66 61 68 00 00 07 cd 1a 5a 32 f6 ea 00 7c 00 |.fah.....Z2...|.|

00000130 00 cd 18 a0 b7 07 eb 08 a0 b6 07 eb 03 a0 b5 07 |................|

00000140 32 e4 05 00 07 8b f0 ac 3c 00 74 fc bb 07 00 b4 |2.......<.t.....|

00000150 0e cd 10 eb f2 2b c9 e4 64 eb 00 24 02 e0 f8 24 |.....+..d..$...$|

00000160 02 c3 49 6e 76 61 6c 69 64 20 70 61 72 74 69 74 |..Invalid partit|

00000170 69 6f 6e 20 74 61 62 6c 65 00 45 72 72 6f 72 20 |ion table.Error |

00000180 6c 6f 61 64 69 6e 67 20 6f 70 65 72 61 74 69 6e |loading operatin|

00000190 67 20 73 79 73 74 65 6d 00 4d 69 73 73 69 6e 67 |g system.Missing|

000001a0 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 | operating syste|

000001b0 6d 00 00 00 00 62 7a 99 06 f1 8c db 00 00 00 00 |m....bz.........|

000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|

00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

000003d0 00 00 00 00 00 00 00 00 c2 31 f1 02 00 00 00 00 |.........1......|

000003e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

000004f0 00 00 00 00 00 00 00 00 f6 c9 b5 00 00 00 00 00 |................|

00000500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

00000510 ba 52 24 01 00 00 00 00 01 00 00 00 00 00 00 00 |.R$.............|

00000520 01 00 04 00 08 00 00 00 00 00 00 00 00 00 00 00 |................|

00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

00001400

Aug 10, 2018 9:53 AM in response to Loner T

0000: 33c0 8ed0 bc00 7c8e c08e d8be 007c bf00 |3...............|

0010: 06b9 0002 fcf3 a450 681c 06cb fbb9 0400 |.......Ph.......|

0020: bdbe 0780 7e00 007c 0b0f 8510 0183 c510 |................|

0030: e2f1 cd18 8856 0055 c646 1105 c646 1000 |.....V.U.F...F..|

0040: b441 bbaa 55cd 135d 720f 81fb 55aa 7509 |.A..U...r...U.u.|

0050: f7c1 0100 7403 fe46 1066 6080 7e10 0074 |....t..F.f.....t|

0060: 2666 6800 0000 0066 ff76 0868 0000 6800 |.fh....f.v.h..h.|

0070: 7c68 0100 6810 00b4 428a 5600 8bf4 cd13 |.h..h...B.V.....|

0080: 9f83 c410 9eeb 14b8 0102 bb00 7c8a 5600 |..............V.|

0090: 8a76 018a 4e02 8a6e 03cd 1366 6173 1efe |.v..N..n...fas..|

00a0: 4e11 0f85 0c00 807e 0080 0f84 8a00 b280 |N...............|

00b0: eb82 5532 e48a 5600 cd13 5deb 9c81 3efe |..U2..V.........|

00c0: 7d55 aa75 6eff 7600 e88a 000f 8515 00b0 |.U.un.v.........|

00d0: d1e6 64e8 7f00 b0df e660 e878 00b0 ffe6 |..d........x....|

00e0: 64e8 7100 b800 bbcd 1a66 23c0 753b 6681 |d.q......f..u.f.|

00f0: fb54 4350 4175 3281 f902 0172 2c66 6807 |.TCPAu2....r.fh.|

0100: bb00 0066 6800 0200 0066 6808 0000 0066 |...fh....fh....f|

0110: 5366 5366 5566 6800 0000 0066 6800 7c00 |SfSfUfh....fh...|

0120: 0066 6168 0000 07cd 1a5a 32f6 ea00 7c00 |.fah.....Z2.....|

0130: 00cd 18a0 b707 eb08 a0b6 07eb 03a0 b507 |................|

0140: 32e4 0500 078b f0ac 3c00 74fc bb07 00b4 |2.........t.....|

0150: 0ecd 10eb f22b c9e4 64eb 0024 02e0 f824 |........d.......|

0160: 02c3 496e 7661 6c69 6420 7061 7274 6974 |..Invalid.partit|

0170: 696f 6e20 7461 626c 6500 4572 726f 7220 |ion.table.Error.|

0180: 6c6f 6164 696e 6720 6f70 6572 6174 696e |loading.operatin|

0190: 6720 7379 7374 656d 004d 6973 7369 6e67 |g.system.Missing|

01a0: 206f 7065 7261 7469 6e67 2073 7973 7465 |.operating.syste|

01b0: 6d00 0000 0062 7a99 06f1 8cdb 0000 0000 |m....bz.........|

01c0: 0000 0000 0000 0000 0000 0000 0000 0000 |................|

. . .

01f0: 0000 0000 0000 0000 0000 0000 0000 55aa |..............U.|

0200: 0000 0000 0000 0000 0000 0000 0000 0000 |................|

. . .

03d0: 0000 0000 0000 0000 c231 f102 0000 0000 |.........1......|

03e0: 0000 0000 0000 0000 0000 0000 0000 0000 |................|

. . .

04f0: 0000 0000 0000 0000 f6c9 b500 0000 0000 |................|

0500: 0000 0000 0000 0000 0000 0000 0000 0000 |................|

0510: ba52 2401 0000 0000 0100 0000 0000 0000 |.R..............|

0520: 0100 0400 0800 0000 0000 0000 0000 0000 |................|

0530: 0000 0000 0000 0000 0000 0000 0000 0000 |................|

. . .

0ff0: 0000 0000 0000 0000 0000 0000 0000 0000 |................|


error: Device does not contain a valid APFS container.

Aug 11, 2018 8:48 AM in response to Loner T

Command (? for help): p

Disk /dev/disk0: 236978176 sectors, 113.0 GiB

Sector size (logical): 512 bytes

Disk identifier (GUID): 5C089A2F-BA4F-4F7B-AE2A-5A03869F8148

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 33

First usable sector is 34, last usable sector is 236978142

Partitions will be aligned on 8-sector boundaries

Total free space is 4069 sectors (2.0 MiB)


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

1 40 409639 200.0 MiB EF00

2 409640 158748671 75.5 GiB AF05

3 158748672 236974079 37.3 GiB 0700


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/disk0.

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.

Mikes-MacBook-Pro:~ mike$ 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

Reviewing boot support loaders

Checking Core Storage Physical Volume partitions

Repairing storage system

Performing fsck_cs -y -x --lv --pv disk0s2

Checking volume

disk0s2: Scan for Volume Headers

Invalid Volume Header @ 0: invalid field value

Invalid Volume Header @ 81069583872: invalid field value

disk0s2 is not a CoreStorage volume

Storage system check exit code is 1

Problems were encountered during repair of the partition map

Error: -69716: Storage system verify or repair failed

Underlying error: 1: Operation not permitted

Aug 12, 2018 2:01 PM in response to Loner T

diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *121.3 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS 81.1 GB disk0s2

3: Microsoft Basic Data BOOTCAMP 40.1 GB disk0s3


/dev/disk1 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk1

1: EFI EFI 209.7 MB disk1s1

2: Apple_HFS HighSierra 999.3 GB disk1s2

3: Apple_Boot Recovery HD 650.0 MB disk1s3



sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

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 236978175

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 158339032 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

158748672 78225408 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

236974080 4063

236978143 32 Sec GPT table

236978175 1 Sec GPT header

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.

disk0s2 can't mount - Partition shows as "MBR part 255"

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