1825162 Members
2391 Online
109679 Solutions
New Discussion юеВ

Format a floppy disk

 

Format a floppy disk

Hi all,

I would like know the command to format a floppy disk to a dos format. But in the file /etc/default/fs, i have only the option :
LOCAL=hfs.

Best regards
7 REPLIES 7
melvyn burnard
Honored Contributor

Re: Format a floppy disk

you need to have the DOS utilities installed, and use a coommand like dosfmat (I think that is hte command)
do swlist -l file | grep MSDOS
and see if you have them
LOng time since I played with htese commands
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!

Re: Format a floppy disk

I think that the command is :
mediainit -v -i 2 -f16 /dev/rfloppy/c0t1d0
and after i must launch the command : newfs -F ibm_1440 /dev/rfloppy/c0t1d0

This command last command does not work!
Trond Haugen
Honored Contributor

Re: Format a floppy disk

If I remember right there are several /usr/bin/dos* commands, but none to format a floppy. A trick might be to use dd to copy a image of a formated floppy to a file, and later dd that file to the floppy you want to format.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Robert-Jan Goossens
Honored Contributor

Re: Format a floppy disk

Bill McNAMARA_1
Honored Contributor

Re: Format a floppy disk

If you have an hp xterm you can do it via the F12 > Floppy > Format section.
It works for me (tm)
Darren Prior
Honored Contributor

Re: Format a floppy disk

Hi,

I haven't really played with dosls and those other utilities since HP-UX 9. However your mediainit command looks OK (from other docs I've seen), though I think the newfs won't work as you haven't got an ibm_1440 in /sbin/lib/mfsconfig.d/. I'm not sure if a newfs -F hfs of the device will give you the correct result, but could be worth trying.

I'd suggest the easiest option is to format the disks in a PC. :)

regards,

Darren.
Calm down. It's only ones and zeros...
Frank Slootweg
Honored Contributor

Re: Format a floppy disk

Most diskettes are already pre-formatted in 'DOS' format, so their is no need to format them.

Also you should not re-format diskettes if they give problems, but you should throw them away.

As mentioned, if you want to do a *high* level format (HLF), i.e. put a DOS filesystem on it (because it was possibly wiped in some way), then it is best to do that on a PC.

If that is not possible, you can use dd(1) as Trond indicated, i.e.

Take an empty, DOS-formatted diskette and then do:

dd if=/dev/... bs=9k | compress >blank_DOS_image.Z

and *keep* blank_DOS_image.Z somewhere.

Then when you need to DOS-HLF a diskette (which is already LLFed), then do:

zcat < blank_DOS_image.Z | dd bs=9k of=/dev/...