Find the answer to your Linux question:
Results 1 to 9 of 9
Hi folks, Debian 5.0 I need to format an USB pen drive as DOS FAT32 but I can't find; mkfs mkfs.vfat mkdosfs Please advise which package shall I install? OR ...
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546

    [SOLVED] How to format USB pen drive as FAT32

    Hi folks,

    Debian 5.0

    I need to format an USB pen drive as DOS FAT32 but I can't find;

    mkfs
    mkfs.vfat
    mkdosfs

    Please advise which package shall I install? OR are there other ways round? TIA


    B.R.
    satimis

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,086
    Easiest way in my opinion is gparted. I usually run it from any liveCD but it also works well if you have it installed on your system with any unmounted partitions.

    The Parted Magic LiveCD makes easy work of partitioning chores.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,072
    I'm with ozar.
    gParted is your friend.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  4. #4
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    Hi folks,

    Thanks for your advice.

    I only need to reformat the USB pen stick(8G). Gparted is already running.

    $ apt-cache policy gparted
    Code:
    gparted:
      Installed: 0.3.8-1+b1
      Candidate: 0.3.8-1+b1
      Version table:
     *** 0.3.8-1+b1 0
            500 http://ftp.hk.debian.org lenny/main Packages
            100 /var/lib/dpkg/status

    $ sudo fdisk -l
    Code:
    Disk /dev/sda: 640.1 GB, 640135028736 bytes
    255 heads, 63 sectors/track, 77825 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000102e7
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       77495   622478556   83  Linux
    /dev/sda2           77496       77825     2650725    5  Extended
    /dev/sda5           77496       77825     2650693+  82  Linux swap / Solaris
    
    Disk /dev/sdb: 7969 MB, 7969177600 bytes
    221 heads, 20 sectors/track, 3521 cylinders
    Units = cylinders of 4420 * 512 = 2263040 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               2        3522     7778304    b  W95 FAT32

    $ sudo gparted /dev/sdb1
    delete all the content inside. But I can't reformat it.

    On
    New -> Creating partition

    FAT32 is greyout. Please help.


    TIA

    B.R.
    satimis

  5. #5
    Just Joined! PCNetSpec's Avatar
    Join Date
    Jun 2010
    Location
    Cornwall UK
    Posts
    6
    Check you have the dosfstools package installed

  6. #6
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546
    Quote Originally Posted by PCNetSpec View Post
    Check you have the dosfstools package installed
    Hi,


    I got it. Thanks


    $ sudo gparted /dev/sdb1

    New -> Partition -> selecting FAt32

    Code:
    Create Primary Partition #1 (fat32, 7.42 GiB) on /dev/sdb1
    Single partition (without partition)


    B.R.
    satimis

  7. #7
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,086
    You can see what extra software is required along with gparted for each of the file system types here:

    GParted -- Features
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  8. #8
    Linux Newbie zenwalker's Avatar
    Join Date
    Feb 2010
    Location
    Inland Pacific NW
    Posts
    175
    Quote Originally Posted by satimis View Post
    Hi folks,

    Thanks for your advice.

    I only need to reformat the USB pen stick(8G). Gparted is already running.

    $ apt-cache policy gparted
    Code:
    gparted:
      Installed: 0.3.8-1+b1
      Candidate: 0.3.8-1+b1
      Version table:
     *** 0.3.8-1+b1 0
            500 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            100 /var/lib/dpkg/status

    $ sudo fdisk -l
    Code:
    Disk /dev/sda: 640.1 GB, 640135028736 bytes
    255 heads, 63 sectors/track, 77825 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000102e7
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       77495   622478556   83  Linux
    /dev/sda2           77496       77825     2650725    5  Extended
    /dev/sda5           77496       77825     2650693+  82  Linux swap / Solaris
    
    Disk /dev/sdb: 7969 MB, 7969177600 bytes
    221 heads, 20 sectors/track, 3521 cylinders
    Units = cylinders of 4420 * 512 = 2263040 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               2        3522     7778304    b  W95 FAT32

    $ sudo gparted /dev/sdb1
    delete all the content inside. But I can't reformat it.

    On
    New -> Creating partition

    FAT32 is greyout. Please help.


    TIA

    B.R.
    satimis
    You were almost there, manually, as well -- all necessary was to write the partition table just created. Do this with
    PHP Code:

    Then, format the newly created USB stick:
    PHP Code:
    mkfs -t vfat -[name] /dev/sdb1 
    And you're done!

    Not to step on anyone but you, satimis, did ask if there was another way! I'm glad you accomplished what you set out to do!

    The support here is great, isn't it?! exes because of the rule about posting URLs -- even as a quote (-- rules are an ***, as the English paraphrase goes)

  9. #9
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,546

    Solved

    Hi folks,

    Thanks for your advice.

    Problem solved by running;

    $ sudo gparted /dev/sdb

    NOT
    $ sudo gparted /dev/sdb1

    then I can directly format the drive there

    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •