From owner-svn-doc-all@FreeBSD.ORG Thu Feb 6 17:20:15 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A21FAFAC; Thu, 6 Feb 2014 17:20:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 815B21DD0; Thu, 6 Feb 2014 17:20:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s16HKFAc036680; Thu, 6 Feb 2014 17:20:15 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s16HKFqR036679; Thu, 6 Feb 2014 17:20:15 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201402061720.s16HKFqR036679@svn.freebsd.org> From: Dru Lavigne Date: Thu, 6 Feb 2014 17:20:15 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43806 - head/en_US.ISO8859-1/books/handbook/cutting-edge X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 17:20:15 -0000 Author: dru Date: Thu Feb 6 17:20:15 2014 New Revision: 43806 URL: http://svnweb.freebsd.org/changeset/doc/43806 Log: More incorporation of redundant information. Definitely very much a WIP. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Thu Feb 6 16:49:50 2014 (r43805) +++ head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Thu Feb 6 17:20:15 2014 (r43806) @@ -1544,6 +1544,18 @@ before running "/usr/sbin/freebsd-update the function of each command. + If the build world process has previously been run on + this system, a copy of the previous build may still exist + in /usr/obj. To speed up the new build world + process, and possibly save some dependency headaches, + remove this directory if it already exists: + + &prompt.root; cd /usr/obj +&prompt.root; chflags -R noschg * +&prompt.root; rm -rf * + + + Compile the new compiler and a few related tools, then use the new compiler to compile the rest of the new world. The result is saved to @@ -1577,11 +1589,12 @@ before running "/usr/sbin/freebsd-update &prompt.root; shutdown now - Once in single-user mode, run this command if the + Once in single-user mode, run these commands if the system is formatted with UFS: &prompt.root; mount -u / -&prompt.root; mount -a -t ufs +&prompt.root; mount -a -t ufs +&prompt.root; swapon -a If the system is instead formatted with ZFS, run these two commands. This example assumes a zpool name of @@ -1592,18 +1605,22 @@ before running "/usr/sbin/freebsd-update - Then, for either filesystem, run: + Then, for either file system, if the CMOS clock is set to local time + (this is true if the output of &man.date.1; does not show + the correct time and zone), run: &prompt.root; adjkerntz -i - Next, perform some initial configuration file updates - in preparation for the new world. For instance, this step - may add new groups or new system accounts which have been + Next, perform some initial configuration file updates to /etc + in preparation for the new world. The following command compares + only those files that are essential for the success of + installworld. For instance, this step + may add new groups, system accounts, or startup scripts which have been added to &os; since the last update. This is necessary so that the installworld step will - be able to use the new system accounts and groups. + be able to use any new system accounts, groups, and scripts. &prompt.root; mergemaster -p @@ -1646,42 +1663,51 @@ before running "/usr/sbin/freebsd-update &prompt.root; make delete-old-libs + + single-user mode + + If the system can have a window of down-time, consider compiling the system in single user mode instead + of compiling the system in multi-user + mode, and then dropping into single user mode for the + installation. + Reinstalling the system touches a lot of important system + files, all the standard system binaries, libraries, and + include files. Changing these on a running system, + particularly one with active users, is asking for + trouble. - Check <filename>/etc/make.conf</filename> + Configuration Files make.conf - The following sections clearly describe each step, - especially when using a custom kernel configuration. - Available &man.make.1; options are shown in - &man.make.conf.5; and - /usr/share/examples/etc/make.conf. These - settings can be added to /etc/make.conf - to control the way &man.make.1; runs and how it builds - programs. Changes to some settings can have far-reaching and - potentially surprising effects. Read the comments in both - locations and keep in mind that the defaults have been chosen - for a combination of performance and safety. + This section describes the configuration files used by the + build world process. - Options set in /etc/make.conf take + The options available to &man.make.1; are described in + &man.make.conf.5; and some common examples are included in + /usr/share/examples/etc/make.conf. + Any options which are added to /etc/make.conf + will control the way &man.make.1; runs and how it builds + programs. Such options take effect every time &man.make.1; is used, including compiling - applications from the Ports Collection or user-written C + applications from the Ports Collection, compiling custom C programs, or building the &os; operating system. - - - - Check <filename>/etc/src.conf</filename> + + Changes to some settings can have far-reaching and + potentially surprising effects. Read the comments in both + locations and keep in mind that the defaults have been chosen + for a combination of performance and safety. src.conf - /etc/src.conf controls the building - of the operating system from source code. Unlike + How + the operating system is built from source code is controlled by /etc/src.conf. Unlike /etc/make.conf, the contents of /etc/src.conf only take effect when the &os; operating system itself is being built. Descriptions of @@ -1689,116 +1715,7 @@ before running "/usr/sbin/freebsd-update &man.src.conf.5;. Be cautious about disabling seemingly unneeded kernel modules and build options. Sometimes there are unexpected or subtle interactions. - - - - Update the Files in <filename>/etc</filename> - - /etc contains a - large part of the system's configuration information, as well - as scripts that are run at system startup. Some of these - scripts change between &os; versions. - - Some of the configuration files are used in the day to - day running of the system, such as - /etc/group. - - There have been occasions when the installation part of - make installworld expected certain - usernames or groups to exist. When performing an upgrade, it - is likely that these users or groups do not yet exist. In - some cases make buildworld will check to - see if these users or groups exist. - - The solution is to run &man.mergemaster.8; in - pre-buildworld mode with . This compares - only those files that are essential for the success of - buildworld or - installworld. - - - To check which files are owned by the group being - renamed or deleted: - - &prompt.root; find / -group GID -print - - This command will show all files owned by group - GID, which can be either a group - name or a numeric group ID. - - - - - Drop to Single User Mode - - single-user mode - - Consider compiling the system in single user mode. - Reinstalling the system touches a lot of important system - files, all the standard system binaries, libraries, and - include files. Changing these on a running system, - particularly one with active users, is asking for - trouble. - - multi-user mode - Another method is to compile the system in multi-user - mode, and then drop into single user mode for the - installation. With this method, hold off on the following - steps until the build has completed. Drop to single user mode - in order to run installkernel or - installworld. - - To enter single user mode from a running system: - - &prompt.root; shutdown now - - Alternatively, reboot the system, and at the boot prompt, - select the single user option. Once at the - single user mode shell prompt, run: - - &prompt.root; fsck -p -&prompt.root; mount -u / -&prompt.root; mount -a -t ufs -&prompt.root; swapon -a - - This checks the file systems, remounts - / read/write, mounts all the other UFS - file systems referenced in /etc/fstab, - and turns swapping on. - - - If the CMOS clock is set to local time and not to GMT - (this is true if the output of &man.date.1; does not show - the correct time and zone), run the following - command: - - &prompt.root; adjkerntz -i - - This ensures that the local time-zone settings get set - up correctly. - - - - - Remove <filename>/usr/obj</filename> - - As parts of the system are rebuilt, they are, by default, - placed in subdirectories of /usr/obj. - The directories shadow those under - /usr/src. - - To speed up the make buildworld - process, and possibly save some dependency headaches, - remove this directory if it already exists. - - Some files below /usr/obj may have - the immutable flag set which must be removed first using - &man.chflags.1;. - - &prompt.root; cd /usr/obj -&prompt.root; chflags -R noschg * -&prompt.root; rm -rf * - + Recompile the Base System @@ -2005,16 +1922,9 @@ Script done, … problems. See &man.init.8; for details about kern.securelevel and &man.chflags.1; for details about the various file flags. - - - - Reboot into Single User Mode - - single-user mode Reboot into single user mode to test that the new kernel - works using the instructions in - . + works. @@ -2160,11 +2070,6 @@ Script done, … /etc are not in /usr/src/etc. - If you are using &man.mergemaster.8; (as recommended), - you can skip forward to the - next - section. - The simplest way to merge files by hand is to install the files into a new directory, and then work through them looking for differences. @@ -2376,15 +2281,6 @@ Script done, … &prompt.root; yes|make delete-old - - Rebooting - - Verify that everything appears to be in the right place, - then reboot the system using &man.shutdown.8;: - - &prompt.root; shutdown -r now - - Deleting obsolete libraries @@ -2607,10 +2503,10 @@ Building everything.. - What do I do if something goes wrong? + What if something goes wrong? - Make absolutely sure that the environment has no + First, make absolutely sure that the environment has no extraneous cruft from earlier builds: &prompt.root; chflags -R noschg /usr/obj/usr