MaoOS抹掉进程失败解决方法

MaoOS抹掉进程失败解决方法

设备:Macbook Pro with MacOS 10.13.1

硬盘:希捷Expansion Portable Drive 1TB

背景:本人一直使用的移动硬盘,之前是NTFS格式,换了个最新的macbook pro后,身边的Windows机器很少了,就想将移动硬盘重新格式化为MacOS文件系统。

问题:使用Mac磁盘工具,抹掉硬盘时提示:mediakit报告无此分区。

解决方案:

百度了一轮,没有找到有用的答案,可见这类问题的中文内容质量还是不行。还是需要翻墙查看英文资料。

找到一篇文章,地址:How to fix: MediaKit reports not enough space on device for requested operation

简单翻译一下,方便国内用户。

该方法适合使用MacOS系统用户,涉及到使用工具“diskutil”,“dd”均为系统自带。

  1. 打开“终端.app”
  2. 首先找到目标硬盘在系统中的名称 (hard drive)
输入diskutil list

结果
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         121.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +121.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            105.9 GB   disk1s1
   2:                APFS Volume Preboot                 20.3 MB    disk1s2
   3:                APFS Volume Recovery                519.9 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1000.2 GB  disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Elements                999.8 GB   disk2s2

上述移动硬盘为disk2.

3. 卸载目标硬盘

输入:diskutil unmountDisk force disk2

结果:
Forced unmount of all volumes on disk2 was successful

4. 向目标硬盘写入zeros,这里要用rdisk2。

输入:sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 count=1024

结果:
Password:
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0.890086 secs (1178062 bytes/sec)

5.格式化目标硬盘

输入:diskutil partitionDisk disk2 GPT JHFS+ "Elements" 0g

结果:
Password:
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0.890086 secs (1178062 bytes/sec)
MacBook-Arthur:~ berserkr$ diskutil partitionDisk disk2 GPT JHFS+ "Elements" 0g
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as Mac OS Extended (Journaled) with name Elements
Initialized /dev/rdisk2s2 as a 998 GB case-insensitive HFS Plus volume with a 57344k journal
Mounting disk
Could not mount disk2s2 after erase
Finished partitioning on disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1000.2 GB  disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Elements                999.8 GB   disk2s2

6. 现在硬盘已经成功格式化为HFS+格式了,可以通过系统自带“磁盘工具”,转成需要的格式。

本文来自转载,原文链接:https://zhuanlan.zhihu.com/p/31672180

(73)
adminadmin
上一篇 2021-04-29 21:34
下一篇 2022-01-19 20:19

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注