pjh@mccc.UUCP (Pete Holsberg) (01/26/89)
In looking through /dev for diskette device files, I came across a puzzling set of directory listings. For example, for the device 1,0, I can find no less than 13 different entries with 6 different names and 3 different link counts! Here they are (number of links in parens): /dev/SA: diskette (1), f0q15dt (5) /dev/rSA: diskette (1), f0q15dt (6 !!) /dev/dsk: 0s24 (5), f0q15dt (5 !!), fd (5), fd096 (5) /dev/rdsk: 0s24 (6 !!), f0q15dt (6 !!), fd (6 !!), fd096 (6 !!) /dev/dos: A (6) Can someone explain this? Also, someone sent me some disks that he claims are 720K, 9 sectors/track, 80 track animals, and says that they can be read with /dev/dsk/f05qt. There ain't no f05qt in /dev/*. How can I read these? Thanks. -- Pete Holsberg UUCP: {...!rutgers!}princeton!mccc!pjh Mercer College CompuServe: 70240,334 1200 Old Trenton Road GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800
wnp@dcs.UUCP (Wolf N. Paul) (01/27/89)
In article <582@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes: > >In looking through /dev for diskette device files, I came across a >puzzling set of directory listings. For example, for the device 1,0, I >can find no less than 13 different entries with 6 different names and 3 >different link counts! Here they are (number of links in parens): > >/dev/SA: diskette (1), f0q15dt (5) >/dev/rSA: diskette (1), f0q15dt (6 !!) >/dev/dsk: 0s24 (5), f0q15dt (5 !!), fd (5), fd096 (5) >/dev/rdsk: 0s24 (6 !!), f0q15dt (6 !!), fd (6 !!), fd096 (6 !!) >/dev/dos: A (6) > >Can someone explain this? Yes! One of the nice things about UNIX is multiple links to the same inode (i.e. file or device). This allows one to call the same file different names, depending on which application wants to access it, or what purpose it is to be used for. In the list above, the following names are all links to the same device, namely the raw interface to the first floppy drive: /dev/rdsk/fd, /dev/rdsk/f0q15dt, /dev/rdsk/fd096, /dev/rdsk/0s24, dev/dos/A, and /dev/rSA/f0q15dt. The devices in /dev/SA and /dev/dsk should have a different major number from the ones in rSA and rdsk, but are otherwise identical. Some of these names are required by different programs; for example, the DOS file access programs (doscat, doscp, dosdir) need the /dev/dos/A entry. Others are simply different naming conventions indicating what the capacity of that particular device is (i.e., fd096 indicates a 96 tpi disk drive, f0q15dt indicates a quad density (96tpi) device formatted with 15 sectors doublesided, etc.). Some systems (i.e. V/AT) also link the first floppy in it's high capacity version to /dev/rmt/mt0, or /dev/tar, as the default device for tar(1), since such systems often have no actual tape drive. On my system, I have added /dev/dos/a, so I don't have to capitalize the drive letter when using the dos commands, as well as special mnemonic names for my two floppies in their various modes (these exist both in /dev/dsk and in /dev/rdsk): fd0dd # Drive 0, Double Density (360K) fd0qd # Drive 0, Quad Density (720K -- a better use of DS/DD disks) fd0hd # Drive 0, High Density (1.2M -- the standard AT format) fd1qd # Drive 1, Quad Density (3.5", 720K) fd1xd # Drive 1, eXtra Density (3.5", 1.44MB) I do not know what the /dev/SA and /dev/rSA directories on V/386 are, but would guess that they are for the use of some System Administration utility. As to the 720K drive entries, on V/AT they are as follows (Maybe someone knowledgable on V/386 could confirm these numbers or else provide more accurate ones): Raw devices: Drive 0, 5.25" 720K ......... Major 6, Minor 87 Drive 0, 3.5" 720K ......... Major 6, Minor 119 Drive 0, 3.5" 1.44M ........ Major 6, Minor 102 Drive 1, 5.25" 720K ......... Major 6, Minor 95 Drive 1, 3.5" 720K ......... Major 6, Minor 127 Drive 1, 3.5" 1.44M ........ Major 6, Minor 110 Block Devices: Drive 0, 5.25" 720K ......... Major 1, Minor 87 Drive 0, 3.5" 720K ......... Major 1, Minor 119 Drive 0, 3.5" 1.44M ........ Major 1, Minor 102 Drive 1, 5.25" 720K ......... Major 1, Minor 95 Drive 1, 3.5" 720K ......... Major 1, Minor 127 Drive 1, 3.5" 1.44M ........ Major 1, Minor 110 You can just "mknod" these devices with these numbers, and whatever names you feel comfortable with. And by the way, Pete, would you let me know by email what the status of Larry Gensch's XCOMM is? When is his next version coming out? What does one hear on CIS on that subject? Wolf -- Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101 UUCP: killer!dcs!wnp ESL: 62832882 DOMAIN: dcs!wnp@killer.dallas.tx.us TLX: 910-380-0585 EES PLANO UD