kjohn@richp1.UUCP (John K. Counsulatant) (07/27/88)
ATTENTION ALL HARD DISK USERS: I do not know if this is common knowledge on the net (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!!!!! 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 no where 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 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. Wrongo buffalo breath, if you apply our 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) Yesh, you would have just trashed what ever was on track 21 instead of using track 100 like 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: 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 Now, not only does it work, but be have more avilable space on our hard drive!!! Some of you may look at this and go, gee, 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 spped 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 calcualted off of the current MountLsit entry. KJohn I can be reached at: RealTime (prefered): 1(312)418-1236 (6pm to 10:30pm central time) USmail: John Kjellman 17302 Park Ave. Lansing IL 60438 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 warrents it. -- |DISCLAIMER: Being a consultant, none of my opions represent anything. | | Except possiblely my own, but then again, maybe not. | |----------kjohn@richp1--or--USMail-17302-Park-Ave.,-Lansing-IL,-60438--------| | "I didn't do it, must be a bug in the operating system." |