From owner-svn-doc-all@FreeBSD.ORG Sat May 24 15:33:59 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F221A680; Sat, 24 May 2014 15:33:58 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE5A824E3; Sat, 24 May 2014 15:33:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OFXwOt055882; Sat, 24 May 2014 15:33:58 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OFXw6s055881; Sat, 24 May 2014 15:33:58 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201405241533.s4OFXw6s055881@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 24 May 2014 15:33:58 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44936 - head/en_US.ISO8859-1/articles/nanobsd 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.18 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: Sat, 24 May 2014 15:33:59 -0000 Author: bcr Date: Sat May 24 15:33:58 2014 New Revision: 44936 URL: http://svnweb.freebsd.org/changeset/doc/44936 Log: Whitespace cleanup (translators can ignore): Wrap long lines, replace spaces with tabs and fix bad tag indentation. Modified: head/en_US.ISO8859-1/articles/nanobsd/article.xml Modified: head/en_US.ISO8859-1/articles/nanobsd/article.xml ============================================================================== --- head/en_US.ISO8859-1/articles/nanobsd/article.xml Sat May 24 15:24:58 2014 (r44935) +++ head/en_US.ISO8859-1/articles/nanobsd/article.xml Sat May 24 15:33:58 2014 (r44936) @@ -1,9 +1,10 @@ -
- Introduction to NanoBSD - +
+ Introduction to NanoBSD DanielGerzo @@ -24,10 +25,11 @@ $FreeBSD$ - This document provides information about - the NanoBSD tools, which can be used to - create &os; system images for embedded applications, suitable for - use on a Compact Flash card (or other mass storage medium). + This document provides information about the + NanoBSD tools, which can be used to + create &os; system images for embedded applications, suitable + for use on a Compact Flash card (or other mass storage + medium). @@ -37,47 +39,50 @@ NanoBSD NanoBSD is a tool currently - developed by &a.phk.email;. It creates a &os; system image for embedded - applications, suitable for use on a Compact Flash card (or other - mass storage medium). - - It can be used to build specialized install images, designed for - easy installation and maintenance of systems commonly - called computer appliances. Computer appliances have - their hardware and software bundled in the product, which means all - applications are pre-installed. The appliance is plugged into an - existing network and can begin working (almost) immediately. + developed by &a.phk.email;. It creates a &os; system image for + embedded applications, suitable for use on a Compact Flash card + (or other mass storage medium). + + It can be used to build specialized install images, designed + for easy installation and maintenance of systems commonly called + computer appliances. Computer appliances have + their hardware and software bundled in the product, which means + all applications are pre-installed. The appliance is plugged + into an existing network and can begin working (almost) + immediately. - The features of NanoBSD include: + The features of NanoBSD + include: Ports and packages work as in &os; — Every single - application can be installed and used in - a NanoBSD image, the same way as in + application can be installed and used in a + NanoBSD image, the same way as in &os;. No missing functionality — If it is possible to do - something with &os;, it is possible to do the same thing with - NanoBSD, unless the specific feature - or features were explicitly removed from - the NanoBSD image when it was + something with &os;, it is possible to do the same thing + with NanoBSD, unless the specific + feature or features were explicitly removed from the + NanoBSD image when it was created. - Everything is read-only at run-time — It is safe to - pull the power-plug. There is no necessity to run - &man.fsck.8; after a non-graceful shutdown of the system. + Everything is read-only at run-time — It is safe + to pull the power-plug. There is no necessity to run + &man.fsck.8; after a non-graceful shutdown of the + system. - Easy to build and customize — Making use of just one - shell script and one configuration file it is possible to - build reduced and customized images satisfying any arbitrary set of - requirements. + Easy to build and customize — Making use of just + one shell script and one configuration file it is possible + to build reduced and customized images satisfying any + arbitrary set of requirements. @@ -121,7 +126,8 @@ are expected to persist after the system restarts. - Making Persistent Changes to <filename>/etc/resolv.conf</filename> + Making Persistent Changes to + <filename>/etc/resolv.conf</filename> &prompt.root; vi /etc/resolv.conf [...] @@ -136,24 +142,24 @@ only at boot time and while overriding the configuration files. - Keeping /cfg mounted at - all times is not a good idea, especially if - the NanoBSD system runs off a mass - storage medium that may be adversely affected by a large number - of writes to the partition (like when the filesystem syncer - flushes data to the system disks). + Keeping /cfg mounted at all times + is not a good idea, especially if the + NanoBSD system runs off a mass + storage medium that may be adversely affected by a large + number of writes to the partition (like when the filesystem + syncer flushes data to the system disks). Building a NanoBSD Image - A NanoBSD image is built using a - simple nanobsd.sh shell script, which can - be found in the + A NanoBSD image is built using + a simple nanobsd.sh shell script, which + can be found in the /usr/src/tools/tools/nanobsd - directory. This script creates an image, which can be copied on - the storage medium using the &man.dd.1; utility. + directory. This script creates an image, which can be copied + on the storage medium using the &man.dd.1; utility. The necessary commands to build a NanoBSD image are: @@ -165,8 +171,9 @@ - Change the current directory to the base directory of the - NanoBSD build script. + Change the current directory to the base directory of + the NanoBSD build + script. @@ -174,8 +181,8 @@ - Change the current directory to the place where the built - images are located. + Change the current directory to the place where the + built images are located. @@ -215,20 +222,21 @@ Configuration Options - With configuration settings, it is possible to configure options - passed to both the buildworld - and installworld stages of the - NanoBSD build process, as well as internal - options passed to the main build process of - NanoBSD. Through these options it is - possible to cut the system down, so it will fit on as little as - 64MB. You can use the configuration options to trim down &os; even - more, until it will consists of just the kernel and two or three - files in the userland. - - The configuration file consists of configuration options, - which override the default values. The most important - directives are: + With configuration settings, it is possible to configure + options passed to both the + buildworld and + installworld stages of the + NanoBSD build process, as well as + internal options passed to the main build process of + NanoBSD. Through these options + it is possible to cut the system down, so it will fit on as + little as 64MB. You can use the configuration options to + trim down &os; even more, until it will consists of just the + kernel and two or three files in the userland. + + The configuration file consists of configuration + options, which override the default values. The most + important directives are: @@ -237,35 +245,39 @@ - NANO_SRC — Path to the source - tree used to build the image. + NANO_SRC — Path to the + source tree used to build the image. - NANO_KERNEL — Name of kernel - configuration file used to build kernel. + NANO_KERNEL — Name of + kernel configuration file used to build kernel. CONF_BUILD — Options passed - to the buildworld stage of the build. + to the buildworld stage of + the build. - CONF_INSTALL — Options passed - to the installworld stage of the build. + CONF_INSTALL — Options + passed to the installworld + stage of the build. - CONF_WORLD — Options passed to both - the buildworld and - the installworld stage of the build. + CONF_WORLD — Options passed + to both the buildworld and + the installworld stage of the + build. - FlashDevice — Defines what type of - media to use. Check FlashDevice.sub - for more details. + FlashDevice — Defines what + type of media to use. Check + FlashDevice.sub for more + details. @@ -275,19 +287,18 @@ It is possible to fine-tune NanoBSD using shell functions in - the configuration file. The following example illustrates the - basic model of custom functions: + the configuration file. The following example illustrates + the basic model of custom functions: - cust_foo () ( + cust_foo () ( echo "bar=baz" > \ ${NANO_WORLDDIR}/etc/foo ) customize_cmd cust_foo - A more useful example of a customization function is the - following, which changes the default size of the - /etc directory - from 5MB to 30MB: + A more useful example of a customization function is the + following, which changes the default size of the + /etc directory from 5MB to 30MB: cust_etc_size () ( cd ${NANO_WORLDDIR}/conf @@ -295,20 +306,22 @@ customize_cmd cust_foo ) customize_cmd cust_etc_size - There are a few default pre-defined customization functions - ready for use: + There are a few default pre-defined customization + functions ready for use: cust_comconsole — Disables - &man.getty.8; on the VGA devices - (the /dev/ttyv* device nodes) and enables - the use of the COM1 serial port as the system console. + &man.getty.8; on the VGA devices (the + /dev/ttyv* device nodes) and + enables the use of the COM1 serial port as the system + console. cust_allow_ssh_root — Allow - root to login via &man.sshd.8;. + root to login + via &man.sshd.8;. @@ -324,9 +337,10 @@ customize_cmd cust_etc_size Adding Packages - Packages can be added to a NanoBSD - image using a custom function. The following function will install - all the packages located in + Packages can be added to a + NanoBSD image using a custom + function. The following function will install all the + packages located in /usr/src/tools/tools/nanobsd/packages: install_packages () ( @@ -341,8 +355,9 @@ customize_cmd install_packages Configuration File Example - A complete example of a configuration file for building a - custom NanoBSD image can be: + A complete example of a configuration file for building + a custom NanoBSD image can + be: NANO_NAME=custom NANO_SRC=/usr/src @@ -399,25 +414,27 @@ customize_cmd cust_nobeastie Updating NanoBSD - The update process of NanoBSD is - relatively simple: + The update process of NanoBSD + is relatively simple: - Build a new NanoBSD image, as - usual. + Build a new NanoBSD image, + as usual. Upload the new image into an unused partition of a - running NanoBSD appliance. + running NanoBSD + appliance. The most important difference of this step from the - initial NanoBSD installation is that - now instead of using _.disk.full - (which contains an image of the entire disk), - the _.disk.image image is installed (which - contains an image of a single system partition). + initial NanoBSD installation is + that now instead of using _.disk.full + (which contains an image of the entire disk), the + _.disk.image image is installed + (which contains an image of a single system + partition). @@ -431,18 +448,18 @@ customize_cmd cust_nobeastie If anything goes wrong, reboot back into the previous - partition (which contains the old, working image), to restore system - functionality as fast as possible. Fix any problems of the new - build, and repeat the process. + partition (which contains the old, working image), to + restore system functionality as fast as possible. Fix any + problems of the new build, and repeat the process. To install new image onto the running - NanoBSD system, it is possible to use - either the updatep1 or + NanoBSD system, it is possible to + use either the updatep1 or updatep2 script located in the - /root directory, depending - from which partition is running the current system. + /root directory, depending from which + partition is running the current system. According to which services are available on host serving new NanoBSD image and what type of @@ -471,8 +488,8 @@ get _.disk.image "| sh updatep1" Using &man.nc.1; - Try this example if the remote host is not running neither - &man.ftpd.8; or &man.sshd.8; service: + Try this example if the remote host is not running + neither &man.ftpd.8; or &man.sshd.8; service: @@ -488,6 +505,7 @@ get _.disk.image "| sh updatep1" + Connect to the host serving new image and execute updatep1 script: