2

I was attempting to install Lion on my MacBook 7-1, on which I have installed Ubuntu 10.04 on a separate partition. Currently, my partitions look like this:

|-----Mac-----|-Grub-|----Ubuntu----|-Ubuntu Swap-|.

However, Disk Utility (and I assume the rest of Mac OS X) sees it as

|-----Mac-----|-----Unknown-----|.

Note that I am using rEfit as my default bootloader. When attempting to install Lion, I am greeted by this screen:

Install Mac OS X. Macintosh HD cannot be used to start up your computer. Untitled is locked.

By the way, it appears that only the Grub partition is recognized, as I remember setting it to about 10 MB.

Can anyone help with this?

Edit: I ran the commands in one of the answers below, and got this (sorry about the huge dump - if anyone has a better way to do this please tell me!):

bash-3.2$ sudo gpt -rvvv show -l /dev/disk0
gpt show: /dev/disk0: mediasize=250059350016; sectorsize=512; blocks=488397168
gpt show: /dev/disk0: Suspicious MBR at sector 0
gpt show: /dev/disk0: MBR part: type=175, start=409640, size=204804670
gpt show: /dev/disk0: MBR part: type=7, start=205214310, size=16065
gpt show: /dev/disk0: MBR part: type=131, start=205230375, size=281274073
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=204804670
gpt show: /dev/disk0: GPT partition: type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, start=205214310, size=16065
gpt show: /dev/disk0: GPT partition: type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, start=205230375, size=281274073
gpt show: /dev/disk0: GPT partition: type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, start=486504448, size=1892352
gpt show: /dev/disk0: Sec GPT at sector 488397167
      start       size  index  contents
          0          1         MBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - "EFI System Partition"
     409640  204804670      2  GPT part - "NotQuiteMaxDisk"
  205214310      16065      3  GPT part - ""
  205230375  281274073      4  GPT part - ""
  486504448    1892352      5  GPT part - ""
  488396800        335         
  488397135         32         Sec GPT table
  488397167          1         Sec GPT header
bash-3.2$ !502
sudo pdisk
Top level command (? for help): L
pdisk: No valid block 1 on '/dev/rdisk0'
Top level command (? for help): ^C
bash-3.2$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            104.9 GB   disk0s2
   3:       Microsoft Basic Data                         8.2 MB     disk0s3
   4:       Microsoft Basic Data                         144.0 GB   disk0s4
   5:                 Linux Swap                         968.9 MB   disk0s5
bash-3.2$ diskutil info disk0
   Device Identifier:        disk0
   Device Node:              /dev/disk0
   Part Of Whole:            disk0
   Device / Media Name:      TOSHIBA MK2555GSXF Media

   Volume Name:              
   Escaped with Unicode:     

   Mounted:                  No

   File System:              None

   Partition Type:           GUID_partition_scheme
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               250.1 GB (250059350016 Bytes) (exactly 488397168 512-Byte-Blocks)
   Volume Free Space:        Not Applicable

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no filesystem)
   Ejectable:                No

   Whole:                    Yes
   Internal:                 Yes
   OS 9 Drivers:             No
   Low Level Format:         Not Supported

bash-3.2$ diskutil info disk0s1
   Device Identifier:        disk0s1
   Device Node:              /dev/disk0s1
   Part Of Whole:            disk0
   Device / Media Name:      EFI System Partition

   Volume Name:              
   Escaped with Unicode:     

   Mounted:                  No

   File System:              None

   Partition Type:           EFI
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Blocks)
   Volume Free Space:        Not Applicable

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no filesystem)
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes

bash-3.2$ diskutil info disk0s2
   Device Identifier:        disk0s2
   Device Node:              /dev/disk0s2
   Part Of Whole:            disk0
   Device / Media Name:      NotQuiteMaxDisk

   Volume Name:              Macintosh HD
   Escaped with Unicode:     Macintosh%FF%FE%20%00HD

   Mounted:                  Yes
   Mount Point:              /
   Escaped with Unicode:     /

   File System:              Journaled HFS+
   Type:                     hfs
   Name:                     Mac OS Extended (Journaled)
   Journal:                  Journal size 24576 KB at offset 0x15502000
   Owners:                   Enabled

   Partition Type:           Apple_HFS
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified
   Volume UUID:              548F5495-BE2A-3040-9931-357E326735FF

   Total Size:               104.9 GB (104859991040 Bytes) (exactly 204804670 512-Byte-Blocks)
   Volume Free Space:        63.1 GB (63063998464 Bytes) (exactly 123171872 512-Byte-Blocks)

   Read-Only Media:          No
   Read-Only Volume:         No
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes

bash-3.2$ diskutil info disk0s3
   Device Identifier:        disk0s3
   Device Node:              /dev/disk0s3
   Part Of Whole:            disk0
   Device / Media Name:      Untitled 3

   Volume Name:              
   Escaped with Unicode:     

   Mounted:                  Yes
   Mount Point:              /Volumes/Untitled
   Escaped with Unicode:     /Volumes/Untitled

   File System:              NTFS
   Type:                     ntfs
   Name:                     Windows NT File System (NTFS)

   Partition Type:           Microsoft Basic Data
   Bootable:                 Is bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified
   Volume UUID:              1FF3673B-FFEE-1049-B454-5916056E4B86

   Total Size:               8.2 MB (8225280 Bytes) (exactly 16065 512-Byte-Blocks)
   Volume Free Space:        7.5 MB (7495680 Bytes) (exactly 14640 512-Byte-Blocks)

   Read-Only Media:          No
   Read-Only Volume:         Yes
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes

bash-3.2$ diskutil info disk0s4
   Device Identifier:        disk0s4
   Device Node:              /dev/disk0s4
   Part Of Whole:            disk0
   Device / Media Name:      Untitled 4

   Volume Name:              
   Escaped with Unicode:     

   Mounted:                  No

   File System:              MS-DOS
   Type:                     msdos
   Name:                     MS-DOS (FAT)

   Partition Type:           Microsoft Basic Data
   Bootable:                 Is bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               144.0 GB (144012325376 Bytes) (exactly 281274073 512-Byte-Blocks)
   Volume Free Space:        0 B (0 Bytes) (exactly 0 512-Byte-Blocks)

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (not mounted)
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes

bash-3.2$ diskutil info disk0s5
   Device Identifier:        disk0s5
   Device Node:              /dev/disk0s5
   Part Of Whole:            disk0
   Device / Media Name:      Untitled 5

   Volume Name:              
   Escaped with Unicode:     

   Mounted:                  No

   File System:              None

   Partition Type:           Linux Swap
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               968.9 MB (968884224 Bytes) (exactly 1892352 512-Byte-Blocks)
   Volume Free Space:        Not Applicable

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no filesystem)
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes

bash-3.2$ 

2 Answers 2

2

Warning for all of the below: there's at least a slight possibility that trying to fix the disk structure will actually make things worse, possibly even making your various volumes unreadable. Back up everything important before attempting any of these fixes.

Apple's KB article #TS3926 recommends either a full backup & reformat (probably not the preferred option in your case), or using Disk Utility to shrink the partition slightly and then expand it back out. I'm not sure of the details, but I think the idea behind the latter suggestion is to force Disk Utility to rewrite the partition tables, and thus maybe fix anything that's wrong with them (see @Spiff's answer).

Another thing to try is running Disk Utility's Verify Disk process with the actual disk (not one of its volumes) selected in the sidebar. This runs checks on the partition tables and such (as opposed to running it with a volume selected, in which case it checks the data structures within that volume). Depending on what it says, you might want to try the Repair Disk option and see if that fixes it.

1
  • Alright; this finally worked. However, a couple notes: I got the same problem (and the same answer worked) as on this page. In addition, a Repair Disk found and fixed errors, but didn't help. Finally, the issue is not rebuilding the partition tables, but that the installer needs 128M of free space after the partition (so I shrunk the partition by .2G). Thanks tons for your help!
    – lily
    Apr 23, 2012 at 21:50
2

I'm guessing the rEFIt/Grub/Ubuntu installation screwed up your GUID Partition Table (GPT) or your Pseudo Master Boot Record (PMBR). Now the Lion installer doesn't recognize it as a properly-formed GPT and doesn't think it should let you install to any HFS+ partitions on that disk, because it doesn't think the EFI bootROM will be able to find and boot from that partition.

It might be interesting to use Mac OS X's gpt(8) command-line utility to see what it thinks of your GPT:

sudo gpt -rvvv show -l /dev/disk0

You could also see what Mac OS X's pdisk(8) utility thinks of your PMBR:

sudo pdisk

(then hit 'L')

You could also see how those compare to what diskutil(8) tells you:

diskutil list
diskutil info disk0
diskutil info disk0s1
diskutil info disk0s2
.
.
.
diskutil info disk0sN

I don't know of a tool for verifying the well-formed-ness of your GPT and PMBR and make making sure the two agree with each other. But if you can find such a tool, I'd recommend you run it.

Update: Based on the new data you posted, I say go with @Gordon Davisson's Answer.
I think Mac OS X doesn't like the way that rEFIt/Grub/Ubuntu messed with the PMBR, which is why gpt calls it a "Suspicious MBR". I also find it worrisome that the MBR only knows about 3 out of the 5 partitions that the GPT knows about. Gordon pointed out how to use Disk Utility to verify your partition tables and not just your individual partitions, and pointed to a good article on how to use Disk Utility to fix it. But like the article says, back up the entire disk first just in case.

2
  • I added the results.
    – lily
    Dec 6, 2011 at 1:01
  • @Arafinwe Okay, I updated my Answer, but the short version is, "Go with Gordon Davisson's Answer."
    – Spiff
    Dec 6, 2011 at 2:33

You must log in to answer this question.

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