LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   format 64Gb usb drive to Fat32 only gives 32Gb? (https://www.linuxquestions.org/questions/linux-newbie-8/format-64gb-usb-drive-to-fat32-only-gives-32gb-4175562103/)

iFunction 12-22-2015 05:41 AM

format 64Gb usb drive to Fat32 only gives 32Gb?
 
Hi there,

I have to format approx 200 USB drives to Fat32. On my mac, no problem but in Linux from the command line it only gives me 32Gb instead of the full capacity.

Here is what I am doing:

Code:

sudo su

umount /dev/sda

mkfs.vfat -n 'round01' -I /dev/sda

this formats nice and quickly, but only gives me a 32Gb partition and as I am a little new to this, I am struggling somewhat to understand what the "-n" means and the "-I" means.

How can I get this to be a 64Gb partition?

Kind regards

iFunc

BW-userx 12-22-2015 05:56 AM

you got Gparted? use that --- if something wrong with the usb normally it can be fix within that too --- just incase partitons maybe screewed up-- that should let you know.

for -> mkfs.vfat <-

TxLonghorn 12-22-2015 06:52 AM

Quote:

Originally Posted by iFunction (Post 5467522)
I have to format approx 200 USB drives to Fat32. On my mac, no problem but in Linux from the command line it only gives me 32Gb instead of the full capacity.

Take one USB drive that you formatted correctly on your Mac.
Plug that in to your linux box.
Plug in the unformatted USB drive.
Discover the device designations >
Code:

sudo fdisk -l
Clone /dev/sdc to /dev/sdd (or whatever the correct device designations are...)
Code:

sudo dd if=/dev/sdc of=/dev/sdd

TxLonghorn 12-22-2015 06:57 AM

Quote:

Originally Posted by iFunction (Post 5467522)
Here is what I am doing:
Code:

mkfs.vfat -n 'round01' -I /dev/sda
I am struggling somewhat to understand what the "-n" means and the "-I" means.

"-n" means set the volume name (label) of the file system.
"-n 'round01' " - set the label using the chosen text inside the quotes.
"-I" - means you are doing a "superfloppy" format. That is formatting the entire disk, not partitions. The -I tells the format command to ignore the fact that you have no partitions.

iFunction 12-22-2015 09:40 AM

Ok, thanks for the replies.

As for Gparted, can't get it to work at all, it doesn't appear to support FAT 32 that I can see.

Can I assume that only mac will actually partition a large USB drive to FAT 32 then? I thought you would be able to do it in the command line easily.

the reason I ask is that I don't want to wear out the usb ports on my mac as that is mine not a works machine.

kind regards
iFunc

TxLonghorn 12-22-2015 10:09 AM

It can probably be done using the -S option in your command:
mkfs.vfat -n 'round01' -I /dev/sda
to increase the logical sector size.
I will try to figure out the exact parameters.

suicidaleggroll 12-22-2015 11:07 AM

You haven't created a partition yet, you're just trying to create a filesystem on the raw device. Use fdisk or parted or gparted to create a partition on the device first, then create the filesystem on the partition (sda1, not sda).

As for gparted and fat32, yes absolutely gparted supports fat32, it would be ridiculous for it not to.

As for wearing out your USB port, use a $5 extension cable and plug your drives into that.

BW-userx 12-22-2015 11:49 AM

Quote:

Originally Posted by suicidaleggroll (Post 5467623)
As for wearing out your USB port, use a $5 extension cable and plug your drives into that.

I never thought of that, wearing out a USB port -- I mostly use it for my Mouse on my LapTop, but still good advice. :Pengy:

iFunction 01-02-2016 03:55 AM

Ok, tried to use fdisk, now I only have 32K of space, that's much worse, can someone please point me at a tutorial that will make it so I can format a 64Gb Drive from exFat format to FAT32 please.

jpollard 01-02-2016 06:00 AM

Fat32 does not support any filesystem larger than 32GB.

reference: http://support.wdc.com/KnowledgeBase...r.aspx?ID=1287
reference: https://technet.microsoft.com/en-us/.../cc938432.aspx

BTW, the filesystem also limits file sizes to 4GB.

If you want to use more with linux, use a linux native filesystem.

You will also get better error recovery.

TxLonghorn 01-02-2016 06:15 AM

Code:

sudo mkdosfs /dev/sdX -s 128 -F 32 -I

BW-userx 01-02-2016 06:57 AM

Quote:

Originally Posted by TxLonghorn (Post 5472062)
Code:

sudo mkdosfs /dev/sdX -s 128 -F 32 -I

isn't that a command line arg that just, when you hit enter it goes, Ka chunk, and its formated, no waiting?

TxLonghorn 01-02-2016 07:11 AM

Quote:

Originally Posted by BW-userx (Post 5472074)
isn't that a command line arg

It is a complete command, not just an argument.

Quote:

Originally Posted by BW-userx (Post 5472074)
when you hit enter it goes, Ka chunk, and its formated, no waiting?

Formatting a 64GB drive will require some waiting, about 10 minutes depending on the machine's capabilities.

BW-userx 01-02-2016 07:15 AM

Quote:

Originally Posted by iFunction (Post 5467522)
Hi there,

I have to format approx 200 USB drives to Fat32. On my mac, no problem but in Linux from the command line it only gives me 32Gb instead of the full capacity.

Here is what I am doing:

Code:

sudo su

umount /dev/sda

mkfs.vfat -n 'round01' -I /dev/sda

this formats nice and quickly, but only gives me a 32Gb partition and as I am a little new to this, I am struggling somewhat to understand what the "-n" means and the "-I" means.

How can I get this to be a 64Gb partition?

Kind regards

iFunc

Man Pages

parted

fdisk

mkfs.vfat(8)

BW-userx 01-02-2016 07:22 AM

Quote:

Originally Posted by TxLonghorn (Post 5472076)
It is a complete command, not just an argument.

Formatting a 64GB drive will require some waiting, about 10 minutes depending on the machine's capabilities.

Oh I remember way back when they had this meddium that was called a floppy, it came in 3 sizes, 8" , 5 1/4" and3.5". the little one that wasn't really a floppy, it was hard plastic. NeverTheLess my friend that truned me on to Linux (Slackware) showed me a command line that all I had to do was write something giving it the prams, hit inter then that 3.5 floppy was fotmated instead of waiting for it to format under the format command. it was done as soon after hiting enter.

Linux wasn't support that well back then had to go back to Windows and forgot what it was that he showed me. maybe it only worked on 3.5 floppies. either way it was was really fast when used. just type size of drive - sectors and where it was at then hit enter (maybe missing a few prams) but whatever it was, It was done as soon as enter was hit. hit that arrow on the keyborad and do another one, it went faster then the old waiting for it to format every sector slowly


All times are GMT -5. The time now is 06:13 AM.