Format/Recover External USB Drive Under Linux as MS-DOS file system

1. First Insert USB/Flash drive into Linux operating system

or

With Window Operating System Refer

2. Open the terminal (Ubuntu Shortcut: ALT+CLT+T)

3. Locate USB/Flash drive which you want to format with system utility df as shown

$ sudo df

This command will list down all file system used in computer. The Disk /dev/sdb1 reflects the USB drive here.

4. Un-mount USB drive file system

$ sudo umount /dev/sdb1

5. Format USB drive with MS-DOS file system under Linux

$ sudo mkfs.vfat -n 'RahulPSD' -I /dev/sdb1

At a glance on commands used

In computer operating systems, mkfs is a command used to format a block storage device with a specific file system. Under Linux mkfs is simply a front-end for the various file system builders (mkfs.fstype) available.

mkfs.fat : To create an MS-DOS file system under Linux (FAT32)

Argument Used-

-n [ VOLUME-NAME ]: Sets the volume name (label) of the file system.
   The volume name can be up to 11 characters long. 
   ( Default is no label)

-I [ FILE-SYSTEM-PATH ]: It is typical for fixed disk devices to be 
    partitioned

-c [ CHECK-BAD-SECTOR ]: Check the device for bad blocks before 
     creating the file system. [ use to recover from bad sector]

Note: you are not permitted to create a file system across the entire device.

For More details you can look for mkfs.vfat manual try these on terminal

$ man mkfs.vfat

Extra Readings: NTFS file system

$ man mkfs.ntfs

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s