最近在测试DD-WRT的USB功能,需要一个ext4格式的U盘,下面就来用Debian来格式化U盘。
系统环境
Debian 7.8 Wheezy 64-bit,Vmware Workstation 10,16GB exFAT文件格式U盘一个
格式化U盘
首先在虚拟机上将U盘连接到虚拟机,这时会弹出窗口提示U盘的文件系统问题,忽略并关闭窗口。
打开Terminal窗口,输入命令查找U盘的路径
# fdisk -l
fdisk命令会输出所有disk
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006dbe7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 40136703 20067328 83 Linux
/dev/sda2 40138750 41940991 901121 5 Extended
/dev/sda5 40138752 41940991 901120 82 Linux swap / Solaris
Disk /dev/sdb: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 32 31266815 15633392 7 HPFS/NTFS/exFAT