From owner-freebsd-current Fri Oct 16 21:51:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA27884 for freebsd-current-outgoing; Fri, 16 Oct 1998 21:51:38 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA27879 for ; Fri, 16 Oct 1998 21:51:34 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id OAA00376; Sat, 17 Oct 1998 14:51:01 +1000 Date: Sat, 17 Oct 1998 14:51:01 +1000 From: Bruce Evans Message-Id: <199810170451.OAA00376@godzilla.zeta.org.au> To: mike@smith.net.au, shimon@simon-shapiro.org Subject: Re: Show Stopper? Failure to Install 19981014 Cc: freebsd-current@FreeBSD.ORG, jkh@time.cdrom.com Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >It appears to be caused by not entering the root filesystem first. >There's a test in the disklabel code which checks to see if the >partition you have open to write the label starts at 0, and if not then >it defaults to the 'a' partition. Labels should always be written using the RAW_PART partition ('c' on i386's). If not, then they must be written using a partition that has offset 0. If not even that, then the 'a' partition must have offset 0. Unfortunately, newfs(8) writes labels to the same partition that it is newfs'ing. >Partitions are laid on disk in the order that you enter them. The 'a' >partition is always reserved for the partition you mount on /. If you It's not reserved. It's just the default. >don't enter this partition first, it won't be at the beginning of the >disk, and any attempt to rewrite the disklabel will fail. > >Due to the way that sysinstall interacts with libdisk, this is >difficult to get "right". We probably need a bandaid which insists >that if you want to create an 'a' partition you must lay it down first. This is easy to fix by changing the (whole) test in writedisklabel() to `lp->p_partitions[RAW_PART] == 0'. Even that is probably only necessary to give the right errno (this condition is enforced in several places). This might wake bugs in other code where partition 0 is magic. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message