Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hao!oddjob!gargoyle!ihnp4!homxb!houxj!wapd From: wapd@houxj.UUCP (Bill Dietrich) Newsgroups: comp.sys.att Subject: Re: cpio for DOS and 3b2 - followup Message-ID: <323@houxj.UUCP> Date: Tue, 20-Oct-87 13:42:24 EDT Article-I.D.: houxj.323 Posted: Tue Oct 20 13:42:24 1987 Date-Received: Thu, 22-Oct-87 00:12:05 EDT References: <1647@dasys1.UUCP> <144800003@tiger.UUCP> Organization: AT&T Bell Laboratories, Holmdel Lines: 39 Summary: 3b2 floppy format > > 1. The 3B2 floppy drive formats 360K floppies so that they can store > > 720K bytes by writing 80 tracks/side, two sides, with 9 sectors/track. > > Since there are 512 bytes/sector, the total capacity is 737280 bytes. > > I beg to differ. ... > # dd if=/dev/diskette of=/usr/tmp/temp > Your output file, the image of all information on the floppy minus the > format, comes to 728,064 bytes. The actual physical floppy does contain the 737280 bytes mentioned above. But the last cylinder is hidden; it is used to hold a Physical Descriptor Sector that the operating system (the driver) reads. When you access any of the normal floppy disk device files (/dev/diskette, /dev/rsave, etc) you get only 79 cylinders worth, called the "logical disk". Which part of the logical disk you get further depends on the VTOC (Volume Table of Contents) which says things like "partition 5 == cylinders 30 to 78" (numbers chosen at random; try "prtvtoc" to see what they are). So if you access partition 5 (whatever special device file has minor number 5), you get that subset of the floppy. "/dev/diskette" happens to be partition 6, which is cylinders 0-78 (everything but the last cylinder, cylinder 79). Hard disks work like floppies, with some differences : PDSECT - stored on 1st cylinder of hard disk, last of floppy. VTOC - stored on 2nd cylinder of hard disk, hardcoded in driver for floppy. There are more things, like defect maps and error logs, on hard disks. The "fmtflop" command formats the floppy (physically) and then puts the PDSECT on it (sort of a logical formatting). There are special IOCTL calls to the driver to read/write any part of the physical disk, including the parts outside the logical disk. All this is documented in some driver design guide somewhere, I think (I hope). Bill Dietrich houxj!wapd