Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

Error

Device info

UPDATE:

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
1  
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. –  maj nem ɪz dæn 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 –  maj nem ɪz dæn 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

 
discard

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

Browse other questions tagged or ask your own question.