LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-02-2004, 05:52 AM   #1
lorenzo111
LQ Newbie
 
Registered: Dec 2003
Distribution: REDHAT9,MANDRAKE 9.2,LIBRANET 2.8.1,ELX
Posts: 9

Rep: Reputation: 0
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
 
Old 01-02-2004, 11:41 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
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

Last edited by kilgoretrout; 01-02-2004 at 12:54 PM.
 
Old 01-02-2004, 04:36 PM   #3
lorenzo111
LQ Newbie
 
Registered: Dec 2003
Distribution: REDHAT9,MANDRAKE 9.2,LIBRANET 2.8.1,ELX
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 01-05-2004, 02:47 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
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.
 
Old 04-27-2004, 12:17 PM   #5
dkemper
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
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.
 
Old 05-03-2004, 12:36 PM   #6
gandalf2041
Member
 
Registered: Jul 2003
Location: Sunny Florida, USA
Distribution: Ubuntu 6.06 LTS
Posts: 53

Rep: Reputation: 15
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

Last edited by gandalf2041; 05-03-2004 at 12:41 PM.
 
Old 05-03-2004, 04:45 PM   #7
dkemper
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
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.)
 
  


Reply



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
Formatting a usb drive guldo Linux - Hardware 11 10-09-2005 11:16 AM
Formatting USB ZIP Drive solarisrob Solaris / OpenSolaris 1 08-01-2005 02:44 PM
formatting a usb flash drive zatka Linux - Hardware 2 12-12-2004 08:04 AM
boot from floppy drive then insall linux redhat9 from HARD DRIVE Shiraz Ahmed Linux - Software 0 08-23-2004 05:11 AM
Formatting USB Floopy Drive RedHat9 lorenzo111 Linux - Newbie 2 01-03-2004 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:07 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
Open Source Consulting | Domain Registration