From owner-freebsd-hackers Mon Jan 23 20:14:57 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id UAA06401 for hackers-outgoing; Mon, 23 Jan 1995 20:14:57 -0800 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id UAA06383 for ; Mon, 23 Jan 1995 20:14:49 -0800 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.8/8.6.6) id EAA08904; Tue, 24 Jan 1995 04:14:10 GMT From: "Rodney W. Grimes" Message-Id: <199501240414.EAA08904@gndrsh.aac.dev.com> Subject: Re: writing bootcode; need a method To: peter@bonkers.taronga.com (Peter da Silva) Date: Tue, 24 Jan 1995 04:14:09 +0000 (GMT) Cc: terry@cs.weber.edu, mmead@goof.com, hackers@FreeBSD.org In-Reply-To: <199501232329.RAA12428@bonkers.taronga.com> from "Peter da Silva" at Jan 23, 95 05:29:39 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2095 Sender: hackers-owner@FreeBSD.org Precedence: bulk > > > Examining a BSD partition: > > > > ,---.---.----------------.----------------. > > | 1 | 2 | 3 | 4 ... | > > `---'---'----------------'----------------' > > > > 1) BSD second stage boot. > > 2) BSD disklabel. > > 3) BSD slice 'a'. > > 4) BSD subsequent slices. > > Um, it's more like this: > > > ,------------------------.----------------. > > | 3 | 4 ... | > > |---.---. | | > > | 1 | 2 | | | > > `---'---'----------------'----------------' > > It's very important to understand that slice A contains the second stage > boot and disklabel. I know you know that, Terry, but it's not intuitively > obvious. In our OSF system administration class the instructor insisted > that these were *outside* the slice and that there were special interfaces > to get them. You need to watch out for the infamous "swap on a" problem. Though this is true for BSD, your instructor was right about OSF/1, in OSF/1 the vtoc, bootblocks and label live outside of the a partition: # uname -a OSF1 pulltime 1.2.2 osc1.2.2 b? i386 # fdisk The data for partition 0 is: MT The data for partition 1 is: MT The data for partition 2 is: MT The data for partition 3 is: systid 99, start 1, size 1094687 (534 Meg), bootid 80 beg: cyl 0/ sector 2/ head 0; end: cyl 255/ sector 255/ head 15 # vtoc The static data for the vtoc is: cyls 1086/ heads 16/ sectors 63; alt ptr 15360 alt len 2048 6 UNIX partition entries. a: start 1008, end 33263, size 32256 ( 15 Meg), flag 200, tag 2 b: start 33264, end 97775, size 64512 ( 31 Meg), flag 201, tag 4 c: start 1, end 1094687, size 1094687 (534 Meg), flag 200, tag 5 d: start 97776, end 226799, size 129024 ( 63 Meg), flag 201, tag 4 e: start 226800, end 259055, size 32256 ( 15 Meg), flag 201, tag 4 f: start 259056, end 1094687, size 835632 (408 Meg), flag 201, tag 4 -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD