zhemao / zhemao.github.com

Github pages page
http://zhemao.github.com
Other
4 stars 1 forks source link

Creating the FAT partition #2

Closed acourt closed 10 years ago

acourt commented 10 years ago

I had a few hiccups when running the example command you suggested., this and particular:

sudo mkfs.fat /dev/sdX1

I am running the latest version of Ubuntu (13.10) and it doesn't have mkfs.fat out of the box. I actually had to run the command:

sudo mkfs.vfat -F 16 /dev/sdX1

to actually get what is needed.

zhemao commented 10 years ago

It seems that I have both mkfs.fat and mkfs.vfat on my system, with mkfs.vfat symlinked to mkfs.fat. I will edit part II to use mkfs.vfat instead. Did you have to install an extra package? The FAT utilities come in the dosfstools package. I realize now that they were only on my system because they were a dependency for another package I installed.

Also, Is there a particular reason you needed to explicitly specify the size of the file allocation tables (using -F)? I think you could get away with just

sudo mkfs.vfat /dev/sdX1
acourt commented 10 years ago

You could probably get away with just mkfs.vfat, without the specification for -F. The only reason I added it because I thought maybe it had to be explicitly 16 bits since FAT is by default 16 bits.

zhemao commented 10 years ago

The entry for the -F option in the man page says

If nothing is specified, mkfs.fat will automatically select between 12, 16 and 32 bit,
whatever fits better for the filesystem size.

So I think going with the default is best. I've edited the post to suggest installing dosfstools and using mkfs.vfat.