Making a dos floppy

Phil Schaffner Philip.R.Schaffner at nasa.gov
Tue May 17 18:08:27 UTC 2005


On Tue, 2005-05-17 at 10:48 -0500, fredex wrote:
> On Tue, May 17, 2005 at 08:30:19AM -0500, akonstam at trinity.edu wrote:
> > On Tue, May 17, 2005 at 05:52:58AM -0400, Neal Wilkinson wrote:
> > > How do I make a dos floppy in Fedora? I've looked around and all I
> can
...
> 
> One more data point: Here's a script I've been using for years:

Nice script.

> 
> 
>         #!/bin/sh
>         echo fdformat $1
...
> 
> If you only have that one drive you can replace all the instances of
> "$1"
> with "/dev/fd0H1440" and then run it without arguments.

Or default it to /dev/fd0:

#!/bin/sh
if [ -z "$1" ] ; then
    FLOPPY=/dev/fd0u1440
else
    FLOPPY="$1"
fi
echo fdformat $FLOPPY
fdformat $FLOPPY && echo /sbin/mkdosfs -vc $FLOPPY && /sbin/mkdosfs -vc $FLOPPY
echo -n "Format another? [y/N]: "
read kb
case $kb in
    Y)
        exec $0 $FLOPPY
        ;;
    y)
        exec $0 $FLOPPY
        ;;
    *)
        echo "Leaving $0,... Bye!"
	;;
esac

Phil





More information about the users mailing list