Generally, it is very easy to format a partitioned USB flash disk. you only need to use the mkfs command to specify the target file system. The example is as follows: $ fdisk-l $ mkfs-tvfat/dev/sdb112-t parameters are the target file format, other ext3, msdos and so on, the default is ext2. we can also use the following simple command to do this: mkdosfs (8 ),
Generally, it is very easy to format a partitioned USB flash disk. you only need to use the mkfs command to specify the target file system. The example is as follows:
$ fdisk -l$ mkfs -t vfat /dev/sdb1
The-t parameter is the target file format. the other parameters include ext3 and msdos. the default value is ext2. we can also use the following simple command to complete this task:
mkdosfs(8), mke2fs(8), mkfs.bfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.minix(8), mkfs.msdos(8), mkfs.vfat(8), mkfs.xfs(8), mkfs.xiafs(8)
After using Linux tip 3 to make a USB flash drive into a system boot disk, the USB flash drive is actually divided into two partitions.
$ fdisk -l...Disk /dev/sdb: 4009 MB, 4009754624 bytes64 heads, 32 sectors/track, 3824 cylinders, total 7831552 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x7680fe3e Device Boot Start End Blocks Id System/dev/sdb1 * 0 2611199 1305600 17 Hidden HPFS/NTFSDisk /dev/sdb1: 1336 MB, 1336934400 bytes64 heads, 32 sectors/track, 1275 cylinders, total 2611200 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x7680fe3e Device Boot Start End Blocks Id System/dev/sdb1p1 * 0 2611199 1305600 17 Hidden HPFS/NTFS
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
This will hide a large part of the space. it is not enough to format/dev/sdb1 only. Also format/dev/sdb so that the entire USB flash disk is formatted. However, there will be a problem:
$ mkfs -t vfat /dev/sdbmkfs.vfat 3.0.9 (31 Jan 2010)mkfs.vfat: Device partition expected, not making filesystem on entire device '/dev/sdb' (use -I to override)
Follow the prompts to add the-I parameter:
$ mkfs.vfat -I /dev/sdbmkfs.vfat 3.0.9 (31 Jan 2010)
Re-insert the USB flash disk, and the whole USB disk space is back.