From owner-freebsd-stable Mon Nov 20 13:57:10 2000 Delivered-To: freebsd-stable@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id C41A737B4C5; Mon, 20 Nov 2000 13:57:02 -0800 (PST) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id NAA19653; Mon, 20 Nov 2000 13:57:00 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200011202157.NAA19653@gndrsh.dnsmgr.net> Subject: Re: Dedicated disks (was: Dangerously Dedicated) In-Reply-To: <200011201537.RAA25621@siri.nordier.com> from Robert Nordier at "Nov 20, 2000 05:37:39 pm" To: rnordier@FreeBSD.ORG Date: Mon, 20 Nov 2000 13:57:00 -0800 (PST) Cc: stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Greg Lehey wrote: > > > > Why do you *insist* on calling it a "Microsoft partition table"?? > > > > Hmm. I was going to say "Because it was introduced with Microsoft > > 2.0", but I'm no longer so sure. Reading the MS-DOS 2.11 source code, > > it seems that they didn't have a partition table at the time. > > Of course they had a partition table at the time, and of course > MS-DOS 2.11 used it: > > [io.sys] > 1431 8d9fbe01 lea bx,[bx+0x1be] > 1435 8b4740 mov ax,[bx+0x40] > 1438 3d55aa cmp ax,0xaa55 > 143b 7539 jnz 0x1476 > 143d b90400 mov cx,0x4 > 1440 807f0401 cmp byte [bx+0x4],0x1 > 1444 7407 jz 0x144d > 1446 83c310 add bx,byte +0x10 > 1449 e2f5 loop 0x1440 > 144b eb29 jmp short 0x1476 Thank you for digging this out, it saved me the time. This goes to show that infact the FUD in this whole discussion is that the partition table is handled by the BIOS. The above code validates the signature and finds the active partition in the MBR. (There is similiar code in the MS and PC DOS MBR code to find boot1, but again this is the MBR code, NOT THE BIOS). Let me state this one more time loudly for those calling themselves boot code experts. THE PARTITION TABLE IN THE MBR IS NOT DEALT WITH BY THE BIOS, BIOSES THAT TRY TO MAKE HEADS OR TALES OF PARTITION TABLES ARE TECHNICALLY BROKEN AND VIOLATE IBM AT COMPATIBILITY. If you doubt this go read about BIOS service 19H, IPL load. And to further enlighten us all here is the IBM fixed disk BIOS code from the original IBM XT: H4: JMP BOOT_LOCN H5: SUB AX,AX ; reset diskette SUB DX,DX INT 13H MOV CX, 3 ; set retry count H6: PUSH CX ; save retry count MOV DX,0080H ; fixed disk zero SUB AX,AX ; reset the fixed disk INT 13H ; file I/O call JC H7 ; if error, try again MOX AX, 0201H ; read in the single sector SUB BX,BX MOV ES,BX MOV BX, offset BOOT_LOCN MOV DX,80H ; drive number MOV CX,1 ; sector 1, track 0 INT 13H ; file I/O call H7: POP CX ; recover retry count JC H8 MOV AX, word ptr BOOT_LOC+510D CMP AX, 0AA55H ; test for generic boot block JZ H4 Now perhaps Intel did some really stupid stuff in the IA64 specs that now make this a function of the BIOS, but as far as IBM PC compatible systems go the partition table is _NOT_ dealt with by the BIOS, it is dealt with by the MBR code and whatever the MBR code loads. Any BIOS that looks at more than 0xAA55 at offset 510 of the MBR is _NOT_ IBM PC/XT/AT compatible! -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message