Date: 02 Jul 1998 12:04:27 +0200 From: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) To: Bill Paul <wpaul@skynet.ctr.columbia.edu> Cc: mike@smith.net.au (Mike Smith), current@FreeBSD.ORG Subject: Re: 'fatal trap 12' on boot (smp and up) Message-ID: <rx47m1w4lhw.fsf@oslo.geco-prakla.slb.com> In-Reply-To: Bill Paul's message of Tue, 30 Jun 1998 17:38:04 -0400 (EDT) References: <199806302138.RAA05124@skynet.ctr.columbia.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Bill Paul <wpaul@skynet.ctr.columbia.edu> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?rx47m1w4lhw.fsf>