From martink@shell.linux.se Wed Apr 9 15:28:59 2003 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CCB637B401 for ; Wed, 9 Apr 2003 15:28:59 -0700 (PDT) Received: from mf1.bredband.net (mf1.bredband.net [195.54.106.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C4E543F75 for ; Wed, 9 Apr 2003 15:28:55 -0700 (PDT) (envelope-from martink@shell.linux.se) Received: from localhost.036-23-6f72652.cust.bredbandsbolaget.se ([213.112.193.73]) by mf1.bredband.net with ESMTP id <20030409222854.LKSK269.mf1@localhost.036-23-6f72652.cust.bredbandsbolaget.se> for ; Thu, 10 Apr 2003 00:28:54 +0200 Received: from c-49c170d5.036-23-6f72652.cust.bredbandsbolaget.se (localhost [127.0.0.1]) by localhost.036-23-6f72652.cust.bredbandsbolaget.se (8.12.9/8.12.9) with ESMTP id h39MSsJU037257 for ; Thu, 10 Apr 2003 00:28:54 +0200 (CEST) (envelope-from martink@c-49c170d5.036-23-6f72652.cust.bredbandsbolaget.se) Received: (from martink@localhost) by c-49c170d5.036-23-6f72652.cust.bredbandsbolaget.se (8.12.9/8.12.9/Submit) id h39MSmsj037256; Thu, 10 Apr 2003 00:28:48 +0200 (CEST) (envelope-from martink) Message-Id: <200304092228.h39MSmsj037256@c-49c170d5.036-23-6f72652.cust.bredbandsbolaget.se> Date: Thu, 10 Apr 2003 00:28:48 +0200 (CEST) From: Martin Karlsson Reply-To: Martin Karlsson To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: [PATCH] Update of the handbook (12.6, floppy disks) X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 50761 >Category: docs >Synopsis: [PATCH] Update of the handbook (12.6, floppy disks) >Confidential: no >Severity: non-critical >Priority: low >Responsible: murray >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 09 15:30:09 PDT 2003 >Closed-Date: Sun May 04 00:25:28 PDT 2003 >Last-Modified: Sun May 04 00:25:28 PDT 2003 >Originator: Martin Karlsson >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD c-49c170d5 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Apr 9 07:10:02 CEST 2003 root@c-49c170d5:/usr/obj/usr/src/sys/K20030406 i386 >Description: Section 12.6 of the handbook, "Creating and Using Floppy Disks", doesn't quite apply to 5.0 or newer. It also uses a rather informal style, and contains some grammatical errors. This patch aims to fix this. The modified chapter can be viewed at URL:http://www.krutov.org/martink/floppy/floppies.html >How-To-Repeat: Read section 12.6 of the handbook. >Fix: --- floppy.diff begins here --- Index: chapter.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v retrieving revision 1.145 diff -u -r1.145 chapter.sgml --- chapter.sgml 2003/03/26 02:11:55 1.145 +++ chapter.sgml 2003/04/09 21:47:06 @@ -1096,148 +1096,187 @@ Julio Merino - Contributed by + Original work by + + + Martin + Karlsson + Rewritten by + + + Creating and Using 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. + Storing data on floppy disks is sometimes useful, for example + when one does not have any other removable storage media or when one needs + to transfer small amounts of data to another 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. + FreeBSD, and will cover formating, copying, and restoring data from + floppies. - The device + Formatting floppies + + + The device - Floppy disks are accessed through entries in - /dev (like any other device). To access the - raw floppy disk you can use /dev/fdX, - 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*" - In FreeBSD 5.0, &man.devfs.5; will automatically - manage device nodes in /dev, so use of - MAKEDEV is not necessary. + Floppy disks are accessed through entries in + /dev, just like other devices. To access the + raw floppy disk one uses /dev/fdN, + where N stands for the drive number, + usually 0, or in 4.8 or older + /dev/fdNX, + where X stands for a letter. + + In 5.0 or newer, simply use + /dev/fdN. + + + The disk size in 4.8 or older versions + + There are also /dev/fdN.size + devices, where size is a floppy disk + size in kilobytes. These entries are used at low-level format + time to determine the disk size. + + Sometimes the entries under /dev will + have to be (re)created. To do that, issue: + + &prompt.root; cd /dev && ./MAKEDEV "fd*" + + + + The disk size in 5.0 or newer versions + + In 5.0, &man.devfs.5; will automatically + manage device nodes in /dev, so use of + MAKEDEV is not necessary. + + The desired disk size is passed to &man.fdformat.1; through + the -f flag. Supported sizes are listed in + &man.fdcontrol.8; + + + + + Formatting + + A floppy disk needs to be low-level formated before it can + be used. This is usually done by the vendor, but formatting is a good way + to check media integrity. It can also be used to force a larger + disk size. + + To low-level format the floppy disk you need to + use &man.fdformat.1;. This utility expects + the device name as an argument. + + Forced disks will take longer to format due to + the larger disk size. Other disk + sizes found in /dev can be used, + but the most stable and compatible forced + size is 1720kB for 3.5inch disks. + + Make note of any disk error , as this can help determining if + the disk is good or bad. + + + Formatting in 4.8 or older versions + + Use the + /dev/fdN.size devices + to either format the floppy to its real size, or to force a larger + disk size. Insert a new 3.5inch floppy disk in your drive and issue: + + &prompt.root; /usr/sbin/fdformat /dev/fd0.1440 + + To force the floppy disk size, use other entries + in /dev. With the same floppy, issue: + + &prompt.root; /usr/sbin/fdformat /dev/fd0.1720 + + + + Formatting in 5.0 or newer versions + + Use the /dev/fdN + devices to either format the floppy to its real size, or to force a larger + disk size. Check &man.fdcontrol.8; for the size you want the disk to + have. Insert a new 3.5inch floppy disk in your drive and issue: + + &prompt.root; /usr/sbin/fdformat -f 1440 /dev/fd0 + + To force the floppy disk size, use other entries + in /dev. With the same floppy, issue: + + &prompt.root; /usr/sbin/fdformat -f 1720 /dev/fd0 + + - - 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 &man.fdformat.1;. 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/fd0.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/fd0.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. + 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. + contain all the proper information about the geometry of the + normal or forced floppy. The geometry values for the disklabel + are listed in /etc/disktab now. - You can run now &man.disklabel.8; - like: + You can run now &man.disklabel.8; like so: &prompt.root; /sbin/disklabel -B -r -w /dev/fd0 fdsize - - Replace fdsize with fd1440, fd1720 or whichever size you - want. The last field instructs disklabel which entry to take - from /etc/disktab to use. + + Replace fdsize with + fd1440, fd1720 or whichever size you + want. The last field instructs disklabel which entry + from /etc/disktab to use. The file system + + Now the floppy is ready to be high-level formated. This + will place a new file system on it, which will let FreeBSD read + and write to the disk. After creating the new file system, the + disklabel is destroyed, so if you want to reformat the disk, you + will have to recreate the disklabel. - Now your floppy is ready to be high-level formated. This - will place a new file system on it, which will let FreeBSD read - and write to the disk. After creating the new file system, 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 file system 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. + The floppy's file system can be either UFS or FAT. + FAT is generally a better choice for floppies. - To put a new file system on the floppy do this: + To put a new file system on the floppy, issue: &prompt.root; /sbin/newfs_msdos /dev/fd0 - As we created a disklabel before, &man.newfs.8; - will be able to fetch disk data and construct the new - file system. And now, your disk is ready for use. + The disk is now ready for use. + Using the floppy - - You have two choices to use the floppy. You can either - mount the disk with &man.mount.msdos.8;, 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! + To use the floppy, mount it with &man.mount.msdos.8; (in 4.8 or older) or + &man.mount.msdosfs.8; (in 5.0 or newer). + One can also use mtools from the ports collection. 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). + utility to read from them or write to them. Microsoft™ systems + will recognize them without problems. Note however that there may be + times when the floppy drive itself is not able to read them, for example + when using very old drives. --- floppy.diff ends here --- >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-doc->murray Responsible-Changed-By: murray Responsible-Changed-When: Sat Apr 12 19:27:49 PDT 2003 Responsible-Changed-Why: I'll work on this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=50761 State-Changed-From-To: open->feedback State-Changed-By: murray State-Changed-When: Sat Apr 26 00:12:43 PDT 2003 State-Changed-Why: This looks good, but the discussion about "FreeBSD 4.8 and older" should be reworded. This will be wrong when we release FreeBSD 4.9. We really want to refer to "4.X and earlier releases" or something. We should not single out 4.8 or 4.9 for that matter, because we just don't know what the last release on the 4.X branch will be and we don't want to have to update this later. You've made a lot of great improvements, so if you can update this patch to take this into account then I can commit it. Thanks for the submission. http://www.freebsd.org/cgi/query-pr.cgi?pr=50761 State-Changed-From-To: feedback->closed State-Changed-By: murray State-Changed-When: Sun May 4 00:24:56 PDT 2003 State-Changed-Why: Thanks for sending me another patch! I've committed your patch with just minor modifications. Thanks for working on FreeBSD Documentation! http://www.freebsd.org/cgi/query-pr.cgi?pr=50761 >Unformatted: