Ken Foskey wrote:
> How do I create a floppy disk from Unix.

1. to format a floppy disk under Linux you use the 'fdformat' command.
   The man pages for this ie 'man fdformat' will tell you heaps. 

   Example: to format the first floppy disk which is fd0 to High Density
1.44 Meg we use:
   (the $ is the prompt) 

$ fdformat /dev/fd0H1440 
$ Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
$ Formatting ... done
$ Verifying ... Problem reading cylinder 3, expected 18432, read 12288

Ohhhhh... a bad floppy well.
(You can even try for fdformat /dev/fd0H1722)

2. Now we actually put a file system on it. With DOS/Windows you can
only put one type of file system on a floppy but Linux can read and
write many different systems from DOS to Windows to Macintosh and dozens
more so we have to use another comand to say what we want to put on it.
Windows users have it easy eh :-) In the next few commands read the man
pages for mkfs (short for make file system) to find out what the -c and
-v are for :-)

This is how to write a msdos file system to your newly formatted floppy:
/sbin/mkfs -t msdos -c -v /dev/fd0

This is how to write a Windows file system to your newly formatted
floppy:
/sbin/mkfs -t vfat -c -v /dev/fd0

This is how to write a Linux file system to your newly formatted floppy:
/sbin/mkfs -t ext2 -c -v /dev/fd0

Here is a transcript of when I just did it a few mins ago....
$ /sbin/mkfs -t ext2 -c -v /dev/fd0
mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
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

Running command: badblocks -b 1024 -s /dev/fd0 1440
Checking for bad blocks (read-only test): done                        
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

3. Now its ready. But before we can write to it we have to mount it.
Again 'man mount' for fun.

mount -t ext2 /dev/fd0 /mnt

Now you can copy to it like so:
cp myfile /mnt

Don't forget to unmount it before you pull out the floppy
umount /mnt


Next read up on the fstab file as putting some info in there about the
/dev/fd0 will make life easier and you wont have to type as much next
time. Thats for another day :-)

Best wishes
Mike
-- 
--------------------------------------------------------------------
Michael Lake
University of Technology, Sydney
Email: mailto:[EMAIL PROTECTED] Ph: 02 9514 1724 Fx: 02 9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything technical.
--------------------------------------------------------------------

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to