我在 Mac 上使用终端。我尝试使用“newfs_msdos”创建 FAT32 磁盘,但出现以下错误,无法创建。我能够通过运行命令“diskutil erasvolume FAT32”和 powershell 命令“new-partition -mbrtype fat32”来创建 FAT32 磁盘。
如何使用“newfs_msdos”创建 FAT32 磁盘?我也想知道这种差异的原因以及差异的影响。
~ % diskutil erasedisk FAT32 MYF MBRformat /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s1 as MS-DOS (FAT32) with name MYF
512 bytes per physical sector
/dev/rdisk2s1: 60589120 sectors in 1893410 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2048 drv=0x80 bsec=60618752 bspf=14793 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk2
~ % diskutil list disk2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *31.0 GB disk2
1: DOS_FAT_32 MYF 31.0 GB disk2s1
~ % sudo fdisk /dev/disk2
Disk: /dev/disk2 geometry: 3773/255/63 [60620800 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 0B 1023 254 63 - 1023 254 63 [ 2048 - 60618752] Win95 FAT-32
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 -vvv show /dev/disk2
gpt show: /dev/disk2: mediasize=31037849600; sectorsize=512; blocks=60620800
gpt show: /dev/disk2: MBR at sector 0
gpt show: /dev/disk2: MBR part: type=11, start=2048, size=60618752
start size index contents
0 1 MBR
1 2047
2048 60618752 1 MBR part 11
--
--
fat32 disk by powershell
~ % sudo gpt -vvv show /dev/disk3
gpt show: /dev/disk3: mediasize=31001149440; sectorsize=512; blocks=60549120
gpt show: /dev/disk3: MBR at sector 0
gpt show: /dev/disk3: MBR part: type=12, start=2048, size=60547072
gpt show: /dev/disk3: Pri GPT at sector 1
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014
2048 60547072 1 MBR part 12
~ % sudo fdisk /dev/disk3
Disk: /dev/disk3 geometry: 3769/255/63 [60549120 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 0C 0 32 33 - 1023 254 63 [ 2048 - 60547072] Win95 FAT32L
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
~ % diskutil list disk3
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *31.0 GB disk3
1: Windows_FAT_32 NO NAME 31.0 GB disk3s1
--
--
~ % sudo newfs_msdos /dev/disk2
newfs_msdos: warning: /dev/disk2 is not a character device
512 bytes per physical sector
/dev/disk2: 60591168 sectors in 1893474 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf0 spt=32 hds=255 hid=0 drv=0x00 bsec=60620800 bspf=14793 rdcl=2 infs=1 bkbs=6
~ % sudo newfs_msdos -F 32 /dev/disk2
newfs_msdos: warning: /dev/disk2 is not a character device
512 bytes per physical sector
/dev/disk2: 60591168 sectors in 1893474 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf0 spt=32 hds=255 hid=0 drv=0x00 bsec=60620800 bspf=14793 rdcl=2 infs=1 bkbs=6
~ % sudo newfs_msdos -F 32 -v MYF /dev/disk2
newfs_msdos: warning: /dev/disk2 is not a character device
512 bytes per physical sector
/dev/disk2: 60591168 sectors in 1893474 FAT32 clusters (16384 bytes/cluster)
bps=512 spc=32 res=32 nft=2 mid=0xf0 spt=32 hds=255 hid=0 drv=0x00 bsec=60620800 bspf=14793 rdcl=2 infs=1 bkbs=6
~ % diskutil list disk2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *31.0 GB disk2
~ % sudo fdisk /dev/disk2
Password:
Disk: /dev/disk2 geometry: 3773/255/63 [60620800 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
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 -vvv show /dev/disk2
gpt show: /dev/disk2: mediasize=31037849600; sectorsize=512; blocks=60620800
gpt show: /dev/disk2: MBR at sector 0
start size index contents
0 1 MBR
1 60620799