1.首先执行sudo fdisk -l查看你的u盘的序号,通常是/dev/sdb之类的,U盘分区通常是/dev/sdb1
2.针对将要格式化的分区执行sudo umount /dev/sdb1# 必须先卸载该分区
3.sudo mkfs.ext4 /dev/sdb1# 格式化为ext4分区
4.查看u盘序号时提示错误:
This doesn't look like a partition table
Probably you selected the wrong device.
......
Partition table entries are not in disk order
解决方案:
1.fdisk /dev/sdb (此处改为u盘的Device Boot )
2.出现Command (m for help): p //显示U盘目前状态
Command (m for help): d
Partition number (1-4): 4
Command (m for help): d
Partition number (1-4): 3
Command (m for help): d
Partition number (1-4): 2
Command (m for help): d
Command (m for help): p
Command (m for help): n
Command action
p primary partition (1-4) :p
Partition number (1-4): 1
Command (m for help): p
Command (m for help): x
Expert command (m for help): m
Command action
b move beginning of data in a partition
c change number of cylinders
d print the raw data in the partition table
e list extended partitions
f fix partition order
g create an IRIX (SGI) partition table
h change number of heads
m print this menu
p print the partition table
q quit without saving changes
r return to main menu
s change number of sectors/track
v verify the partition table
w write table to disk and exit
Expert command (m for help): f
Done.
Expert command (m for help): r
Command (m for help): p
Command (m for help):w //保存你所做的工作并且退出。
以上就是对U盘进行重新分区,把4 part合为一个。
这时的U盘还没有格式化,执行上述格式化流程.