From owner-freebsd-stable Thu Mar 23 7:41:32 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 74D1137B5C3 for ; Thu, 23 Mar 2000 07:41:28 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id HAA60696; Thu, 23 Mar 2000 07:41:13 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200003231541.HAA60696@gndrsh.dnsmgr.net> Subject: Re: "dangerously dedicated" In-Reply-To: <200003231358.FAA01112@cwsys.cwsent.com> from Cy Schubert - ITSD Open Systems Group at "Mar 23, 2000 05:57:54 am" To: Cy.Schubert@uumail.gov.bc.ca (Cy Schubert - ITSD Open Systems Group) Date: Thu, 23 Mar 2000 07:41:13 -0800 (PST) Cc: khera@kciLink.com (Vivek Khera), 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 ... > What's there to scan? The MBR always lives on the first sector of the > disk. If it hung it was the BIOS that hung because it had nothing else > to do. > > Do you understand how the MBR works? I didn't think so. Well here's a > course in MBR 101. We'll have a test on this material on Friday. And here is the matterial for MBR 102... 0. Set the drive list to those devices found by the hardware POST, commonly 0x01, 0x80, 0x81 for a floppy and dual hardrive machine. > 1. BIOS reads the first sector of the disk. > > 2. If the last byte of the sector != 0xaa55, stop and hang 2. If the last byte of the sector != 0xaa55 go to the next drive in the drive list and back step 1, if this was the last drive on the list print an error and hang. > 3. If the MBR checksum doesn't match the MBR, stop and hang. (Some > BIOSes > skip this step or just complain that that a virus has been installed > and continue to boot anyway). 3. If the checksum fails go to the next drive in the drive list and back to step 1. Very few bioses do not check the checksum. > 4. Jump to the MBR and start executing it. 4. Jump to the MBR code loaded, hang here if we loaded garbage from the disk drive usually. (Ie, signature 0xaa55 is present and checksum was good, but the MBR code itself is toasted.) > 5. The MBR will scan it's table of four entries and load the boot > record > from the partition that is marked active. Some MBR's hang here if no valid partition table, or more than one marked active. > 6. The MBR will test the last byte of the sector it just loaded for > 0xaa55. > If it's 0xaa55 and if the checksum matches (some MBR's don't bother > to > check the checksum), it will jump to the boot record. If the boot record is toast hang here.... The major error in MBR 101 is that it is not the BIOS that usually hangs, they are fairly well behaved, is what hangs is the code loaded from the hard drive and jumped to in 4 or 6. -- 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