The Macintosh HD doesn't show when I start the MacBook

I was trying to delete the Windows by boot camp and I believe that I typed wrong commands in Terminal that deleted the Macintosh HD.

How I can recover my data and make the Macintosh HD appears again?

This is what I got using the terminal in Mac recovery base system


-bash-3.2# fdisk /dev/disk0

Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 63 [ 1 - 490234751] <Unknown ID>

2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

-bash-3.2# diskutil unmount disk0

disk0 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead

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

gpt remove: unable to open device '/dev/disk0': Resource busy

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

gpt remove: unable to open device '/dev/disk0': Resource busy

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

gpt add: unable to open device '/dev/disk0': Resource busy

-bash-3.2# diskutil unmount disk0

disk0 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead

-bash-3.2# gpt add -i 3 -b 410566656 -s 79142912 -t hfs /dev/disk0

gpt add: unable to open device '/dev/disk0': Resource busy

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

gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

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 490234751

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 410157016 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

410566656 79142912 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

489709568 525151

490234719 32 Sec GPT table

490234751 1 Sec GPT header

-bash-3.2# 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: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 210.0 GB disk0s2

3: Apple_HFS BOOTCAMP 40.5 GB disk0s3


/dev/disk1 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme +2.1 GB disk1

1: Apple_HFS OS X Base System 2.0 GB disk1s1


/dev/disk2 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +5.2 MB disk2


/dev/disk3 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk3


/dev/disk4 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk4


/dev/disk5 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk5


/dev/disk6 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +2.1 MB disk6


/dev/disk7 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk7


/dev/disk8 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk8


/dev/disk9 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +12.6 MB disk9


/dev/disk10 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +4.2 MB disk10


/dev/disk11 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +1.0 MB disk11


/dev/disk12 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +2.1 MB disk12


/dev/disk13 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk13


/dev/disk14 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk14


/dev/disk15 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +1.0 MB disk15


/dev/disk16 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +6.3 MB disk16


/dev/disk17 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +6.3 MB disk17


/dev/disk18 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +524.3 KB disk18


/dev/disk19 (disk image):

#: TYPE NAME SIZE IDENTIFIER

0: untitled +2.1 MB disk19

Posted on Oct 3, 2018 3:16 PM

Reply

Similar questions

22 replies

Oct 5, 2018 6:48 AM in response to Loner T

/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_APFS Container disk1 210.0 GB disk0s2

3: Apple_HFS BOOTCAMP 40.5 GB disk0s3


/dev/disk1 (synthesized):

#: TYPE NAME SIZE IDENTIFIER

0: APFS Container Scheme - +210.0 GB disk1

Physical Store disk0s2

1: APFS Volume Macintosh HD 192.3 GB disk1s1

2: APFS Volume Preboot 44.0 MB disk1s2

3: APFS Volume Recovery 512.4 MB disk1s3

4: APFS Volume VM 1.1 GB disk1s4

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.

The Macintosh HD doesn't show when I start the MacBook

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