MacBook上u盘无法格式化
程序员文章站
2024-03-22 21:43:16
...
诶嘿,最近,在新买的马可不可菠萝上发现一个U盘无法格式化,提示错误,在别的电脑上格式化过后拿到马可不可菠萝上也不能显示正确的分区,那就来尝试一下苹果自带的diskutil来格式化一下,gogogo
首先,先来查看一下分区????
aaa@qq.com ~ % diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 1.0 TB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1.0 TB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 11.2 GB disk1s1
2: APFS Volume Macintosh HD - Data 184.6 GB disk1s2
3: APFS Volume Preboot 126.3 MB disk1s3
4: APFS Volume Recovery 528.9 MB disk1s4
5: APFS Volume VM 3.2 GB disk1s5
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *15.5 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Microsoft Basic Data ovo 15.2 GB disk2s2
这里看到U盘是disk2,接下来在格式化之前需要先把U盘卸载掉
aaa@qq.com ~ % diskutil umountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
yes!卸载成功,下面????就开始格式化了
aaa@qq.com ~ % diskutil eraseDisk ExFAT ovo disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as ExFAT with name ovo
Volume name : ovo
Partition offset : 411648 sectors (210763776 bytes)
Volume size : 29863936 sectors (15290335232 bytes)
Bytes per sector : 512
Bytes per cluster: 32768
FAT offset : 2048 sectors (1048576 bytes)
# FAT sectors : 4096
Number of FATs : 1
Cluster offset : 6144 sectors (3145728 bytes)
# Clusters : 466528
Volume Serial # : 5f2773de
Bitmap start : 2
Bitmap file size : 58316
Upcase start : 4
Upcase file size : 5836
Root start : 5
Mounting disk
Finished erase on disk2
这里 ‘ ExFAT ’ 是要格式化的文件系统,‘ ovo ’ 是格式化后的U盘名称,注意大小写
然后就OK了,在苹果自带的磁盘工具中看现在U盘分区也显示正常了
上一篇: iOS路由跳转(五)之JKRouter 2.0 脱胎换骨
下一篇: Typora基础入门