Re: [Fwd: Hard disk geometry]

Wakko Warner (wakko@animx.eu.org)
Thu, 21 Oct 1999 20:00:27 -0400


> > --------d-1348-------------------------------
> > INT 13 - IBM/MS INT 13 Extensions - GET DRIVE PARAMETERS
> > AH = 48h
> > DL = drive (80h-FFh)
> > DS:SI -> buffer for drive parameters (see #00273)
> > Return: CF clear if successful
> > AH = 00h
> > DS:SI buffer filled
> > CF set on error
> > AH = error code (see #00234)
> > BUG: several different Compaq BIOSes incorrectly report high-numbered
> > drives (such as 90h, B0h, D0h, and F0h) as present, giving
> > them the
> > same geometry as drive 80h; as a workaround, scan through disk
> > numbers, stopping as soon as the number of valid drives
> > encountered
> > equals the value in 0040h:0075h
> > SeeAlso: AH=08h,AH=41h,AH=49h,MEM 0040h:0075h
> >
> > Format of IBM/MS INT 13 Extensions drive parameters:
> > Offset Size Description (Table 00273)
> > 00h WORD (call) size of buffer
> > (001Ah for v1.x, 001Eh for v2.x, 42h for v3.0)
> > (ret) size of returned data
> > 02h WORD information flags (see #00274)
> > 04h DWORD number of physical cylinders on drive
> > 08h DWORD number of physical heads on drive
> > 0Ch DWORD number of physical sectors per track
> > 10h QWORD total number of sectors on drive
> > 18h WORD bytes per sector
>
> Hrm...If this is reliable and hasn't already been implemented, I guess it
> would be worth implementing it. I don't think you'll be able to call int
> 0x13 from userspace very easily, either, so fixing the kernel is probably
> best and easiest. Perhaps Andre Hedrick <andre@suse.com> can help here?
> (He would know much more than me about this stuff. :))

I have a question. What about disks that aren't in the bios? I have
machines setup with only 1 disk in bios (if ide) and the rest (if any) are
not.

I also have one machine that is diskless and I used it to transfer data on a
ide hard drive. Usually I'll just plug the drives in w/o powering off (lets
not get into the it's not safe. I could care less about the machine or the
drive. They're both old and replacable!). Obviously, these drives are not
in the bios. Linux does a good job of finding these drives (the ide
subsystem is compiled as modules).

-- 
 Lab tests show that use of micro$oft causes cancer in lab animals

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/