分区共享 - 搞砸了GPT / MBR


0

首先,对于任何英语错误或法语打印屏幕抱歉......我是比利时人。

我的iMac 2009 27“有很多问题,主要是Mac OS。奇怪的是,Windows(10)几乎没有问题,所以我最终决定只运行这台电脑。嗯...老实说,我甚至试图安装Ubuntu,但很快就放弃了。

我放弃Mac OS导致我重新分区驱动器...我保留了Mac OS驱动器,bootcamp一个,创建了一个共享分区,(以防万一,但我想删除它们)两个分区Linux(操作系统和交换)。

之后...... Windows拒绝启动。我设法找到了“修复”MBR(或GPT?)的解决方案。Windows靴子,但我不确定我做的一切都很完美。

我现在面临的一个大问题是,我想访问我的Share分区。我可以,从Mac OS。但是从windows中,我所有的其他分区都显示为“GPT保护分区”。我似乎无能为力。

在此输入图像描述

我希望能够访问此共享分区。更好的是,我想将这个共享分区与两个Linux分区合并。但我不想再丢失数据或拧掉我的MBR / GPT。

我目前在Windows上......当我的计算机变冷时,它将在Mac OS上启动(当温暖时它不会启动mac os,这是我的主要问题),并为您提供任何其他所需信息。

提前,谢谢你的帮助!

更多信息,您可能会问:

iMac-de-Antoine:~ antoine$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data LINUXOS                 32.0 GB    disk0s4
   5:       Microsoft Basic Data SWAP                    5.0 GB     disk0s5
   6:       Microsoft Basic Data DATA                    320.9 GB   disk0s6
   7:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s7



iMac-de-Antoine:~ antoine$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 1.0.1

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): i
Partition number (1-7): 7
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: A45E8584-415A-4B66-9E37-1FAA60981CC3
First sector: 1678133248 (at 800.2 GiB)
Last sector: 1953523711 (at 931.5 GiB)
Partition size: 275390464 sectors (131.3 GiB)
Attribute flags: 0000000000000000
Partition name: 'BOOTCAMP'



Command (? for help): i  
Partition number (1-7): 6
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: BEE4F0DE-2837-4C06-877F-3ADB72B1D173
First sector: 1051031584 (at 501.2 GiB)
Last sector: 1677871103 (at 800.1 GiB)
Partition size: 626839520 sectors (298.9 GiB)
Attribute flags: 0000000000000000
Partition name: 'DOS_FAT_32_Untitled_5'



Command (? for help): p
Disk /dev/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00002E14-03EA-0000-EA68-000054300000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 787861 sectors (384.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI system partition
   2          409640       976972135   465.7 GiB   AF00  Customer
   3       976972136       978241671   619.9 MiB   AB00  Recovery HD
   4       978241672      1040741671   29.8 GiB    0700  DOS_FAT_32_Untitled_4
   5      1041003816      1050769439   4.7 GiB     0700  DOS_FAT_32_Untitled_3
   6      1051031584      1677871103   298.9 GiB   0700  DOS_FAT_32_Untitled_5
   7      1678133248      1953523711   131.3 GiB   0700  BOOTCAMP

更多信息:

iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
gpt show: error: bogus map
gpt show: unable to open device '/dev/disk0': Undefined error: 0
iMac-de-Antoine:~ antoine$ 


iMac-de-Antoine:~ antoine$ sudo fdisk /dev/disk0
Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023 254  63 [         1 - 1678133247] <Unknown ID>
*2: 01 1023 254  63 - 1023 254  63 [1678133248 -  274468864] DOS FAT-12  
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     

我可以清楚地理解我搞砸了......但是不知道该怎么做才能修复。= /

新的,再次搞乱分区后:

iMac-de-Antoine:~ antoine$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5


iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
Password:
gpt show: /dev/disk0: Suspicious MBR at sector 0
       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   976562496      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   976972136     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
   978241672   699629432      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1677871104      262144         
  1678133248   275390464      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header


iMac-de-Antoine:~ antoine$ sudo fdisk /dev/disk0
Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [ 976972136 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] HPFS/QNX/AUX

新信息05-08-16:@david

Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>
 2: AF   25 127  15 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: 0B 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] Win95 FAT-32
*4: 07 1023 254  63 - 1023 254  63 [1678133248 -  275390464] HPFS/QNX/AUX



Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>
 2: AF   25 127  15 - 1023 254  63 [    409640 -  976562496] HFS+        
 3: 0B 1023 254  63 - 1023 254  63 [ 978241672 -  699629432] Win95 FAT-32
*4: 07 1023 254  63 - 1023 254  63 [1678133248 -  275390464] HPFS/QNX/AUX
iMac-de-Antoine:~ antoine$ sudo gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
       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   976562496      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   976972136     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
   978241672   699629432      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1677871104      262144         
  1678133248   275390464      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header



/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5



iMac-de-Antoine:~ antoine$ diskutil list /dev/disk0s4
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            500.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data DATA                    358.2 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                141.0 GB   disk0s5

屏幕截图没有多大帮助,因为共享和Linux分区都不可见。启动到OS X并进入sudo gpt -r show /dev/disk0终端或在Windows中安装一个不错的分区工具(适用于Windows的hmm gdisk应该可以工作)并发布结果。
klanomath 2016年

很好的工作填写@ klanomath的要求。你可以添加输出吗sudo fdisk /dev/disk0?此外,您使用的是什么版本的OS X. 我还可以假设要共享的分区是320.9 GB disk0s6吗?
大卫安德森

我明天会发布两个命令行的结果。对于其他问题:El Capitan,是的,disk0s6应该是共享的。我很乐意将它与s4和s5合并,如果可能的话没有风险,因为我放弃了安装ubuntu的想法。
capi-chou

我根据您的要求编辑了第一篇文章。我希望你有一个解决方案......
capi-chou 2016年

你必须在你的评论中放一个@David,否则我不会收到通知。发布评论时,请单击帮助以获取更多信息。
大卫安德森

Answers:


0

固定访问共享分区

要使Windows启动,您可以尝试gdisk从OS X 输入以下内容。在输入命令之前,您必须禁用系统完整性保护(SIP)。如果Windows启动,您将能够从Windows访问新的共享分区。如果Windows无法启动,请按照“不使用共享分区进行修复”一节中的说明进行操作。

Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1

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): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 4 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #4 (MBR partition #3)
Enter an MBR hex code (default 07): 0b
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$ 

无需访问共享分区即可完成修复

要使Windows启动,您可以尝试gdisk从OS X 输入以下内容。在输入命令之前,您必须禁用系统完整性保护(SIP)。如果Windows启动,您将无法从Windows访问新分区。

Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1

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): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 3 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default AB): ab
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$ 

它起作用了,Windows靴子吧!非常感谢。实际上,我仍然无法访问数据(共享)分区。
capi-ch 40年

@ capi-chou:我可以发布允许Windows查看共享分区的说明。如果您按照说明操作,Windows可能无法启动。如果发生这种情况,您将需要执行该命令bootrec,该命令将重建该C:\boot\BCD文件。此命令只能从Windows安装媒体运行。运行该命令后,Windows将再次启动。那么你有Windows安装DVD吗?你想继续吗?
大卫安德森

我可能仍然有一个旧的Windows DVD somwhere,但我的光驱仍然死了。但是如果一个usb恢复驱动器足够了(我想我只需要访问DOS命令行),你就可以继续了。
capi-ch 40年

@ capi-chou:我更新了我的答案。您可以尝试查看Windows是否能够访问共享分区。您可能不需要Windows安装媒体。如果这样做,则无法从DVD(光纤)驱动器启动。无法从Mac型号的USB端口启动Windows安装媒体。
大卫安德森

我试过你的“可以访问共享分区”。好消息:窗户还在靴子里。好消息:我可以从Windows磁盘管理中看到共享卷。坏消息:它显示为“未分配”。我可以构建一个新卷...但是我得到一个警告说这会使安装在同一个驱动器上的任何其他操作系统无法启动。我没有冒风险......我可以吗?
capi-ch
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.