Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Oct 1998 14:51:01 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        mike@smith.net.au, shimon@simon-shapiro.org
Cc:        freebsd-current@FreeBSD.ORG, jkh@time.cdrom.com
Subject:   Re: Show Stopper? Failure to Install 19981014
Message-ID:  <199810170451.OAA00376@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810170451.OAA00376>