Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!versatc!ubvax!ardent!rap!rap From: rap@rap.ardent.com (Rob Peck) Newsgroups: comp.sys.amiga Subject: Hard Disks Summary: So what'd I leave out??? (LONG) Keywords: NEW USER HELP AMIGA COMPANION Message-ID: <6385@ardent.UUCP> Date: 9 May 89 17:15:58 GMT Sender: news@ardent.UUCP Reply-To: rap@rap.ardent.com (Rob Peck) Distribution: na Organization: Ardent Computer Corp., Sunnyvale, CA Lines: 485 This material is extracted and paraphrased from three or more messages that passed my way across Usenet in the past few months. Recently I had posted a message here and on People Link asking "For the problems that you, now a (happy?) hard disk owner might have had installing your drive, what information do you wish had been more clear in the manual that you received that might have saved you lots of time and effort?" I received only a very small number of replies, seeming that so many of the users here already had enough technical background to have avoided the likely pitfalls. So I searched through the messages I had saved and came up with this as an Appendix to the Second Edition of the Amiga Companion. The largest problem that I have at this point is that though the arithmetic looks pretty good in this information and I trust the word of those whose material I'd like to use here, I myself do not yet have a hard drive and could not check it for accuracy. Amiga World will be checking it... thats not what this message is about... since I received so few responses overall, I wanted to ask the Amiga Usenet community "WHAT, if anything, did I leave out (of this new Appendix) that might be important to know, that is not, in general, in the manuals that come with hard disk controllers?" Specific manufacturer product recommendations are inappropriate, but generic "help!" recommendations hints, tips etc are welcome. Given a limited space availability in the book and VERY limited time to add much to this, can anyone suggest additions or corrections? I need feedback no later than May 15 to have a shot at inserting anything new. Many thanks in advance. Please respond directly to me via EMAIL .... see the Reply-To above, or for not-so-smart mailers, use the path: ...uunet!ardent!rap Rob Peck PS - As a side note to EDWIN, who posts the intro material monthly, the address and phone number for "kjohn" has CHANGED and is correct in this posting. He says that it is still OK to publish his address and phone number and he is also still willing to help advise folks regarding problems. I made a few minor edits in his article; you might consider using this slightly modified version. ******************************************************************* New Appendix to the Amiga Companion - "For Hard Disk Users" ============================================================ This appendix contains information posted originally on Usenet, a public access network that allows users with common interests to correspond on various topics by using electronic mail. Unlike bulletin board systems, there is no central repository for the information... the machines in the system all receive and forward electronic mail and the local system administrators decide how much space to dedicate to that mail and how long to keep it online. Fortunately, it was possible to save these messages for you before they disappeared into the "ether". I hope they help answer your hard drive questions. The information comes to you courtesy of Larry Phillips, a SYSOP (system operator) on CompuServe, from Ken Barry, John Mesiavech, and John Kjellman, who, like myself, contribute to the continuing dialog (multilog?) that appears on Usenet. My own comments are embedded in square brackets, and the rest is directly from the contributors (with occasional minor edits installed). Many thanks to all of the contributors named here (and the very many others) for giving their time to help the Amiga community. [ A Potential Hard Disk User asks: ] > When I get my hard disk, will it be possible to partition the > drive so that I can have separate sections on the disk for > AmigaDOS, MS-DOS and WangDOS? [ Yes, most likley it is possible. The information given in this appendix shows you how AmigaDOS partitioning happens. Depending on the type of software you have for the other DOS operating systems with which you'd share the disk, you'll be creating similar partitioning tables for each of them. ] [ You'd have two choices for handling the situtation. Choice 1 is simply to specify, for each operating system, the exact list of tracks (LowCyl and HighCyl) that it is entitled to use, each in its own separate file... in other words, regarding the organization of the disk, tell each system ONLY about its own partition. Choice 2 (preferred) would be to tell BOTH systems about the WHOLE disk's organization... that is, define a partition for DH0: (an AmigaDOS partition, for example), and a partition for MS0: (and MSDOS partition), but though the entry exists in your mountlist, simply DO NOT MOUNT the non-AmigaDOS partition in AmigaDOS. It exists, then, as a reminder to you NOT to change your partitioning unless you change the corresponding entry for the other filing system. Do the same in the other environment(s) if possible. ] ======================== [ Ken Barry asks ]: ======================== > I just got a Quantum 80-meg for my Amiga 1000, > [...] > the Quantum docs show that the Quantum has two zones >on it, with different numbers of sectors/track in each zone, and I >don't know how to write a MountList entry to accommodate this. > I imagine I could partition the drive into two logical drives, >with the dividing line where the number of sectors/track changes, but I >don't want to do this. I like having one big partition, and I don't >want to have to reload the whole drive in any case. Can anyone give me >any hints on a MountList entry? [ Larry Phillips responds ] : ============================== [ (Paraphrased from Larry's original answer)...] [ You must calculate the total number of blocks available, and make a mountlist that has entries reflecting the total blocks because the Amiga SCSI software treats a SCSI disk drive as though it is just a batch of data blocks. ] [ Lets say that your drive has a total of 100,000 sectors. In the mountlist, the SCSI software does not care whether you specify that the drive has 1 surface with 1 sector per track and 100,000 tracks, or 10,000 surfaces with 10 sectors per track and 1 track.] [ When the SCSI software uses a particular sector, it simply converts the values you provide into a block number (which the SCSI disk controller treats as an offset from its own physical sector number 0). ] [ Thus your mountlists must provide accurate, non-overlapping information if you wish to explicitly tell the system how to reserve part of the drive as one "partition" for one logical device (which may run a different filing system than another logical device on the same physical drive) and another part of the drive for another logical device. ] [ It is nice to be accurate regarding the actual physical configuration of the disk. But because of the way the mountlist information is actually used, it is possible to lie to the system to get the job done (OK, lie is a bit strong... lets just say we're bending the truth a little bit). ] [ Here's a more concrete example, using the sectors-per-track numbers that you've provided above for the Quantum drive, but, for simplicity, lets assume that the drive is much smaller than it really is, for example, only 10 cylinders (tracks), 10 heads and that the first 5 cylinders (LowCyl = 0, HighCyl = 4) will format to have 20 blocks per track and the second 5 cylinders (LowCyl = 5, HighCyl=9) will format to 10 cylinders per track. And assume that you want to partition it at the dividing line between the two. For simplicity, we'll just talk about the partitioning entries in the mountlist and not the complete mountlist entry. ] The first partition is easy. We simply specify: LowCyl = 0 HighCyl = 4 Surfaces = 10 BlocksPerTrack = 20 The second one, though it looks easy, is tricky. You might ASSUME the mountlist for the second drive would look like this: LowCyl = 5 HighCyl = 9 Surfaces = 10 BlocksPerTrack = 10 [ But EACH individual entry in the mountlist for a particular drive tells AmigaDOS that "the ENTIRE DRIVE" is configured this way. AmigaDOS treats each entry as though it tells everything it needs to know about the drive so that it can count the sector numbers starting at sector zero and thus will convert this second entry to say that the partition starts at sector (block number) 501 (5 cyl * 10 heads * 10 sectors per track). ] Note that the first partition starts at block 0 and ends at block 1000. We end up with overlapping partitions, with disastrous consequences. In this simple (and unrealistic) case, the problems will show up very soon, since the second partition starts at about the root block of the first partition. Formatting the second partition will clobber the first. Writing any files to the first partition will likely destroy the filesystem identifier in sector 0 of the second partition. The second partition can be done, but we have to lie to it in the mountlist: LowCyl = 10 HighCyl = 19 Surfaces = 10 BlocksPerTrack = 10 This entry tells AmigaDOS that the entire drive has a geometry of 10 heads and 20 sectors/track. By lying to it about the starting cylinder, we arrive at the proper starting block (the starting block of the partition is calculated from the mountlist entry values). Note that everything works out well, and we get all the blocks available to us. The main problem with this method is that it usually ends up being a bit of a brainbender, since most drives don't have numbers that are quite so easy to calculate. I have seen a lot of postings recently about making 880K simulated floppies, and a lot of postings about corrupt partitions. These problems will happen if the mountlist entries cause an overlap. -larry ======================= [ A Followup message from John Mesiavech ] : ======================= Here's the params needed for the Quantum Q280 5.25" drive. Now, at most this'll get you 76 Meg on the drive, but the drive (with current low-level formatters I've tried by FOUR different companies- IVS, C.Ltd, GVP, and Pacific Peripherals- is simply not gonna format to any more.) [ Notice of course that this is not an "actual" mountlist unless comments in parentheses are either replaced with the appropriate values or removed entirely. See the default DEVS:mountlist for the correct format for each entry, and the explanation in the Amiga Companion's Mountlist description.] DH0: Device = (YouNameIt.device) Unit = (YourUnitNumber) Flags = 0 (most commonly, anyway) Surfaces = 6 BlocksPerTrack = 31 Reserved = 2 (IMPORTANT!) Interleave = (your interleave, depends on controller) LowCyl = 0 HighCyl = 823 Buffers = (whatever you commonly use, I use 9) BufMemType = 1 (means use whatever memory's available) # This one WORKS for the SlowFileSystem. To use FFS add the appropriate lines for your controller. Even on a Mac the drive formats out to 76 meg free...INFO will show 72Meg for SlowFS, 76Meg FFS. [ Notice that John did not find it necessary to partition the drive, though using Larry's logical approach, it could have been partitioned if necessary. ] John ========================================== [ Larry answers yet another question, this time about the Old File System]: > It's not clear from the Enhancer manual how big the Slow > File System partition has to be. They give an example of one with > the entire Workbench on it - why would anyone want to do that? The requirement for an OFS partition is not universal. Some units can boot from an FFS partition. Depends entirely on the manufacturer, and how they did things. If yours requires the OFS partition, make it 'big enough'. The reason there is no hard and fast rule is that it all depends on what all needs to be on the boot partition for your setup. Leave enough room for the startup-sequence, system-configuration, and any programs needed before you switch control to a FFS partition. One of my boot partitions (I have three, so that I can still boot when I remove a drive for any reason), is 88K, and has the following directory: c (dir) assign endcli mount newcli run L (dir) FastFileSystem devs (dir) hddisk.device mountlist system-configuration s (dir) hdstart hdstart2 startup-sequence libs (dir) arp.library I don't think the Supra uses the standard MOUNT command, so you may not need MOUNT, devs/mountlist etc. -larry ============================== [Finally, John Kjellman talks about simulating a floppy drive as one of the partitions on your hard disk. Again this entails a bit of calculating to make it work right, but the calculations are based on the principle that the numbers you give in the mountlist are simply used by AmigaDOS to eventually calculate a sector number on the drive and the SCSI controller positions the head assembly and selects the correct sector for the correct head on the correct surface (and never really knows WHAT was in the mountlist). John has graciously provided his address and phone number for direct contact. Note that John is a consultant and can help you with your problems (for a fee, of course).] ============================== [John's information]: ATTENTION ALL HARD DISK USERS: I do not know if this is common knowledge on Usenet (I never saw it before.....), but the way that AmigaDOS uses MountList information is misleading. When AmigaDOS has a hard disk to use, it treats the disk as if it were a continuous string of sectors (i.e. it ignores track information). Normally, this is not a problem because all partion mounted on a single disk use the same number of sectors per track. THIS IS NOT TRUE WHEN SIMULATING A FLOPPY DISK ON A HARD DISK!!!!! [You might want to simulate a floppy disk on your hard drive so that you can use the Amiga 1.3 DISKCOPY program which only does the job when it believes that the source and destination disks are identical. That is, the number of tracks, the number of sectors per track and the number of heads]. When mounting a simulated floppy disk, you must change the number of heads to 2, the number of track to 80, and the number of sectors per track to 11. This causes a problem with AmigaDOS, because it calculates the first sector to start a partition on based on the following formula: (starting sector #) = (starting track #)*(# of sectors/track)*(# of sides) This causes simulated floopy partions to start on a sector nowhere near where you thought you told AmigaDOS to put it! Since this sounds rather confusing, here is an example: To make a simulated floppy starting at track 100 of an ST238 (4 heads, 610 tracks (according to C.Ltd, 615 by Seagate), 26 sectors/track) MountList entry (in error): DH0: Starting Cylinder (track) = 0 Ending Cylinder = 99 Sectors per Track = 26 Number of sides (heads) = 4 HF0: (Simulated Floppy) Starting Cylinder (track) = 100 Ending Cylinder = 179 Sectors per Track = 11 Number of sides (heads) = 2 DH1: Starting Cylinder (track) = 180 Ending Cylinder = 609 Sectors per Track = 26 Number of sides (heads) = 4 One would think this would start on track 100. Wrong! [ This is another of those overlapping partition examples that you saw described earlier in this appendix ] If you apply the formula from before you get: starting sector number = 100 * 11 * 2 == 1760 On the ST238 this is actually on physical track: physical track = 2200 / (26*4) = track 21.1538 (near beginning of track 21) Yes, you would have just trashed what ever was on track 21 instead of using track 100 as you had asked (this has bitten me MANY times, it wiped out my main partion for 2 days during the EXPO (made me stay up all night Friday copying disks for Saturdays get-together)). The correct MountList entry should have been: desired starting track = 100 desired starting physical sector = 26 * 4 * 100 = 10400 starting logical track = 10400 / (11 * 2) = 472.7 (don't want to hit physical track 99, so use 473) ending logical track = 473 + 80 - 1 = 552 (80 logical tracks per sector on a floopy) ending physical sector = 552 * (11*2) / (26*4) = 116.8 (not quite into track 117, so use 116) So our MountList entry should have looked like this [ Again using only the partitioning information... see the mountlist entry descriptions in the Amiga Devices chapter of the Companion for more information about building a complete mountlist entry ]: DH0: Starting Cylinder (track) = 0 Ending Cylinder = 99 Sectors per Track = 26 Number of sides (heads) = 4 HF0: (Simulated Floppy) Starting Cylinder (track) = 473 Ending Cylinder = 552 Sectors per Track = 11 Number of sides (heads) = 2 DH1: Starting Cylinder (track) = 117 Ending Cylinder = 609 Sectors per Track = 26 Number of sides (heads) = 4 [ Just as Larry Phillips has shown early in this Appendix, each mountlist entry seems to separately tell AmigaDOS the complete physical configuration of the drive, but the calculations for starting cylinder, track and number of sectors per surface are simply providing a non-overlapping method of telling AmigaDOS which is calculated sector to assign as the first sector within a logical partition. All of the calculations come down to that.] Some of you may look at this and say, "Why would I want to make my HD look like part of it was a floppy drive?" Well, the first thing that comes to mind is copying disks. If you have to make more than 1 copy of a disk, you can use DISKCOPY to copy it to your HD floppy and then use DISCOPY to copy it onto as many disks as you need (due to the incredible speed of the HD, you save the time it would have taken to read the disk the second, third, etc. times). This is also useful if you wish to work with a foreign disk, just copy it to your simulated floppy. If the disk has a virus and it tries to trash your boot dish, it can't (it's on your HD)! I hope this proves useful, but not too confusing. Just remember, when you are calculating the track numbers to use in the MountList, they are logical track numbers calculated from of the current MountList entry. KJohn I can be reached at: RealTime (prefered): 1(312)403-4762 (6pm to 10:30pm central time) USmail: John Kjellman 14465 Middle Pine Creek Dr. Orland Park, IL 60462 E-Mail: kjohn@richp1.UUCP P.S. I will create a program to automatically create either an entire MountList or individual MountList entries if demand warrants it.