programmium

From Isham Mohamed


USB Flash Drive – L̶o̶w̶L̶e̶v̶e̶l̶ format in Linux

Update 08/11/2019 – I was completely wrong on using the word “Low-level format” and demonstrating it using fdisk. If you are here to know about low-level formatting, please visit https://www.dedoimedo.com/computers/low-level-formatting.html .

Recently I have used Chrome OS vanilla via USB drive. While I write the .img file through a sotware (I forgot the name) it warned me about “Disk corruption” I just make it pass as I was very keen to use Google’s Chrome OS.

After three days, today I pluged the USB drive in my friend’s computer to get some documents and I noticed, that warning was correct and my USB drive is totally corrupted as Chrome OS has splitted my USB drive and has written Kernal and other etc partitions into it, you can see them in the above image also.. OMG, what to do now?? I asked the help from Windows’s Disk management system and nope.. it was not helping for me. So I decided to perform Low-level format to my USB drive via Linux (I am using Fedora)

These are the steps to perform a low-level format

A. First we need to delete the old partitions that remain on the USB key.

  1. Open a terminal and type sudo su
  2. Type fdisk -l and note your USB drive letter.
  3. Type fdisk /dev/sdx (replacing x with your drive letter)
  4. Type d to proceed to delete a partition
  5. Type 1 to select the 1st partition and press enter
  6. Type d to proceed to delete another partition (fdisk should automatically select the second partition)

B. Next we need to create the new partition.

  1. Type n to make a new partition
  2. Type p to make this partition primary and press enter
  3. Type to make this the first partition and then press enter
  4. Press enter to accept the default first cylinder
  5. Press enter again to accept the default last cylinder
  6. Type w to write the new partition information to the USB key
  7. Type umount /dev/sdx1 (replacing x with your drive letter)

C. The last step is to create the fat filesystem.

  1. Type mkfs.vfat -F 32 /dev/sdx1 (replacing x with your USB key drive letter)

Thats all.. my device is BACK…



5 responses to “USB Flash Drive – L̶o̶w̶L̶e̶v̶e̶l̶ format in Linux”

  1. Note that USB and USB disk (Flash drive) are different things.

    1. Thanks for pointing this out – Edited.

  2. This is not low-level formatting. Using fdisk is _NOT_ low-level.

    1. then which is low-level formatting. Demonstrate it please

      1. I wat totally wrong. Corrected the mistake. Thanks for pointing it out

Leave a reply to Isham M Iqbal Cancel reply