Need a terminal script to reformat disk to fat 32

Asked by Jeff Felberbaum

That's the deal. It's for reformatting my Western Digital "My Book" external sata (?) drive.

Was told to use

sudo mkdosfs /dev/sdb1

but got a messege in the terminal that reads:

jmf2060@Slab-O-Dell:~$ sudo mkdosfs /dev/sdb1
Password:
mkdosfs 2.11 (12 Mar 2005)
mkdosfs: /dev/sdb1 contains a mounted file system.

Suggestions?

Thanks

JF

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 πŸ¦„
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#1

Does it need to be a terminal script? There is a very nice graphical tool called gparted which can do this. It's a bit like partition manager on windows if you are familiar with that.

In order to format a partition you need to unmount it first.

sudo umount /dev/sdb1

Then format it - FAT 32 is not dosfs it's called vfat.

sudo mkfs.vfat /dev/sdb1

If you are *sure* /dev/sdb1 is indeed the partition on the disk you want to format.

Revision history for this message
Jeff Felberbaum (jmf2060) said :
#2

Hi Alan--just got GParted and looked at my external drive--in the "file
system"
column it says "fat32!!!" I can't imagine that could mean anything else than
that it
was already formatted that way to begin with, but I thought I'd check w/you
anyway.

Is that standard formatting for a drive of this type? Is there another way
to check its
file system? I assumed since I have been using it for my Windows machine
that it was NTFS.

Thx

Jeff

On 3/29/07, Alan Pope <email address hidden> wrote:
>
> Your question #4473 on Ubuntu changed:
> https://answers.beta.launchpad.net/ubuntu/+ticket/4473
>
> Status: Open => Answered
>
> Alan Pope proposed the following answer:
> Does it need to be a terminal script? There is a very nice graphical
> tool called gparted which can do this. It's a bit like partition manager
> on windows if you are familiar with that.
>
> In order to format a partition you need to unmount it first.
>
> sudo umount /dev/sdb1
>
> Then format it - FAT 32 is not dosfs it's called vfat.
>
> sudo mkfs.vfat /dev/sdb1
>
> If you are *sure* /dev/sdb1 is indeed the partition on the disk you want
> to format.
>
> _______________________________________________________________________
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.beta.launchpad.net/ubuntu/+ticket/4473/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.beta.launchpad.net/ubuntu/+ticket/4473
>

Revision history for this message
Best Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#3

What is the history of the disk?

If it was used previously on a windows machine it may well have been formatted FAT32.

Revision history for this message
Jeff Felberbaum (jmf2060) said :
#4

Thanks Alan Pope, that solved my question.