Linux use tips 5--format USB flash drive

Source: Internet
Author: User

Generally speaking, formatting a partition of the USB stick is very simple, only need to use the MKFS command to specify the target file system, the example is as follows:

sudo-lsudo mkfs -t vfat /dev/sdb1

The-t parameter is the destination file format, the others are Ext3,msdos, and the default is ext2.
We can also do this with the following simple commands:

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 will hide a large part of the space, only the format of/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 to add the-I parameter:

$ sudo mkfs.vfat -I /dev/sdbmkfs.vfat3.0.9 (312010)

Re-insert the USB drive, the entire disk space is back.

Linux use tips 5--format USB flash drive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.