当前格式
fdisk /dev/sdb
# 在 fdisk 提示符下,输入以下命令删除分区:
d
# 选择要删除的分区编号(如 1、2 等)
w
开始转换
[root@node-24 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.37.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The device contains 'iso9660' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
格式化
# mkfs.vfat -F 32 /dev/sdb
mkfs.fat 4.2 (2021-01-31)