Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2000 07:41:13 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        Cy.Schubert@uumail.gov.bc.ca (Cy Schubert - ITSD Open Systems Group)
Cc:        khera@kciLink.com (Vivek Khera), stable@FreeBSD.ORG
Subject:   Re: "dangerously dedicated"
Message-ID:  <200003231541.HAA60696@gndrsh.dnsmgr.net>
In-Reply-To: <200003231358.FAA01112@cwsys.cwsent.com> from Cy Schubert - ITSD Open Systems Group at "Mar 23, 2000 05:57:54 am"

next in thread | previous in thread | raw e-mail | index | archive | help
...
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003231541.HAA60696>