Source string Read only

(itstool) path: para/buildtarget

10/100
Context English State
A <application>NanoBSD</application> image is built using a simple <filename>nanobsd.sh</filename> shell script, which can be found in the <filename><replaceable>/usr</replaceable>/src/tools/tools/nanobsd</filename> directory. This script creates an image, which can be copied on the storage medium using the <citerefentry><refentrytitle>dd</refentrytitle><manvolnum>1</manvolnum></citerefentry> utility.
The necessary commands to build a <application>NanoBSD</application> image are:
<prompt>#</prompt> <userinput>cd /usr/src/tools/tools/nanobsd</userinput> <co xml:id="nbsd-cd"/>
<prompt>#</prompt> <userinput>sh nanobsd.sh</userinput> <co xml:id="nbsd-sh"/>
<prompt>#</prompt> <userinput>cd /usr/obj/nanobsd.full</userinput> <co xml:id="nbsd-cd2"/>
<prompt>#</prompt> <userinput>dd if=_.disk.full of=/dev/da0 bs=64k</userinput> <co xml:id="nbsd-dd"/>
Change the current directory to the base directory of the <application>NanoBSD</application> build script.
Start the build process.
Change the current directory to the place where the built images are located.
Install <application>NanoBSD</application> onto the storage medium.
Customizing a NanoBSD Image
This is probably the most important and most interesting feature of <application>NanoBSD</application>. This is also where you will be spending most of the time when developing with <application>NanoBSD</application>.
Invocation of the following command will force the <filename>nanobsd.sh</filename> to read its configuration from <filename>myconf.nano</filename> located in the current directory:
<prompt>#</prompt> <userinput>sh nanobsd.sh -c myconf.nano</userinput>
Customization is done in two ways:
Configuration options
Custom functions
Configuration Options
buildworld
installworld
With configuration settings, it is possible to configure options passed to both the <_:buildtarget-1/> and <_:buildtarget-2/> stages of the <application>NanoBSD</application> build process, as well as internal options passed to the main build process of <application>NanoBSD</application>. 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 FreeBSD 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:
<literal>NANO_NAME</literal> — Name of build (used to construct the workdir names).
<literal>NANO_SRC</literal> — Path to the source tree used to build the image.
<literal>NANO_KERNEL</literal> — Name of kernel configuration file used to build kernel.
<literal>CONF_BUILD</literal> — Options passed to the <_:buildtarget-1/> stage of the build.
<literal>CONF_INSTALL</literal> — Options passed to the <_:buildtarget-1/> stage of the build.
<literal>CONF_WORLD</literal> — Options passed to both the <_:buildtarget-1/> and the <_:buildtarget-2/> stage of the build.
<literal>FlashDevice</literal> — Defines what type of media to use. Check <filename>FlashDevice.sub</filename> for more details.
Custom Functions
It is possible to fine-tune <application>NanoBSD</application> using shell functions in the configuration file. The following example illustrates the basic model of custom functions:
cust_foo () (
echo "bar=baz" &gt; \
${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 <filename>/etc</filename> directory from 5MB to 30MB:
cust_etc_size () (
cd ${NANO_WORLDDIR}/conf
echo 30000 &gt; default/etc/md_size
)
customize_cmd cust_etc_size
ComponentTranslation
This translation Translated FreeBSD Doc/articles_nanobsd buildworld
The following strings have the same context and source.
Translated FreeBSD Doc/articles_freebsd-update-server buildworld
Translated FreeBSD Doc/books_porters-handbook buildworld
Translated FreeBSD Doc/books_handbook buildworld
Translated FreeBSD Doc/books_faq buildworld
Translated FreeBSD Doc/articles_releng buildworld

Loading…

No matching activity found.

Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks

Reset

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment

(itstool) path: para/buildtarget

Flags
read-only
Source string location
article.translate.xml:230 article.translate.xml:262 article.translate.xml:274
String age
a year ago
Source string age
a year ago
Translation file
articles/nanobsd.pot, string 45