1

This is imported from Superuser, I felt like I would have an easier time getting an answer here than in Superuser - it is copy pasted, as below.


So, I have some strange issues in Disk Utility and diskutil. It's not a problem (hopefully), but I just want to make sure that I'm not on the path to disk corruption or failure. This is how my disk utility reads my hard disk:

(as they are listed)

  • Disk Description : APPLE SSD SD0256F Media
  • Total Capacity : 251 GB (251,000,193,024 Bytes)
  • Connection Bus : PCI
  • Write Status : Read/Write
  • Type and Location : Solid State Disk, Internal
  • S.M.A.R.T. Status : Verified
  • Partition Map Scheme : GUID Partition Table

And here are the partitions:

  • Macintosh HD
    • Format : Mac OS Extended (journaled)
    • Size : 202.66 GB
  • Recovery HD
    • Format : Mac OS Extended (journaled)
    • Size : 650 MB
  • disk0s4
    • Format : Mac OS Extended (journaled)
    • Size : 46.8 GB
  • disk0s6
    • Format : Linux Swap
    • Size : 681.6 MB

The reason for my worry is two things: 1) Recovery HD is visible, which, I could be mistaken, but this shouldn't be visible OR mounted in Disk Utility, and 2) disk0s4 is actually ext4, NOT JHFS+.

Output from diskutil list:

    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *251.0 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            202.7 GB   disk0s2
       3:                  Apple_HFS Recovery HD             650.0 MB   disk0s3
       4: 0FC63DAF-8483-4772-8E79-3D69D8477DE4               46.8 GB    disk0s4
       5:                 Linux Swap                         681.6 MB   disk0s6

And from gdisk...

    >sudo gdisk /dev/disk0
    Password:
    GPT fdisk (gdisk) version 1.0.0

    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present

    Found valid GPT with hybrid MBR; using GPT.

    Command (? for help): p
    Disk /dev/disk0: 490234752 sectors, 233.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): B01E51EA-D531-4CA4-ADA4-A936F8C27DCD
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 490234718
    Partitions will be aligned on 8-sector boundaries
    Total free space is 949 sectors (474.5 KiB)

    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640       396222607   188.7 GiB   AF00  Macintosh HD
       3       396222608       397492143   619.9 MiB   AF00  Recovery HD
       4       397492224       488902655   43.6 GiB    8300  
       6       488902656       490233855   650.0 MiB   8200  Apple_HFS_Untitled_2

    Command (? for help): ^C>

gpt has this output -

    >sudo gpt -vvv show /dev/disk0
    Password:
    gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752
    gpt show: /dev/disk0: Suspicious MBR at sector 0
    gpt show: /dev/disk0: MBR part: type=175, start=409640, size=395812968
    gpt show: /dev/disk0: MBR part: type=175, start=396222608, size=1269536
    gpt show: /dev/disk0: MBR part: type=131, start=397492224, size=91410432
    gpt show: /dev/disk0: Pri GPT at sector 1
    gpt show: /dev/disk0: GPT partition: type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, start=40, size=409600
    gpt show: /dev/disk0: GPT partition: type=48465300-0000-11AA-AA11-00306543ECAC, start=409640, size=395812968
    gpt show: /dev/disk0: GPT partition: type=48465300-0000-11AA-AA11-00306543ECAC, start=396222608, size=1269536
    gpt show: /dev/disk0: GPT partition: type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, start=397492224, size=91410432
    gpt show: /dev/disk0: GPT partition: type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, start=488902656, size=1331200
    gpt show: /dev/disk0: Sec GPT at sector 490234751
          start       size  index  contents
              0          1         MBR
              1          1         Pri GPT header
              2         32         Pri GPT table
             34          6         
             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
         409640  395812968      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      396222608    1269536      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      397492144         80         
      397492224   91410432      4  GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
      488902656    1331200      6  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
      490233856        863         
      490234719         32         Sec GPT table
      490234751          1         Sec GPT header

and fdisk...:

    >sudo 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    0   0   1 - 1023 254  63 [         1 -     409639] <Unknown ID>
    *2: AF 1023 254  63 - 1023 254  63 [    409640 -  395812968] HFS+        
     3: AF 1023 254  63 - 1023 254  63 [ 396222608 -    1269536] HFS+        
     4: 83 1023 254  63 - 1023 254  63 [ 397492224 -   91410432] Linux files*

I have used gdisk before to make my hard drive hybridized MBR/GPT and have installed Ubuntu 14.04.

Anyone have an inkling to why this is, where is disk0s5, and will this be a problem?

1

If you want better answers, try refining your question. Also, post a comment after my answer, so I will be notified.

Question:

1) Recovery HD is visible, which, I could be mistaken, but this shouldn't be visible OR mounted in Disk Utility

Answer:

In the MBR partition table, the id should be AB and you have AF. In the GPT, the partition type should be 426F6F74-0000-11AA-AA11-00306543ECAC and you have48465300-0000-11AA-AA11-00306543ECAC. This is why it is visible.

Question:

2) disk0s4 is actually ext4, NOT JHFS+.

Answer:

You used the gdisk to change the partition type code for disk0s4 from AF00 to 8300 while disk0s4 while it was still mounted. The Disk Utility application will not see the change until you unmount and mount disk0s4.

Question:

where is disk0s5

Answer:

Currently, the fifth entry in the GPT is not being used. You have not given any information regarding the values in this table entry, other than due to its absence the partition type must be 00000000-0000-0000-0000-000000000000. For all anyone knows, the UUID, attributes, label and starting/ending sector numbers may still be stored in the fifth table entry.

Note: I have observed the Disk Utility application requires the entries in the GPT to be in ascending order and contiguous. The output of the gpt command shows the indices to be in ascending order, but since the fifth entry is missing, the indices are not contiguous. When a situation like this occurs, the Disk Utility application can incorrectly display the contents of the GPT. In your case, the errors shown by the Disk Utility application where most likely caused by the use of gdisk.

Why did you use a BIOS/MBR install of Ubuntu? I know you can download such an iso, but the EFI/GPT iso version also works on Mac's. This is what I choose for my mid 2007 20-inch iMac. This way you can avoid using a hybrid GPT.

  • Questions 1) and 3) are well enough answered - thank you for that. I have somehow resolved Question 3) with disk verification and repair, and I don't really mind the Recovery partition showing up. In Question 2), the situation has changed but Disk Utility still is incorrect in the way that it identifies the partition: it now says that disk0s4 is formatted as MS-DOS, yet the partition is definitely ext4 (checked it with gparted). I feel as though the fault does not lie with my use of gdisk (as the partition has been remounted on the frequent reboots that I do), so is there another explanation? – Addison Crump Sep 2 '15 at 17:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .