jolartiUS

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

Close

Q: Where does a partition go when formatting it to 'free space' in terminal?

  • All replies
  • Helpful answers

  • by Leopardus,

    Leopardus Leopardus Sep 12, 2016 7:07 AM in response to jolartiUS
    Level 4 (1,092 points)
    Desktops
    Sep 12, 2016 7:07 AM in response to jolartiUS

    Hi JolartiUS,

     

    Give us the output of :

     

    diskutil list

     

    and

     

    diskutil info -all

     

    That will give us an overview

     

    Leo

  • by jolartiUS,

    jolartiUS jolartiUS Sep 12, 2016 9:56 AM in response to Leopardus
    Level 1 (4 points)
    Notebooks
    Sep 12, 2016 9:56 AM in response to Leopardus

    Hi, "diskutil info -all" doesn't work. Terminal reports the fun comment "Could not find disk: -all"...

     

    I already did a "diskutil list",

    it's in the top of my code.

     

    As you can see there, the situation before was:

     

    ~$ 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

     

    And after it became:

     

    ~$ 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 LEEG3                  4.9 GB    disk0s4
    5:                  Apple_HFS LEEG4                  42.9 GB    disk0s5

    /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



    All I  need to know really is what the format "free" actually did to the now lost data of appr. 3.9 Gig.

  • by Leopardus,

    Leopardus Leopardus Sep 12, 2016 11:39 AM in response to jolartiUS
    Level 4 (1,092 points)
    Desktops
    Sep 12, 2016 11:39 AM in response to jolartiUS

    It might be possible that you made a typing mistake. The command is correct and you should get an output that reflects something akin to this:

     

     

    server:~ bbbbbbb$ diskutil info -all

       Device Identifier:        disk0

       Device Node:              /dev/disk0

       Whole:                    Yes

       Part of Whole:            disk0

       Device / Media Name:      M4-CT256M4SSD2

     

       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

     

       Total Size:               256.1 GB (256060514304 Bytes) (exactly 500118192 512-Byte-Units)

       Volume Free Space:        Not applicable (no file system)

       Device Block Size:        512 Bytes

     

       Read-Only Media:          No

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

     

       Device Location:          Internal

       Removable Media:          No

     

       Solid State:              Yes

       Virtual:                  No

       OS 9 Drivers:             No

       Low Level Format:         Not supported

     

    **********

     

       Device Identifier:        disk0s1

       Device Node:              /dev/disk0s1

       Whole:                    No

       Part of Whole:            disk0

       Device / Media Name:      EFI System Partition

     

       Volume Name:              Not applicable (no file system)

     

       Mounted:                  Not applicable (no file system)

     

       File System:              None

     

       Partition Type:           EFI

       OS Can Be Installed:      No

       Media Type:               Generic

       Protocol:                 SATA

       SMART Status:             Verified

       Volume UUID:              0E239BC6-F960-3107-89CF-1C97F78BB46B

       Disk / Partition UUID:    D184872B-1CA5-4EFF-BB34-8E7A3339FAAE

     

       Total Size:               209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Units)

       Volume Free Space:        Not applicable (no file system)

       Device Block Size:        512 Bytes

     

       Read-Only Media:          No

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

     

       Device Location:          Internal

       Removable Media:          No

     

       Solid State:              Yes

     

    **********

    etc etc

    **********

     

       Device Identifier:        disk4s5

       Device Node:              /dev/disk4s5

       Whole:                    No

       Part of Whole:            disk4

       Device / Media Name:      Untitled

     

       Volume Name:              Toshiba_Xtr

     

       Mounted:                  Yes

       Mount Point:              /Volumes/Toshiba_Xtr

     

       File System Personality:  Journaled HFS+

       Type (Bundle):            hfs

       Name (User Visible):      Mac OS Extended (Journaled)

       Journal:                  Journal size 114688 KB at offset 0x2b4c000

       Owners:                   Enabled

     

     

       Partition Type:           Apple_HFS

       OS Can Be Installed:      Yes

       Media Type:               Generic

       Protocol:                 USB

       SMART Status:             Not Supported

       Volume UUID:              086CFC53-5F5D-34BE-81AB-99FE6314B5AE

       Disk / Partition UUID:    BCB7743C-79BF-4E74-9963-DD73BB4C8950

     

       Total Size:               1.5 TB (1487270735872 Bytes) (exactly 2904825656 512-Byte-Units)

       Volume Free Space:        1.4 TB (1350720163840 Bytes) (exactly 2638125320 512-Byte-Units)

       Device Block Size:        512 Bytes

       Allocation Block Size:    4096 Bytes

     

       Read-Only Media:          No

       Read-Only Volume:         No

     

       Device Location:          External

       Removable Media:          No

     

     

    **********

     

    server:~

  • by jolartiUS,

    jolartiUS jolartiUS Sep 12, 2016 12:16 PM in response to Leopardus
    Level 1 (4 points)
    Notebooks
    Sep 12, 2016 12:16 PM in response to Leopardus

    Nope, sorry, no typo here. I've retyped and retyped + even copied this command from some other sites and pages but it doesn't return anything for me, not even on my other Macs' terminals!

    They all go "Could not find disk: -all"

     

    I could of course type the disks seperately:

    $ diskutil info disk0

    $ diskutil info disk0s1

    $ diskutil info disk0s2

    $ diskutil info disk0s3

    $ diskutil info disk0s4

    but I guess that won't ever show where my free space went.

     

    And I feel like doing this is off topic of the question? Since all I need to know is: what happens when you format a partition into 'free'.

  • by Leopardus,

    Leopardus Leopardus Sep 12, 2016 11:39 PM in response to jolartiUS
    Level 4 (1,092 points)
    Desktops
    Sep 12, 2016 11:39 PM in response to jolartiUS

    jolartiUS wrote:

     

    Nope, sorry, no typo here. I've retyped and retyped + even copied this command from some other sites and pages but it doesn't return anything for me, not even on my other Macs' terminals!

    ......

     

    And I feel like doing this is off topic of the question? Since all I need to know is: what happens when you format a partition into 'free'.

    My eyes are good, really good, I even passed my last flying medical at over 60 years, but not good enough to see what you have done and maybe didn't mention. To enable us to help you, depends also on your own behaviour and your answers to our questions.

     

    Directly from Apple when you type 'info diskutil' to get all the available options and what you can expect to get from the command: (Edit: you might need to disable SIP for some commands to work?)

     

    info diskutil

     

                    listFilesystems -plist for more detailed information.

     

                    See the DEVICES section below for the various forms that the

                    device specification may take for this and all of the other

                    diskutil verbs.

     

                    The top-to-bottom appearance of partitions in diskutil list

                    always indicates the on-disk ordering.  BSD disk identifiers

                    may, in certain circumstances, not appear in slice-numerical

                    order when viewed this way.  This is normal and is likely the

                    result of a recent partition map editing operation in which

                    volumes were kept mounted.

     

         info | information [-plist] device | -all

                    Get detailed information about a specific whole disk or parti-

                    tion.  If -plist is specified, then a property list instead of

                    the normal user-readable output will be emitted. If -all is

                    specified, then all disks (whole disks and their partitions)

                    are processed.