Q: Where does a partition go when formatting it to 'free space' in terminal?
I may have done something absolutely terrible.
I had 4 partitions that I wanted to merge into one. So I started merging the first two (=disk0s4 and disk0s5). But instead of picking HFS+ I thought: wouldn't it be wonderful to format them all to 'free space' so I can install Linux on the merged partition?
So I just typed "diskutil mergePartitions free LEEG0 disk0s4 disk0s5"
But here is what happened:
~~~~~$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *512.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 459.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Apple_HFS LEEG1 2.0 GB disk0s4
5: Apple_HFS LEEG2 1.9 GB disk0s5
6: Apple_HFS LEEG3 4.9 GB disk0s6
7: Apple_HFS LEEG4 42.9 GB disk0s7
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *458.7 GB disk1
Logical Volume on disk0s2
14276EFF-5AA3-44C3-8A75-AF47B6C441F7
Unencrypted
~~~~~$ diskutil mergePartitions free LEEG0 disk0s4 disk0s5
The chosen disk does not support resizing.
Do you wish to format instead? (y/N) y
Merging partitions into a new partition
Start partition: disk0s4 LEEG1
Finish partition: disk0s5 LEEG2
Started partitioning on disk0
Merging partitions
Waiting for the disks to reappear
Formatting disk0s6 as Free Space with name LEEG0
Mounting disk
Finished partitioning on disk0
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *512.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 459.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Apple_HFS LEEG3 4.9 GB disk0s6
5: Apple_HFS LEEG4 42.9 GB disk0s7
Now when I look at the difference before and after merging, it seems the free space has disappeared!
The new partition with the name "LEEG0" is nowhere to be seen. Where did it go?
I am puzzled by this line:
Formatting disk0s6 as Free Space with name LEEG0
I can't see disk0s4 and disk0s5 being added to any of the other partitions. Can I retrieve LEEG0 in some way?
Disk0s6 now no longer exists.
The last disk is now named LEEG4 with ID disk0s4.
Can someone explain what happened and what would be the correct way to merge all these disks into something that I can install Linux into?
(Right now this won't work because it says I don't have enough free space).
MacBook Pro, OS X Yosemite (10.10.2)
Posted on Sep 12, 2016 5:27 AM