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 9, 2018 1:09 PM in response to Loner T

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

The partition map appears to be OK

Finished partition map repair on disk0

Aug 11, 2018 4:47 AM in response to Loner T

sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 1.0.4


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present


Found valid GPT with protective MBR; using GPT.


Command (? for help): t

Partition number (1-3): 2

Current type is 'Apple APFS'

Hex code or GUID (L to show codes, Enter = AF00): AF05

Changed type of partition to 'Apple Core Storage'


Command (? for help):

Aug 8, 2018 4:17 PM in response to Loner T

Device Identifier: disk0

Device Node: /dev/disk0

Whole: Yes

Part of Whole: disk0

Device / Media Name: APPLE SSD SD128E


Volume Name: Not applicable (no file system)

Mounted: Not applicable (no file system)

File System: None


Content (IOContent): GUID_partition_scheme

OS Can Be Installed: No

Media Type: Generic

Protocol: SATA

SMART Status: Verified


Disk Size: 121.3 GB (121332826112 Bytes) (exactly 236978176 512-Byte-Units)

Device Block Size: 512 Bytes


Read-Only Media: No

Read-Only Volume: Not applicable (no file system)


Device Location: Internal

Removable Media: Fixed


Solid State: Yes

Virtual: No

Hardware AES Support: No

Aug 11, 2018 5:01 PM in response to langridgedean

Ran a couple of other commands to see the results. Still an error in verifying the volume:


diskutil verifyDisk /dev/disk0

Started partition map verification on disk0

Checking prerequisites

Checking the partition list

Checking the partition map size

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 Core Storage Physical Volume partitions

The partition map appears to be OK

Finished partition map verification on disk0


diskutil verifyVolume /dev/disk0s2

Started file system verification on disk0s2

Error: -69564: Unable to find an APFS Container Reference

Aug 13, 2018 7:40 PM in response to langridgedean

langridgedean wrote:


https://apple.stackexchange.com/questions/221114/how-to-fix-broken-gpt-guid-and- unmountable-no-type-volumes


This assumes that you have a CS LV/LVG, but with APFS on High Sierra, this causes issues.


langridgedean wrote:



https://apple.stackexchange.com/questions/220018/macbook-does-not-mount-does-not -boot-does-not-read-drive


This is a really messy GPT, with a triple-boot configuration, and at least two Recovery HDs.


langridgedean wrote:



manually repair GUID table

"Missing Operating System"

I really need help! Bootcamp Partition GONE! Loner T please Help!


Using Disk Utility to resize partitions, on a legacy BIOS system, causes GPT vs MBR issues. Hybrid MBRs can be very nasty. See http://www.rodsbooks.com/gdisk/hybrid.html as a reference.


langridgedean wrote:



https://www.cnet.com/news/tackle-stubborn-disk-partitioning-in-os-x/

Topher Kessler used to post on ASC. Sad that he no longer posts here. I do not recommend using Fdisk on GPT-only disks. It is very nasty.


langridgedean wrote:


Main partition, disk0s2 won't mount after resizing Bootcamp partition | MacRumors Forums


Very similar to the previous ASC posts about Bootcamp resizing.

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.