From owner-freebsd-current Thu Jul 20 23:53:43 2000 Delivered-To: freebsd-current@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 1C49337B67C for ; Thu, 20 Jul 2000 23:53:36 -0700 (PDT) (envelope-from jhb@pike.osd.bsdi.com) Received: (from jhb@localhost) by pike.osd.bsdi.com (8.9.3/8.9.3) id XAA42478; Thu, 20 Jul 2000 23:53:08 -0700 (PDT) (envelope-from jhb) From: John Baldwin Message-Id: <200007210653.XAA42478@pike.osd.bsdi.com> Subject: Re: No /boot/loader In-Reply-To: <200007210632.AAA97937@harmony.village.org> from Warner Losh at "Jul 21, 2000 00:32:35 am" To: Warner Losh Date: Thu, 20 Jul 2000 23:53:08 -0700 (PDT) Cc: dwhite@resnet.uoregon.edu, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message Leif Neland writes: > : > : > : On Thu, 20 Jul 2000, Warner Losh wrote: > : > : > In message Leif Neland writes: > : > : Just to be on the safe side, is there a simple way to see if a disk is > : > : dedicated? > : > > : > fdisk -s ad0 > : > > : > If there's a slice table, then it will give you a summary report of > : > the slices. If not it will report an error (and maybe give you a > : > faked up listing). > : > : I have windows partitions on my disks here, so they can't be dedicated. > : fdisk -s ad[0,1,2] all reports > : invalid fdisk partition found. > > Did you do that as root? All of my windows disks report valid > partitions. > > >From my sever: > % fdisk -s da0 > /dev/da0: 2231 cyl 255 hd 63 sec > Part Start Size Type Flags > 4: 1 35841014 0xa5 0x80 > > >From my laptop: > fdisk -s ad0 > /dev/ad0: 559 cyl 240 hd 63 sec > Part Start Size Type Flags > 1: 63 2766897 0x0b 0x00 > 2: 2766960 5397840 0xa5 0x80 > 4: 8164800 272160 0xa0 0x00 > > I'm in group operator, so I can read the disks on my own. The part > type 0xa0 is for the suspend to disk partition in my VAIO. > > : Does that mean that a dedicated disk has a slice table, a normal doesn't? > > No. That's backwards. A dedicated disk has no slice table (a > dangerously dedicated disk, that is), and a "normal" one does have a > slice table. No, that's wrong, too. A normal disk has a proper slice table (slices start on cylinder boundaries and do not contain the MBR, thus leaving the first cylinder unused). A truly dedicated disk (disklabel auto ) uses a slightly improper slice table (slices still start and end on cylinder boundaries and even span the entire disk, however, the only slice contains the MBR, in fact, we end up writing boot1 into the MBR). A dangerously dedicated disk uses a fake, completely bogus slice table that has no relation at all to the drive's geometry. As with truly dedicated mode, the MBR is actually contained in boot1, but in dangerously dedicated mode we use the slice table hard-coded into the boot code. This slice table has 1 slice which is 50000 blocks long, or 25000k. The rest of the disk is marked as unused even though it is, in fact, used. The fact that it works at all is due to brokenness on our part (we don't check that partitions in a disklabel fit in the parent slice) and also results in several hacks in various portions of the code where we have to check for such bogusness and work around it. I'm not a very big fan of the dedicated modes if you couldn't tell. :) > Warner -- John Baldwin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message