我用df -lh命令看了下,被分成了四个。具体如下:
/dev/sda1 1.9G 4.0K 1.9G 1% /media/9F15-2076 /dev/sda6 1.9G 4.0K 1.9G 1% /media/A070-1636 /dev/sda5 1.9G 4.0K 1.9G 1% /media/A002-176E /dev/sda7 1.9G 4.0K 1.9G 1% /media/A0CE-2BB4
首先,查看挂载位置,使用命令fdisk -l,查看到U盘的挂载位置如下:
Disk /dev/sda: 8074 MB, 8074035200 bytes 255 heads, 63 sectors/track, 981 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xe4d2e4d2 Device Boot Start End Blocks Id System /dev/sda1 * 1 245 1967931 7 HPFS/NTFS /dev/sda2 246 981 5911920 5 Extended /dev/sda5 246 490 1967931 7 HPFS/NTFS /dev/sda6 491 735 1967931 7 HPFS/NTFS /dev/sda7 736 981 1975963+ 7 HPFS/NTFS然后,要进行的步骤是删除分区。使用命令:
[root@direwolf wolf]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)通过键入m,帮助可以知道,d是用来删除分区的。进行如下的操作:
Command (m for help): d Partition number (1-7): 6依次类推,直到删除所有的分区,之后输入w,将修改写入U盘
Command (m for help): w最后,创建新分区并格式化,使用下面的命令:
mkfs.vfat /dev/sda -I