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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-22-2009, 04:17 AM
|
#1
|
Member
Registered: Oct 2008
Posts: 40
Rep:
|
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?
|
|
|
07-22-2009, 04:32 AM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Which distro? There's no mkfs.vfat or mkfs.msdos in Slackware,
for example ...
|
|
|
07-22-2009, 04:39 AM
|
#3
|
Member
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368
Rep:
|
in RHEL you will find the mkfs.vfat mkfs.msdos
|
|
|
07-22-2009, 05:21 AM
|
#4
|
Member
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35
Rep:
|
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
|
|
|
07-22-2009, 05:32 AM
|
#5
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
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 05:36 AM.
|
|
|
07-22-2009, 05:36 AM
|
#6
|
Member
Registered: Oct 2008
Posts: 40
Original Poster
Rep:
|
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.
|
|
|
07-23-2009, 03:27 AM
|
#7
|
Member
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 07:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|