Accidently deleted Bootcamp from DU and now can't start Mac OS

So I made a really dumb mistake and deleted my mac partition in DU instead of going through Bootcamp Assistant. Nothing happened at the time but upon restarting my Mac I got the infamous folder with the question mark. I did the Internet Recovery and entered OS X Utilities. It appears all my data and files are on my original partition still so I didn't lose them and after verifying it, it appears ok.


My question is, how do I get my Mac OS back from here without losing my data? Will going 'Reinstall OS X' do a fresh install and delete my data? I also don't have a backup, which is worrying.


I also do want to get my full 500gb for my Mac OS but I'll deal with this problem first.


Thanks for any help


Posted on Oct 27, 2020 3:57 AM

Reply
40 replies

Nov 2, 2020 5:20 AM in response to thwaitesy

thwaitesy wrote:

Last login: Mon Nov  2 18:56:58 on console

cams-MacBook-Pro:~ cam$ diskutil list

/dev/disk0 (internal, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *500.3 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:          Apple_CoreStorage Macintosh HD            404.4 GB   disk0s2

   3:                  Apple_HFS                         650.0 MB   disk0s3

   4:                  Apple_HFS BOOTCAMP                94.9 GB    disk0s4

Your BC partition was erased (not removed). Run


diskutil repairDisk disk0


and post the output. We may need to run fsck_hfs, if necessary.


Can you download and install GPT Fdisk (https://sourceforge.net/projects/gptfdisk/)? Your Recovery HD (disk0s3) is also not a valid file system.


/dev/disk1 (internal, virtual):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:                  Apple_HFS Macintosh HD           +404.0 GB   disk1

                                 Logical Volume on disk0s2

                                 A273065A-5AA5-43F5-B5E6-EF8D43F51789

                                 Unencrypted

This the CS-contained HFS file system.


/dev/disk2 (external, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *2.0 TB     disk2

   1:                        EFI EFI                     209.7 MB   disk2s1

   2:                  Apple_HFS UNTITLED                2.0 TB     disk2s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk2s3

This seems to be your external disk. You should also be able to see the HFS+ volume on the internal disk with your files.

Nov 6, 2020 10:06 AM in response to thwaitesy

Step 1. We need to correct disk0s3. It is your Recovery HD. BCA recreated a second copy, since it did not find one.


Run (do not enter text like this).


sudo gdisk /dev/disk0

p (print current GPT)

t (Change partition type)

3 (GPT3)

AB00 (Apple Boot aka Recovery HD)

p (print GPT)

w (write updated GPT)

y (confirm, if needed)


Run


diskutil repairDisk disk0


and post the output of the session.


Oct 31, 2020 2:04 PM in response to thwaitesy

To be able to download files, your internal macOS partition must be mountable. Booting from an external macOS storage device will allow us to do that. If you current have Mavericks (10.9), I do not recommend using it on a Sierra (10.12) partition/disk.


If you can find a larger USB3 disk, we can install/upgrade to match the internal disk and then see what can be done.


You may also want to consider booting into Single-User Mode (Command+S as noted in Mac startup key combinations - Apple Support) and we can try to repair macOS, without an external boot.

Oct 27, 2020 2:19 PM in response to Loner T

Sorry, you are right. I could have explained that a lot better.


I mean I deleted my Windows partition (titled bootcamp) while I was in Mac OS through Disc Utility. I realised later that I should have done it through Boot Camp Assistant.


So once I install Mac OS on a external hard drive there is a way to add what is necessary to get the 'Macintosh HD' back to normal again?

Oct 28, 2020 2:59 AM in response to Loner T

Thanks, I installed it on a USB I had and it works. Although it took a while and is a bit slow but I am guessing that is to do with the USB. It installed Mavericks which is what the Mac would have come with, and the 'Macintosh HD' I can't access had Sierra on it, not sure if this matters.


Are you able to help me with the next step? Thanks a lot!

Oct 31, 2020 2:59 AM in response to Loner T

I’ve been having a hard time updating to Sierra. It keeps failing. But I had a thought. Am I able to just copy my files from the ‘Users’ folder and then just do a complete clean install on my Macintosh HD? I only really care for my Music, Final Cut libraries and various work that I have saved in folders (I can download any apps and programs I had again).


Is there anything stored outside of this users folder that I should be sure to keep? Ideally if I could just have a fresh start with one partition (the full 500gb) and copy the files I need over later, that would be fine.

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.

Accidently deleted Bootcamp from DU and now can't start Mac OS

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