SlackwareThis Forum is for the discussion of Slackware Linux.
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 wanted to put a label on a USB memory stick's FAT32 file system. mkfs.vfat is not available on my Slackware 13.0 system and slackpkg search mkfs.vfat found nothing. Back in December 09, linuxlover.chaitanya suggested using mke2fs -t vfat in this LQ post. I tried it -- and got a ext2 file system
Code:
root@CW8:~# mke2fs -t vfat -L CHARLES8G /dev/sdc1
[After mounting via Thunar ...]
root@CW8:~# df -hT /dev/sdc1
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdc1 ext2 7.4G 17M 7.0G 1% /media/CHARLES8G
AFAIK there is no valid -t option and mke2fs can not create a vfat filesystem. I am curious if it really did create a vfat filesystem in the other thread.
DESCRIPTION
mke2fs is used to create an ext2, ext3, or ext4 filesystem, usually in a disk partition.
device is the special file corresponding to the device (e.g /dev/hdXX). blocks-count is the
number of blocks on the device. If omitted, mke2fs automagically figures the file system size.
If called as mkfs.ext3 a journal is created as if the -j option was specified.
The defaults of the parameters for the newly created filesystem, if not overridden by the
options listed below, are controlled by the /etc/mke2fs.conf configuration file. See the
mke2fs.conf(5) manual page for more details.
Quote:
excerpt from 'man mke2fs';
-t fs-type
Specify the filesystem type (i.e., ext2, ext3, ext4, etc.) that is to be created. If
this option is not specified, mke2fs will pick a default either via how the command was
run (for example, using a name of the form mkfs.ext2, mkfs.ext3, etc.) or via a default
as defined by the /etc/mke2fs.conf(5) file. This option controls which filesystem
options are used by default, based on the fstypes configuration stanza in
/etc/mke2fs.conf(5).
If the -O option is used to explicitly add or remove filesystem options that should be
set in the newly created filesystem, the resulting filesystem may not be supported by
the requested fs-type. (e.g., "mke2fs -t ext3 -O extents /dev/sdXX" will create a
filesystem that is not supported by the ext3 implementation as found in the Linux ker-
nel; and "mke2fs -t ext3 -O ^has_journal /dev/hdXX" will create a filesystem that does
not have a journal and hence will not be supported by the ext3 filesystem code in the
Linux kernel.)
The user would have to modify '/etc/mke2fs.conf' to use alternate FS. Why?
I did but cfdisk did not show the label created by mkdosfs's -n option. Thunar found it OK, displayed it and used it when creating the temporary mountpoint/directory in /media.
That's why I was looking for an alternative way of creating the label, hoping it might be more widely visible.
The user would have to modify '/etc/mke2fs.conf' to use alternate FS. Why?
I wasn't surprised that it didn't work (was half-hopeful, based on the December thread's advice given and reported success -- and that the ext2 utilities work on ext3 and ext4) but was surprised that it did not halt on error when an invalid -t option value was given.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.