LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2009, 05:17 AM   #1
EmrldDrgn
Member
 
Registered: Oct 2008
Posts: 40

Rep: Reputation: 16
Difference between mkfs.vfat and mkfs.msdos?


I realize that both files are symlinks to mkdosfs, but does mkdosfs do any sort of check of the name it's called by, as I know some programs do? And if so, what is the difference between vfat and msdos? I mean, both create FAT file systems, right?
 
Old 07-22-2009, 05:32 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Which distro? There's no mkfs.vfat or mkfs.msdos in Slackware,
for example ...
 
Old 07-22-2009, 05:39 AM   #3
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
in RHEL you will find the mkfs.vfat mkfs.msdos
 
Old 07-22-2009, 06:21 AM   #4
IW2B
Member
 
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35

Rep: Reputation: 19
Hi,

The MSDOS file system will support the 8.3 file/directory naming, whereas vfat will allow you to use long file names.

The following is from my Fedora 11 system:

Code:
$ mkfs.vfat   /dev/sde1
$ mkfs.msdos  /dev/sde2

$ mount -t vfat  /dev/sde1 /vfat/
$ mount -t msdos /dev/sde2 /msdos/
$ mount
/dev/sde2 on /msdos type msdos (rw)
/dev/sde1 on /vfat type vfat (rw)


$ touch  /vfat/123456789.1234
$ touch /msdos/123456789.1234
$ ls -al /msdos/ /vfat/

/msdos/:
-rwxr-xr-x   1 user user    0 2009-07-22 12:16 12345678.123

/vfat/:
-rwxr-xr-x   1 user user    0 2009-07-22 12:16 123456789.1234
Regards
Ian
 
Old 07-22-2009, 06:32 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
IW2B, that's due to how you mount the fs, and not because of the mkfs tool you use. In fact, you can quickly check that something formated with mkfs.msdos can be perfectly mounted as vfat because in fact both tools are the same.

Code:
$ dd if=/dev/zero of=foo.img bs=4096 count=10k
10240+0 records in
10240+0 records out
41943040 bytes (42 MB) copied, 0,0803099 s, 522 MB/s
$ mkfs.msdos foo.img
mkfs.msdos 3.0.2 (28 Feb 2009)
$ mkdir tmp
$ mount -t vfat -oloop foo.img tmp
$ mount|grep loop
/dev/loop0 on /home/i92guboj/tmp type vfat (rw)
EmrldDrgn, yes, both mkfs.vfat and mkfs.msdos are just symlinks pointing to mkdosfs, so they do exactly the same thing. mkdosfs supports fat12, 16 and 32 fs's but on a quick check of the source I haven't seen any specific check for the name of the argument zero, so both symlinks are equivalent unless I am missing something.

So, doing mkfs.msdos or mkfs.vfat makes no difference. However the driver for msdos and vfat on the kernel are not the same, so mounting them as msdos or vfat DO make a difference, because both drivers do have different capabilities.

I think that both symlinks exist just for convenience. Nothing else. They are 100% equivalent.

Last edited by i92guboj; 07-22-2009 at 06:36 AM.
 
Old 07-22-2009, 06:36 AM   #6
EmrldDrgn
Member
 
Registered: Oct 2008
Posts: 40

Original Poster
Rep: Reputation: 16
Thank you very much, I understand now. That was my own estimation based on the source code, but I'm not familiar with Linux programming in C so I was afraid I may have missed something. I appreciate the help.
 
Old 07-23-2009, 04:27 AM   #7
IW2B
Member
 
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35

Rep: Reputation: 19
hi i92guboj,

I knew that and looking back at my post I seem to have lost/deleted an entire paragraph regarding the mounting options after the code section!

Apologies for that

Ian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which package contains mkfs.vfat? ttilt Slackware 9 08-11-2009 12:15 PM
make vfat filesystem, no mkfs.vfat tramni1980 Slackware 11 12-28-2008 12:54 PM
What?? No mkfs.vfat in slackware!! WindowBreaker Slackware 4 03-04-2006 06:58 PM
mkfs.vfat GlobShim Linux - General 2 03-28-2004 03:56 PM
mkfs.vfat?? lss223 Slackware 1 04-28-2003 02:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration