From 91c5268d54272862cfd9a6cdcebf052ec369a0d7 Mon Sep 17 00:00:00 2001 From: Jim Mock Date: Thu, 31 Jan 2002 07:57:52 +0000 Subject: [PATCH] Add a section on floppy drives to the disks chapter. PR: 33164, 34474 33164 Submitted by: Julio Merino 34474 Submitted by: Tom Rhodes --- .../books/handbook/disks/chapter.sgml | 154 +++++++++++++++++- 1 file changed, 151 insertions(+), 3 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml index 36457f92d8..67eb12fad3 100644 --- a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml @@ -1994,14 +1994,162 @@ echo "The floppy has been unmounted and is now ready."]]> + + + + + Julio + Merino + Contributed by + + + + + + Floppy disks + + Floppy disks are, nowadays, an old-fashioned medium to + store/share data. Although, there are still some times when you + need to use them, because you do not have any other removable + storage media or you need to use what you have saved in them on + any other computer. + + This section will explain how to use floppy disks in + FreeBSD, that is, formating and copying/restoring data from + them. But... I really have written this to help you about how to + create forced-size floppies. + + + The device + + Floppy disks are accessed throught entries in + /dev (like any other device). To access the + raw floppy disk you can use /dev/rfdX, + where X stands for the drive number, usually 0. When the disk is + formatted you can use /dev/fdX, or + whichever of the other devices named + /dev/fdXY, where Y stands for a + letter. These are all the same. + + Other important devices are + /dev/fdX.size, where size is a floppy disk + size in kilobytes. These entries are used at low-level format + time to determine the disk size. + + Sometimes you will have to (re)create these entries under + /dev. To do it, you can issue: + + &prompt.root; cd /dev && ./MAKEDEV "fd*" + + + + Formatting + + A floppy disk needs to be low-level formated before it can + be used. This is usually done by the vendor but you may want to + do it to check media integrity or to force the disk capacity to + be bigger. + + To format the floppy at a low-level fashion you need to + use fdformat. This utility expects + the device name as an argument. We will use those + /dev/fdX.size devices, which will allow us + to format the floppy to its real size, or force them. So you + insert a new 3.5inch floppy disk in your drive and issue: + + &prompt.root; /usr/sbin/fdformat /dev/rfd0.1440 + + This will take a while... You should notice any disk error + here (this can help you determining which disks are good or + bad). + + To force the floppy disk size, we will use other entries + in /dev. Get the same floppy and issue: + + &prompt.root; /usr/sbin/fdformat /dev/rfd0.1720 + + It will take some more time than before (forced disks are + slower). When it finishes, you will have a 1720kb floppy disk, + but for the moment you will not notice any difference. You may + use other disk sizes that you can find in /dev, but the most + stable/compatible is the 1720kb for 3.5inch disks. + + + + The disklabel + + After low-level formatting the disk, you will need to + place a disklabel on it. This disklabel will be destroyed + later, but it is needed by the system to determine the size of + the disk and its geometry later. + + The new disklabel will take over the whole disk, and will + contain all the proper information about the geometry of the + normal or forced floppy. Take a look to + /etc/disktab now; you will see geometry + values of all kinds of floppy disks. + + You can run now disklabel + like: + + &prompt.root; /sbin/disklabel -B -r -w /dev/rfd0 fd(size) + + Replace fd(size) with fd1440, fd1720 or whichever size you + want. The last field instructs disklabel which entry to take + from /etc/disktab to use. + + + + The filesystem + + Now your floppy is ready to be high-level formated. This + will place a new filesystem on it, which will let FreeBSD read + and write to the disk. After creating the new filesystem, the + disklabel is destroyed, so if you want to reformat the disk, you + will have to recreate the disklabel another time. + + You can choose now which filesystem to use on your floppy. + You can use UFS or FAT, though UFS is not a good idea for + floppies. Choose FAT which is nice for floppies. + + To put a new filesystem on the floppy do this: + + &prompt.root; /sbin/newfs_msdos /dev/fd0 + + As we created a disklabel before, newfs + will be able to fetch disk data and construct the new + filesystem. And now, your disk is ready for use... + + + + Using the floppy + + You have two choices to use the floppy. You can either + mount the disk with mount_msdos, or you can + use mtools. + Mtools are great, but you will need + to install them from the ports system. + + Try it; issue a mdir. If you forced the + disk, you will notice its extra size! + + A last note about forced disks: they are compatible with + practically all other operating systems without any external + utility to read/write them. Microsoft systems will recognize + them without problems. But note that there may be times when the + floppy drive itself is not able to read them (this may happen + with very old drives). + + + Backups to Floppies Can I Use floppies for Backing Up My Data? - backup floppies - floppy disks - + backup floppies + floppy disks + Floppy disks are not really a suitable media for making backups as: