我试图调整我的bootcamp分区并添加一个新的分区作为exFat在两者之间共享...我格式化了我的bootcamp分区,无法弄清楚如何将它与我的主macOS分区合并...经过一番搜索,我遇到了:https://www.macobserver.com/tips/deep-dive/resize-your-apfs-container/
我按照我认为需要的步骤...使用命令
sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s4
对于合适的磁盘...到目前为止还是那么好,或者我认为。
我输入了命令
diskutil apfs resizeContainer disk0s2 0
但收到以下信息:
启动APFS操作错误:-69771:目标磁盘对于此操作而言太小
在运行了diskutil list命令之后,我意识到我甚至找不到我之前在任何地方擦过的空间......有人可以帮我弄清楚如何回收这个空间吗?我确实有时间机器上的数据备份; 然而,其他人正在经历类似的问题,他们做了一个干净的安装,他们的空间仍然缺失。https://discussions.apple.com/thread/8291525
我不是一个经常发帖或寻求帮助的人,我倾向于搜索并找到解决方案,但我没有运气。任何帮助将不胜感激。需要的任何信息,我很乐意提供。
以下是结果 disktil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 423.0 GB disk0s2
3: Apple_HFS XPlatform 15.9 GB disk0s3
4: Apple_Boot 134.2 MB disk0s4
5: Apple_KernelCoreDump 655.4 MB disk0s5
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +423.0 GB disk1 Physical Store disk0s2
1: APFS Volume Macintosh HD 319.3 GB disk1s1
2: APFS Volume Preboot 22.4 MB disk1s2
3: APFS Volume Recovery 509.8 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: CCCOMA_X64FRE_EN-US... +4.7 GB disk2
正如你所看到的,我错过了大约60 gb,这是我试图释放的空间量。
编辑:
fdisk /dev/disk0
命令的结果:
Disk: /dev/disk0 geometry: 7602/255/63 [122138133 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122138132] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
gpt -r show /dev/disk0
命令的结果:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 4 Pri GPT table
6 76800 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
76806 103270257 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
103347063 3873482 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
107220545 32768 4 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
107253313 2441407
109694720 160000 5 GPT part - 5361644D-6163-11AA-AA11-00306543ECAC
109854720 12283408
122138128 4 Sec GPT table
122138132 1 Sec GPT header
编辑2:从macOS Recovery中删除命令,结果有点不同,所以我想我也会分享它。
-bash-3.2# csrutil disable
Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect.
-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 520/128/63 [4194024 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 4194023] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
-bash-3.2# gpt -r show /dev/disk0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 3931800 1 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
3931840 262151
4193991 32 Sec GPT table
4194023 1 Sec GPT header
编辑3:重新创建原始结果。
sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 7602/255/63 [122138133 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122138132] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
sudo gpt -r show /dev/disk0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 4 Pri GPT table
6 76800 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
76806 103270257 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
103347063 3873482 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
107220545 32768 4 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
107253313 2441407
109694720 160000 5 GPT part - 5361644D-6163-11AA-AA11-00306543ECAC
109854720 12283408
122138128 4 Sec GPT table
122138132 1 Sec GPT header
编辑4:
跑完后的结果 sudo diskutil erasevolume free n disk0s5
diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 423.0 GB disk0s2
3: Apple_HFS XPlatform 15.9 GB disk0s3
4: Apple_Boot 134.2 MB disk0s4
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +423.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 307.6 GB disk1s1
2: APFS Volume Preboot 22.4 MB disk1s2
3: APFS Volume Recovery 509.8 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 7602/255/63 [122138133 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122138132] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
sudo gpt -r show /dev/disk0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 4 Pri GPT table
6 76800 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
76806 103270257 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
103347063 3873482 3 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
107220545 32768 4 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
107253313 14884815
122138128 4 Sec GPT table
122138132 1 Sec GPT header
编辑5:再次命令结果。
diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 438.9 GB disk0s2
3: Apple_Boot 134.2 MB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +438.9 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 307.6 GB disk1s1
2: APFS Volume Preboot 22.4 MB disk1s2
3: APFS Volume Recovery 509.8 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 7602/255/63 [122138133 sectors]
Sector size: 4096 bytes
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 122138132] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
sudo gpt -r show /dev/disk0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 4 Pri GPT table
6 76800 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
76806 107143739 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
107220545 32768 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
107253313 14884815
122138128 4 Sec GPT table
122138132 1 Sec GPT header
编辑6:Someome友好地指出我没有分享我的最终目标。我现在希望有一个驱动器可以使用500gb,然后从那里开始建立一个bootcamp分区,然后是另一个可以在两个操作系统之间共享的exFat分区!
编辑7:所有问题都已解决!