Linux - NewbieThis 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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.