From owner-freebsd-current Thu Jul 2 03:05:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA19260 for freebsd-current-outgoing; Thu, 2 Jul 1998 03:05:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from oslo.geco-prakla.slb.com (geos01.oslo.geco-prakla.slb.com [134.32.44.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA19252 for ; Thu, 2 Jul 1998 03:05:41 -0700 (PDT) (envelope-from smoergrd@geos01.oslo.geco-prakla.slb.com) Received: from sunw132.geco-prakla.slb.com (sunw132 [134.32.45.120]) by oslo.geco-prakla.slb.com (8.8.8/8.6.9) with SMTP id MAA23058 ; Thu, 2 Jul 1998 12:04:28 +0200 (MET DST) Received: by sunw132.geco-prakla.slb.com (SMI-8.6/SMI-SVR4) id MAA07719; Thu, 2 Jul 1998 12:04:28 +0200 To: Bill Paul Cc: mike@smith.net.au (Mike Smith), current@FreeBSD.ORG Subject: Re: 'fatal trap 12' on boot (smp and up) References: <199806302138.RAA05124@skynet.ctr.columbia.edu> Organization: Schlumberger Geco-Prakla X-Disclaimer: I speak only for myself. From: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) Date: 02 Jul 1998 12:04:27 +0200 In-Reply-To: Bill Paul's message of Tue, 30 Jun 1998 17:38:04 -0400 (EDT) Message-ID: Lines: 32 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bill Paul writes: > I disassembled the boot block from an MS-DOG floppy and it has > the following structure: > > - short jump to 'foo' > - no-op instruction > - the string "MSDOS5.0" (8 bytes) > - some junk (33 bytes) > - the string "NO NAME FAT12 " (19 bytes) > - foo (start of boot block code) Now really, you can do better than that... What you call junk is actually a table of disk geometry and file system parameters. The jump jumps past this to the start of the code; the nop is there so you can put in a 3-byte long jump if you need to (i.e. if you have more than 127 bytes of data, since the short jump displacement is a signed char). The first string is the name of the creator, e.g. the program that formatted the disk; it can be whatever you like. The "junk" is a rather badly laid out structure which contains the partition ID and the size of the disk, the FATs and the root directory. The second string is actually two strings; one 11-byte disk label and one 8-byte file system type. ISTR the LILO technical manual and/or the LILO howto contain information about the structure of the MS-DOS boot sector. I have written a rather lengthy doc about it myself which I'm sure must be on one of those MO floppies I have lying about at home... DES (brushes the dust off his trusty old MO drive) -- Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message