Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get this error when attempting to create a FAT32 partition with GParted:

mkdosfs: failed whilst writing FAT

I've tried creating a new partition table first, wiping the drive (with 0's), and formatting it ext2-4 before making it fat32. No dice.

Here are screenshots showing the error and drive information:


Device info


I'm getting a lot of questions in comments. Let me try to answer all of those and preempt more.

  • The drive was previously a Mac OS X 'Time Machine' Backup drive, and was thus formatted with HFS+ with a GPT. This should not matter since I physically (as opposed to logically) wiped the drive with \x00's.
  • I have tried running the command manually without using GParted, I get the same error displayed in the above screenshot.
  • The drive is a USB-powered portable drive (you can see more details in the drive information screenshot).
  • I have (and am using) root permissions.
  • I installed the latest version of GParted using the package manager.
  • I am open to alternate solutions for formatting this drive as FAT32 that do not use GParted or mkdosfs. The end goal is to format the drive.
share|improve this question
have you tried something related to "sudo mkdosfs -F32 -v -I /dev/sdb2" – Sushantp606 Nov 27 '13 at 8:23
It is unmounted, and @Sushantp606 yes. I get the same error regardless of whether I run the command myself or GParted does it for me. – Dan Nov 27 '13 at 8:31
Did you remove linux swap? (Swapoff) – samgabbay Nov 27 '13 at 16:09
@samgabbay it never had one - it was formerly HFS+ formatted with a GPT - but that should not matter now since it has been physically wiped and a new MBR partition table created – Dan Nov 27 '13 at 18:10
If mkdosfs is reporting an error, then likely it is experiencing difficulty writing to a portion of the drive. You might try formatting the drive from another operating system such as Windows. However if the drive is beginning to fail, then I would expect this to fail too. – Curtis Gedak Nov 29 '13 at 21:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.