I wrongly made two partitions with Boot Camp in the following way:
I found many solutions around the web but I don't want to lose any data from my hard drive.
How can I merge the partitions via terminal or any program?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Using the Disk Utility will not erase anything from Macintosh HD.
First, copy any file there can be on
Macintosh HD that you don't want to lose (if there's nothing on
Open the Disk Utility (it's in /Applications/Utilities). In the left bar, select your hard drive. From there, click the "Partition" tab in the right pane.
You'll see the "physical" partitioning of your drive there.
Untitled partition, and click the minus sign. The Disk Utility will ask you to confirm your choice, and will tell you that no other partition will be affected. Proceed.
(No more screenshots from here, because I didn't want to delete my Windows partition.) Once done, drag the bottom-right corner of your
Macintosh HD drive to the bottom of the rectangle, and click "Apply". Disk Utility will possibly ask you to confirm again.