Generally speaking, formatting a partition of the USB stick is still very easy. It is only necessary to use the MKFS command to specify the target file system, such as the following example:
sudo-lsudo mkfs -t vfat /dev/sdb1
The-t parameter is the destination file format. Others have ext3,msdos and so on, the tacit feel ext2.
We can also complete this work with simple commands such as the following:
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 the Linux use Tip 3 is made into the system boot disk, the USB stick is actually divided into two partitions.
$ sudo fdisk-l ... DISK/DEV/SDB:4009MB,4009754624 bytes -Heads +Sectors/track,3824Cylinders, Total7831552Sectorsunits = Sectors of 1* += + bytesSector size (logical/physical): + bytes/ + bytesI/O size (minimum/optimal): + bytes/ + bytesDisk identifier:0x7680fe3eDevice Boot Start End Blocks Id system/dev/sdb1 *0 2611199 1305600 -Hidden HPFS/NTFSDISK/DEV/SDB1:1336MB,1336934400 bytes -Heads +Sectors/track,1275Cylinders, Total2611200Sectorsunits = Sectors of 1* += + bytesSector size (logical/physical): + bytes/ + bytesI/O size (minimum/optimal): + bytes/ + bytesDisk identifier:0x7680fe3eDevice Boot Start End Blocks Id SYSTEM/DEV/SDB1P1 *0 2611199 1305600 -Hidden Hpfs/ntfs
This hides a very large part of the space. Simply formatting the/dev/sdb1 is not enough. Also format the/DEV/SDB so that the entire USB stick is formatted. But here's a problem:
-t vfat /dev/sdbmkfs.3.0.9 (312010)mkfs.noton‘/dev/sdb‘-Ito override)
Follow the prompts plus-I parameters:
$ sudo mkfs.vfat -I /dev/sdbmkfs.vfat3.0.9 (312010)
Insert the USB flash drive again. The entire disk space is back.
NTFS format
Using the FDISK command allows for a more powerful formatting function, Raspberry Pi fourth season.
Linux use tips 5--format USB flash drive