From owner-freebsd-current Fri Oct 16 22:13:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA29616 for freebsd-current-outgoing; Fri, 16 Oct 1998 22:13:07 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles146.castles.com [208.214.165.146]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA29610 for ; Fri, 16 Oct 1998 22:13:05 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id WAA00708; Fri, 16 Oct 1998 22:17:15 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810170517.WAA00708@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: mike@smith.net.au, shimon@simon-shapiro.org, freebsd-current@FreeBSD.ORG, jkh@time.cdrom.com Subject: Re: Show Stopper? Failure to Install 19981014 In-reply-to: Your message of "Sat, 17 Oct 1998 14:51:01 +1000." <199810170451.OAA00376@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 16 Oct 1998 22:17:14 -0700 From: Mike Smith 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. I checked the history for this; it appears to have done this for a long time. There is also bogus code in sys/ufs/ufs/ufs_disksubr.c which checks the start of the partition to which the label is being written, and if that is not 0, uses partition 0 ('a') instead. It is this code which is returning EXDEV. > >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. It's reserved by sysinstall. > >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. Exactly. More to the point, why has this symptom only just recently manifested? -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message