打开终端,输入:sudo diskutil list
然后输入系统密码,回车,会列出系统挂载的所有磁盘:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *120.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS MacOS 35.0 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data BOOTCAMP 24.2 GB disk0s4
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *500.1 GB disk1
1: Apple_HFS TimeMachine 80.1 GB disk1s1
2: Windows_NTFS Data 420.0 GB disk1s2
我要删除的事bootcamp分区,输入如下命令即可:
sudo diskutil eraseVolume JHFS+ BOOTCAMP disk0s4
然后重启系统磁盘工具,会发现这个分区已经挂载上了,卸载掉才可进行合并操作:
sudo diskutil mergePartitions JHFS+ MacOS disk0s2 disk0s4