Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!lzaz!hcj From: hcj@lzaz.ATT.COM (HC Johnson) Newsgroups: comp.sys.atari.st Subject: Re: AHDI (Was: GDOS, AHDI, FONTWID?) Summary: Heres more information Keywords: ahdi, harddisks, boot Message-ID: <631@lzaz.ATT.COM> Date: 15 Jun 89 14:46:19 GMT References: <18600014@uxh.cso.uiuc.edu> <1543@atari.UUCP> <1257@pkmab.se> <1268@pkmab.se> Organization: AT&T ISL Lincroft NJ USA Lines: 55 In article <1268@pkmab.se>, daniel@pkmab.se (Daniel Deimert) writes: > In article <627@lzaz.ATT.COM> hcj@lzaz.ATT.COM (HC Johnson) writes: > >AHDI (generic) is not a mystical program. > >It is a Terminate-Stay-Resident program that when loaded does > > Thanks for that description. And the "magical" autobooting program for > the atari harddisk, then? (I'm afraid I can't spell it right...) > Is it just a normal program too, or is it some kind of IMG-file? How > does the TOS load it, and when? Is it possible to write an own version? > (Yes, of course, but without scratching my head for years!?) This is an addenda to my previously posted information on partitioning. BOOTING Finally a few words about booting from the hard disk. There are two steps when TOS boots. First, floppy disk A: is checked for a valid boot block. If it has one the loaded sector is executed as a program. A 'rts' returns to TOS, so that it can continue to phase 2. Secondly, each SCSI device 0 thru 7 has logical unit 0 tested for a valid boot block. Note that SCSI controllers with more than one disk must have the boot on unit 0. Each device with a valid boot is executed. A 'rts' returns to TOS, so that it can continue. (The Autobooters I've seen cause this polling to be terminated.) There are two schemes for having the disk load the official hard disk driver from the boot code. HDB from Atari, and GEMBOOT (public domain) put sufficient code in sector 0 of the hard disk to load the driver from the boot disk. HDB renames ahdi.prg to be driver.sys just to make this look mysterious. Supra and ICD use extended partitions which removes 96 bytes from boot area on sector 0. In order to load the driver they have to read in an additional sector of boot code. This is stored in the boot block of any of the first four partition on the drive. The first partition is usual, but the first four partitions are tested looking for a bootable one. This permits, for example: Set up partition 0 (drive C:) to boot MS/DOS using PC-Ditto; Set up partition 1 (drive D:) to boot TOS; Set up partition 2 (pseudo drive E:) to boot MINIX. Only one of these is marked 'active' in the partition table and it is the only one read in and executed. Supra also signals TOS to stop looking for bootable drives after it runs. Image.SYS: These files are just the AHDI program, renamed and given non listing attributes. (Use MWC ls -al *.sys to display them). Howard C. Johnson ATT Bell Labs att!lzaz!hcj hcj@lzaz.att.com