Subject: Re: How do I build a bootable system?
To: None <tech-toolchain@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-toolchain
Date: 03/26/2007 18:28:41
On Mon, 26 Mar 2007, Jukka Salmi wrote:
> > > % build.sh -D ... -O ... -U distribution
> > > # build.sh -D ... -O ... -U -u -V TOOLDIR=... install=/mnt
> > > [leaves /mnt/etc almost empty]
> > 
> > If that didn't work, I think it's a bug, but I never use build.sh
> > install=..., so don't take my word for it.
> 
> $ ./build.sh -h
> [..]
>     install=idir        Run "make installworld" to `idir' to install all sets
>                         except `etc'.  [...]

Hmm.  I wonder if "build.sh install=..." should suggest that you run
etcupdate, or perhaps even run etcupdate for you, or if there should be
an installetc action.

Does the following patch to BUILDING.mdoc look OK?

--apb (Alan Barrett)

Index: src/doc/BUILDING.mdoc
===================================================================
--- BUILDING.mdoc	27 Jan 2007 11:47:36 -0000	1.47
+++ BUILDING.mdoc	26 Mar 2007 16:20:59 -0000
@@ -888,10 +888,30 @@
 .Sy INSTALLWORLDDIR
 is not the root directory if cross compiling.
 .Pp
+The
+.Sy INSTALLSETS
+environment variable may be set to a list of
+distribution sets to be installed.
+By default, all sets except
+.Dq etc
+and
+.Dq xetc
+are installed (so most files in
+.Sy INSTALLWORLDDIR Ns Pa /etc
+will not be installed or modified).
+.Pp
 .Em Note :
-It is highly recommended that you upgrade your kernel and reboot
-before performing this operation.
-.
+Before performing this operation with
+.Sy INSTALLWORLDDIR Ns = Ns Pa / ,
+it is highly recommended that you upgrade your kernel and reboot.
+After performing this operation,
+it is recommended that you use
+.Xr etcupdate 8
+to update files in
+.Sy INSTALLWORLDDIR Ns Pa /etc
+and that you use
+.Xr postinstall 8
+to check for inconsistencies (and possibly to fix them).
 .It Sy sets
 Create distribution sets from
 .Sy DESTDIR
@@ -1446,6 +1466,8 @@
 .Xr make 1 ,
 .Xr hier 7 ,
 .Xr release 7 ,
+.Xr etcupdate 8 ,
+.Xr postinstall 8 ,
 .Pa pkgsrc/sysutils/cdrtools
 .
 .Sh HISTORY