#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2018-12-08 14:45-0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "" #. (itstool) path: info/title #. (itstool) path: sect1/title #: article.translate.xml:4 article.translate.xml:40 msgid "Introduction to NanoBSD" msgstr "" #. (itstool) path: authorgroup/author #: article.translate.xml:7 msgid "" "DanielGerzo" msgstr "" #. (itstool) path: info/copyright #: article.translate.xml:10 msgid "2006 The FreeBSD Documentation Project" msgstr "" #. (itstool) path: legalnotice/para #: article.translate.xml:16 msgid "FreeBSD is a registered trademark of the FreeBSD Foundation." msgstr "" #. (itstool) path: legalnotice/para #: article.translate.xml:18 msgid "" "Many of the designations used by manufacturers and sellers to distinguish " "their products are claimed as trademarks. Where those designations appear in " "this document, and the FreeBSD Project was aware of the trademark claim, the " "designations have been followed by the or the ® symbol." msgstr "" #. (itstool) path: info/pubdate #. (itstool) path: info/releaseinfo #: article.translate.xml:26 article.translate.xml:28 msgid "" "$FreeBSD: head/en_US.ISO8859-1/articles/nanobsd/article.xml 44936 2014-05-24 " "15:33:58Z bcr $" msgstr "" #. (itstool) path: abstract/para #: article.translate.xml:31 msgid "" "This document provides information about the NanoBSD tools, which can be used to create FreeBSD system images for " "embedded applications, suitable for use on a Compact Flash card (or other " "mass storage medium)." msgstr "" #. (itstool) path: sect1/indexterm #: article.translate.xml:42 msgid "NanoBSD" msgstr "" #. (itstool) path: sect1/para #: article.translate.xml:44 msgid "" "NanoBSD is a tool currently developed by Poul-" "Henning Kamp phk@FreeBSD.org. It creates a FreeBSD system " "image for embedded applications, suitable for use on a Compact Flash card " "(or other mass storage medium)." msgstr "" #. (itstool) path: sect1/para #: article.translate.xml:49 msgid "" "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." msgstr "" #. (itstool) path: sect1/para #: article.translate.xml:57 msgid "The features of NanoBSD include:" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:62 msgid "" "Ports and packages work as in FreeBSD — Every single application can be " "installed and used in a NanoBSD image, the same " "way as in FreeBSD." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:69 msgid "" "No missing functionality — If it is possible to do something with FreeBSD, " "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." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:78 msgid "" "Everything is read-only at run-time — It is safe to pull the power-plug. " "There is no necessity to run fsck8 after a non-graceful " "shutdown of the system." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:85 msgid "" "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." msgstr "" #. (itstool) path: sect1/title #: article.translate.xml:94 msgid "NanoBSD Howto" msgstr "" #. (itstool) path: sect2/title #: article.translate.xml:97 msgid "The Design of NanoBSD" msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:99 msgid "" "Once the image is present on the medium, it is possible to boot " "NanoBSD. The mass storage medium is divided into " "three parts by default:" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:105 msgid "" "Two image partitions: code#1 and code#2." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:110 msgid "" "The configuration file partition, which can be mounted under the /" "cfg directory at run time." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:116 msgid "These partitions are normally mounted read-only." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:118 msgid "" "The /etc and /var directories are " "md4 (malloc) disks." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:122 msgid "" "The configuration file partition persists under the /cfg directory. It contains files for /etc " "directory and is briefly mounted read-only right after the system boot, " "therefore it is required to copy modified files from /etc back to the /cfg directory if changes are " "expected to persist after the system restarts." msgstr "" #. (itstool) path: example/title #: article.translate.xml:132 msgid "Making Persistent Changes to /etc/resolv.conf" msgstr "" #. (itstool) path: example/screen #: article.translate.xml:135 #, no-wrap msgid "" "# vi /etc/resolv.conf\n" "[...]\n" "# mount /cfg\n" "# cp /etc/resolv.conf /cfg\n" "# umount /cfg" msgstr "" #. (itstool) path: note/para #: article.translate.xml:143 msgid "" "The partition containing /cfg should be mounted only at " "boot time and while overriding the configuration files." msgstr "" #. (itstool) path: note/para #: article.translate.xml:148 msgid "" "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)." msgstr "" #. (itstool) path: sect2/title #: article.translate.xml:158 msgid "Building a NanoBSD Image" msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:160 msgid "" "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 dd1 utility." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:167 msgid "" "The necessary commands to build a NanoBSD image " "are:" msgstr "" #. (itstool) path: sect2/screen #: article.translate.xml:170 #, no-wrap msgid "" "# cd /usr/src/tools/tools/nanobsd " "\n" "# sh nanobsd.sh \n" "# cd /usr/obj/nanobsd.full \n" "# dd if=_.disk.full of=/dev/da0 bs=64k " msgstr "" #. (itstool) path: callout/para #: article.translate.xml:177 msgid "" "Change the current directory to the base directory of the " "NanoBSD build script." msgstr "" #. (itstool) path: callout/para #: article.translate.xml:183 msgid "Start the build process." msgstr "" #. (itstool) path: callout/para #: article.translate.xml:187 msgid "" "Change the current directory to the place where the built images are located." "" msgstr "" #. (itstool) path: callout/para #: article.translate.xml:192 msgid "Install NanoBSD onto the storage medium." msgstr "" #. (itstool) path: sect2/title #: article.translate.xml:199 msgid "Customizing a NanoBSD Image" msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:201 msgid "" "This is probably the most important and most interesting feature of " "NanoBSD. This is also where you will be spending " "most of the time when developing with NanoBSD." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:206 msgid "" "Invocation of the following command will force the nanobsd.sh to read its configuration from myconf.nano " "located in the current directory:" msgstr "" #. (itstool) path: sect2/screen #: article.translate.xml:211 #, no-wrap msgid "# sh nanobsd.sh -c myconf.nano" msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:213 msgid "Customization is done in two ways:" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:217 msgid "Configuration options" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:221 msgid "Custom functions" msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:226 msgid "Configuration Options" msgstr "" #. (itstool) path: para/buildtarget #: article.translate.xml:230 article.translate.xml:262 #: article.translate.xml:274 msgid "buildworld" msgstr "" #. (itstool) path: para/buildtarget #: article.translate.xml:231 article.translate.xml:268 #: article.translate.xml:275 msgid "installworld" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:228 msgid "" "With configuration settings, it is possible to configure options passed to " "both the <_:buildtarget-1/> and <_:buildtarget-2/> 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 FreeBSD even more, until it will consists of just the kernel " "and two or three files in the userland." msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:240 msgid "" "The configuration file consists of configuration options, which override the " "default values. The most important directives are:" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:246 msgid "" "NANO_NAME — Name of build (used to construct the workdir " "names)." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:251 msgid "" "NANO_SRC — Path to the source tree used to build the " "image." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:256 msgid "" "NANO_KERNEL — Name of kernel configuration file used to " "build kernel." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:261 msgid "" "CONF_BUILD — Options passed to the <_:buildtarget-1/> " "stage of the build." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:267 msgid "" "CONF_INSTALL — Options passed to the <_:buildtarget-1/> " "stage of the build." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:273 msgid "" "CONF_WORLD — Options passed to both the <_:buildtarget-1/" "> and the <_:buildtarget-2/> stage of the build." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:280 msgid "" "FlashDevice — Defines what type of media to use. Check " "FlashDevice.sub for more details." msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:289 msgid "Custom Functions" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:291 msgid "" "It is possible to fine-tune NanoBSD using shell " "functions in the configuration file. The following example illustrates the " "basic model of custom functions:" msgstr "" #. (itstool) path: sect3/programlisting #: article.translate.xml:296 #, no-wrap msgid "" "cust_foo () (\n" " echo \"bar=baz\" > \\\n" " ${NANO_WORLDDIR}/etc/foo\n" ")\n" "customize_cmd cust_foo" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:302 msgid "" "A more useful example of a customization function is the following, which " "changes the default size of the /etc directory from 5MB " "to 30MB:" msgstr "" #. (itstool) path: sect3/programlisting #: article.translate.xml:306 #, no-wrap msgid "" "cust_etc_size () (\n" " cd ${NANO_WORLDDIR}/conf\n" " echo 30000 > default/etc/md_size\n" ")\n" "customize_cmd cust_etc_size" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:312 msgid "" "There are a few default pre-defined customization functions ready for use:" msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:317 msgid "" "cust_comconsole — Disables " "getty8 on the VGA devices (the /dev/ttyv* device " "nodes) and enables the use of the COM1 serial port as the system console." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:325 msgid "" "cust_allow_ssh_root — Allow root to login via " "sshd8." msgstr "" #. (itstool) path: listitem/para #: article.translate.xml:331 msgid "" "cust_install_files — Installs files from the " "nanobsd/Files directory, which contains some useful " "scripts for system administration." msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:341 msgid "Adding Packages" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:343 msgid "" "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:" msgstr "" #. (itstool) path: sect3/programlisting #: article.translate.xml:349 #, no-wrap msgid "" "install_packages () (\n" "mkdir -p ${NANO_WORLDDIR}/packages\n" "cp /usr/src/tools/tools/nanobsd/packages/* ${NANO_WORLDDIR}/packages\n" "chroot ${NANO_WORLDDIR} sh -c 'cd packages; pkg_add -v *;cd ..;'\n" "rm -rf ${NANO_WORLDDIR}/packages\n" ")\n" "customize_cmd install_packages" msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:359 msgid "Configuration File Example" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:361 msgid "" "A complete example of a configuration file for building a custom " "NanoBSD image can be:" msgstr "" #. (itstool) path: sect3/programlisting #: article.translate.xml:365 #, no-wrap msgid "" "NANO_NAME=custom\n" "NANO_SRC=/usr/src\n" "NANO_KERNEL=MYKERNEL\n" "NANO_IMAGES=2\n" "\n" "CONF_BUILD='\n" "WITHOUT_KLDLOAD=YES\n" "WITHOUT_NETGRAPH=YES\n" "WITHOUT_PAM=YES\n" "'\n" "\n" "CONF_INSTALL='\n" "WITHOUT_ACPI=YES\n" "WITHOUT_BLUETOOTH=YES\n" "WITHOUT_FORTRAN=YES\n" "WITHOUT_HTML=YES\n" "WITHOUT_LPR=YES\n" "WITHOUT_MAN=YES\n" "WITHOUT_SENDMAIL=YES\n" "WITHOUT_SHAREDOCS=YES\n" "WITHOUT_EXAMPLES=YES\n" "WITHOUT_INSTALLLIB=YES\n" "WITHOUT_CALENDAR=YES\n" "WITHOUT_MISC=YES\n" "WITHOUT_SHARE=YES\n" "'\n" "\n" "CONF_WORLD='\n" "WITHOUT_BIND=YES\n" "WITHOUT_MODULES=YES\n" "WITHOUT_KERBEROS=YES\n" "WITHOUT_GAMES=YES\n" "WITHOUT_RESCUE=YES\n" "WITHOUT_LOCALES=YES\n" "WITHOUT_SYSCONS=YES\n" "WITHOUT_INFO=YES\n" "'\n" "\n" "FlashDevice SanDisk 1G\n" "\n" "cust_nobeastie() (\n" " touch ${NANO_WORLDDIR}/boot/loader.conf\n" " echo \"beastie_disable=\\\"YES\\\"\" >> ${NANO_WORLDDIR}/boot/loader." "conf\n" ")\n" "\n" "customize_cmd cust_comconsole\n" "customize_cmd cust_install_files\n" "customize_cmd cust_allow_ssh_root\n" "customize_cmd cust_nobeastie" msgstr "" #. (itstool) path: sect2/title #: article.translate.xml:418 msgid "Updating NanoBSD" msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:420 msgid "" "The update process of NanoBSD is relatively " "simple:" msgstr "" #. (itstool) path: step/para #: article.translate.xml:425 msgid "Build a new NanoBSD image, as usual." msgstr "" #. (itstool) path: step/para #: article.translate.xml:430 msgid "" "Upload the new image into an unused partition of a running " "NanoBSD appliance." msgstr "" #. (itstool) path: step/para #: article.translate.xml:434 msgid "" "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)." msgstr "" #. (itstool) path: step/para #: article.translate.xml:444 msgid "Reboot, and start the system from the newly installed partition." msgstr "" #. (itstool) path: step/para #: article.translate.xml:449 msgid "If all goes well, the upgrade is finished." msgstr "" #. (itstool) path: step/para #: article.translate.xml:453 msgid "" "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." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:460 msgid "" "To install new image onto the running 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." msgstr "" #. (itstool) path: sect2/para #: article.translate.xml:467 msgid "" "According to which services are available on host serving new " "NanoBSD image and what type of transfer is " "preferred, it is possible to examine one of these three ways:" msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:473 msgid "" "Using ftp1" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:475 msgid "If the transfer speed is in first place, use this example:" msgstr "" #. (itstool) path: sect3/screen #: article.translate.xml:478 #, no-wrap msgid "" "# ftp myhost\n" "get _.disk.image \"| sh updatep1\"" msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:483 msgid "" "Using ssh1" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:485 msgid "If a secure transfer is preferred, consider using this example:" msgstr "" #. (itstool) path: sect3/screen #: article.translate.xml:488 #, no-wrap msgid "" "# ssh myhost cat _.disk.image.gz | zcat | sh " "updatep1" msgstr "" #. (itstool) path: sect3/title #: article.translate.xml:492 msgid "" "Using nc1" msgstr "" #. (itstool) path: sect3/para #: article.translate.xml:494 msgid "" "Try this example if the remote host is not running neither " "ftpd8 or sshd8 service:" msgstr "" #. (itstool) path: step/para #: article.translate.xml:499 msgid "" "At first, open a TCP listener on host serving the image and make it send the " "image to client:" msgstr "" #. (itstool) path: step/screen #: article.translate.xml:502 #, no-wrap msgid "" "myhost# nc -l 2222 " "< _.disk.image" msgstr "" #. (itstool) path: note/para #: article.translate.xml:505 msgid "" "Make sure that the used port is not blocked to receive incoming connections " "from NanoBSD host by firewall." msgstr "" #. (itstool) path: step/para #: article.translate.xml:513 msgid "" "Connect to the host serving new image and execute updatep1 script:" msgstr "" #. (itstool) path: step/screen #: article.translate.xml:516 #, no-wrap msgid "" "# nc myhost 2222 | sh " "updatep1" msgstr ""