LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Formatting Floppy Usb Drive Redhat9 (https://www.linuxquestions.org/questions/red-hat-31/formatting-floppy-usb-drive-redhat9-130793/)

lorenzo111 01-02-2004 05:52 AM

Formatting Floppy Usb Drive Redhat9
 
I feel bad on posting this because this should be something easy to figure out but it has me whipped I can mount my floopy read and write to it but when it comes to formatting all I can format it is ext2 filesystem but I want to format it to vfat here is the command I have been trying to use

/sbin/mkfs -t vfat /dev/sda
mkfs.vfat 2.8 (28 Feb 2001)
mkfs.vfat: Will not try to make filesystem on '/dev/sda'

but when I try to make ext2 no problem heres the output
/sbin/mke2fs /dev/sda
mke2fs 1.32 (09-Nov-2002)
/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
184 inodes, 1440 blocks
72 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
184 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost downloads]#

but I want vfat tried also the fdformat command
fdformat /dev/sda
Could not determine current format type: Invalid argument
I will appreciate any help getting a headache from looking on the web for a simple answer

kilgoretrout 01-02-2004 11:41 AM

This ones easy. Floppies can't be formatted FAT32(vfat); you should format them FAT(msdos). Try running:

# /sbin/mkfs -t msdos /dev/sda 1440

lorenzo111 01-02-2004 04:36 PM

this is what i get when trying that one

[root@localhost lorenzo]# /sbin/mkfs -t msdos /dev/sda 1440
mkfs.msdos 2.8 (28 Feb 2001)
mkfs.msdos: Will not try to make filesystem on '/dev/sda'

this is so simple its frustrating I appreciate any help

kilgoretrout 01-05-2004 02:47 PM

Just for grins, you can try to format using /dev/fd0 instead of /dev/sda. IIRC my mandrake install on my laptop creates an fd0 for my usb floppy through which I access the floppy drive.

dkemper 04-27-2004 12:17 PM

lorenzo111,

Did you figure out how to make this work? I'm running into the same problem now, on RHEL3. The last suggestion posted here doesn't work for me; on my system /dev/fd0 is a different major number than /dev/sda.

gandalf2041 05-03-2004 12:36 PM

Try this:
Low level format first,
Code:

fdformat -n  /dev/fd0H1440
Then:
lay down the filesystem,
Code:

mkfs.vfat /dev/fd0
You could also try mformat from the mtools package. It's easier if all you're trying to do is create a DOS compatible floppy. This IS a normal floppy right? Why are you using /dev/sda?

Edit: OOPS! My bad. Should've paid more attention to the title. Try /dev/sd0

dkemper 05-03-2004 04:45 PM

fdformat, like mkfs, has trouble with floppy drives that are not /dev/fd*.

I've figured out how to make mkfs work. The command

Code:

mkfs -t vfat /dev/sda
fails, but

Code:

mkfs -t vfat /dev/sda1
works. mkfs balks when no partition number is given,. In the case of ext2, it prompts for confirmation (as the first note in this thread illustrates). In the case of vfat, it just fails with a meaningless error message.

As the man page explains, mkfs is just a front-end to various other commands to make specific types of file systems. However, since mkfs is trying to present a consistent user interface, it would be nice if the commands themselves worked more consistently. (Also, for floppy drives, it is really more correct to refer to the entire device rather than a partition thereof.) Still, this discrepancy would be only a minor annoyance, except for the fact that the error message returned by "mkfs -t vfat" when the wrong device is given--"Will not try to make filesystem on '/dev/sda'"--is useless. It gives no information about why the command fails or how one might correct it.

You can force mkfs to work without adding the partition number to the device: for ext2, use the -F option (which skips the warning prompt), and for vfat use the -I option. Also, as a slight correction to kilgoretrout's first post in this thread, mkfs.msdos and mkfs.vfat are in fact hard links to the same file, so they do the same thing (create a vfat file system).

I have not yet figured out how to make fdformat work with a USB drive. "fdformat /dev/sda" and "fdformat /dev/sda1" both fail with an "Invalid argument" error. The man page implies fdformat is hard-coded to recognize only drives with a major number of 2. (USB drives are major number 8.)


All times are GMT -5. The time now is 10:17 AM.