Lion 拒绝安装到 Mac 上的任何分区

Lion 拒绝安装到 Mac 上的任何分区

我试图在我的 MacBook 7-1 上安装 Lion,我在它的一个单独分区上安装了 Ubuntu 10.04。目前,我的分区如下所示:

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

然而,磁盘工具(我认为 Mac OS X 的其余部分也是如此)将其视为

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

请注意,我使用 rEfit 作为我的默认引导程序。当尝试安装 Lion 时,我看到了以下屏幕:

安装 Mac OS X。Macintosh HD 无法用于启动您的计算机。无标题已被锁定。

顺便说一句,似乎只有 Grub 分区被识别,因为我记得将其设置为大约 10 MB。

有人能帮忙吗?

编辑:我在下面的一个答案中运行了命令,并得到了这个(抱歉,信息量太大了 - 如果有人有更好的方法,请告诉我!):

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$ 

答案1

以下所有情况均需注意:尝试修复磁盘结构至少有可能会让情况变得更糟,甚至可能使你的各个卷无法读取。备份所有重要文件尝试任何这些修复。

苹果知识库文章 #TS3926建议进行完整备份和重新格式化(这可能不是您的首选方案),或者使用磁盘实用程序稍微缩小分区然后再将其扩大。我不确定细节,但我认为后一个建议背后的想法是强制磁盘实用程序重写分区表,从而可能修复其中的任何错误(请参阅@Spiff 的回答)。

另一个可以尝试的方法是在侧边栏中选择实际磁盘(而不是其卷之一)的情况下运行“磁盘实用程序”的“验证磁盘”过程。这将对分区表等进行检查(而不是在选择卷的情况下运行它,在这种情况下它会检查该卷内的数据结构)。根据它所说的内容,您可能想尝试“修复磁盘”选项,看看它是否能解决问题。

答案2

我猜 rEFIt/Grub/Ubuntu 安装搞砸了您的 GUID 分区表 (GPT) 或伪主引导记录 (PMBR)。现在 Lion 安装程序无法将其识别为正确格式的 GPT,并且认为它不应该让您安装到该磁盘上的任何 HFS+ 分区,因为它认为 EFI bootROM 无法找到并从该分区启动。

使用 Mac OS X 的gpt(8)命令行实用程序来查看它对您的 GPT 的看法可能会很有趣:

sudo gpt -rvvv show -l /dev/disk0

您还可以看到 Mac OS Xpdisk(8)实用程序对您的 PMBR 的看法:

sudo pdisk

(然后按“L”)

您还可以看到它们与以下内容的比较diskutil(8)

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

我不知道有什么工具可以验证 GPT 和 PMBR 的格式是否正确,并确保两者一致。但如果你能找到这样的工具,我建议你运行它。

更新:根据您发布的新数据,我建议您使用@Gordon Davisson 的答案。
我认为 Mac OS X 不喜欢 rEFIt/Grub/Ubuntu 弄乱 PMBR 的方式,这就是为什么gpt将其称为“可疑 MBR”。我还发现 MBR 只知道 GPT 知道的 5 个分区中的 3 个,这令人担忧。Gordon 指出了如何使用磁盘实用程序来验证分区表而不仅仅是单个分区,并指出了一篇关于如何使用磁盘实用程序修复它的好文章。但就像文章所说的那样,为了以防万一,请先备份整个磁盘。

相关内容