Source string Read only

(itstool) path: step/para
216/2160
Context English State
<literal>cust_allow_ssh_root</literal> — Allow <systemitem class="username">root</systemitem> to login via <citerefentry><refentrytitle>sshd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<literal>cust_install_files</literal> — Installs files from the <filename>nanobsd/Files</filename> directory, which contains some useful scripts for system administration.
Adding Packages
Packages can be added to a <application>NanoBSD</application> image using a custom function. The following function will install all the packages located in <filename>/usr/src/tools/tools/nanobsd/packages</filename>:
install_packages () (
mkdir -p ${NANO_WORLDDIR}/packages
cp /usr/src/tools/tools/nanobsd/packages/* ${NANO_WORLDDIR}/packages
cp $(which pkg-static) ${NANO_WORLDDIR}/
chroot ${NANO_WORLDDIR} sh -c 'cd packages; /pkg-static add *;cd ..;'
rm -rf ${NANO_WORLDDIR}/packages ${NANO_WORLDDIR}/pkg-static
)
customize_cmd install_packages
Configuration File Example
A complete example of a configuration file for building a custom <application>NanoBSD</application> image can be:
NANO_NAME=custom
NANO_SRC=/usr/src
NANO_KERNEL=MYKERNEL
NANO_IMAGES=2

CONF_BUILD='
WITHOUT_KLDLOAD=YES
WITHOUT_NETGRAPH=YES
WITHOUT_PAM=YES
'

CONF_INSTALL='
WITHOUT_ACPI=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_FORTRAN=YES
WITHOUT_HTML=YES
WITHOUT_LPR=YES
WITHOUT_MAN=YES
WITHOUT_SENDMAIL=YES
WITHOUT_SHAREDOCS=YES
WITHOUT_EXAMPLES=YES
WITHOUT_INSTALLLIB=YES
WITHOUT_CALENDAR=YES
WITHOUT_MISC=YES
WITHOUT_SHARE=YES
'

CONF_WORLD='
WITHOUT_BIND=YES
WITHOUT_MODULES=YES
WITHOUT_KERBEROS=YES
WITHOUT_GAMES=YES
WITHOUT_RESCUE=YES
WITHOUT_LOCALES=YES
WITHOUT_SYSCONS=YES
WITHOUT_INFO=YES
'

FlashDevice SanDisk 1G

cust_nobeastie() (
touch ${NANO_WORLDDIR}/boot/loader.conf
echo "beastie_disable=\"YES\"" &gt;&gt; ${NANO_WORLDDIR}/boot/loader.conf
)

customize_cmd cust_comconsole
customize_cmd cust_install_files
customize_cmd cust_allow_ssh_root
customize_cmd cust_nobeastie
Updating NanoBSD
The update process of <application>NanoBSD</application> is relatively simple:
Build a new <application>NanoBSD</application> image, as usual.
Upload the new image into an unused partition of a running <application>NanoBSD</application> appliance.
The most important difference of this step from the initial <application>NanoBSD</application> installation is that now instead of using <filename>_.disk.full</filename> (which contains an image of the entire disk), the <filename>_.disk.image</filename> image is installed (which contains an image of a single system partition).
Reboot, and start the system from the newly installed partition.
If all goes well, the upgrade is finished.
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.
To install new image onto the running <application>NanoBSD</application> system, it is possible to use either the <filename>updatep1</filename> or <filename>updatep2</filename> script located in the <filename>/root</filename> directory, depending from which partition is running the current system.
According to which services are available on host serving new <application>NanoBSD</application> image and what type of transfer is preferred, it is possible to examine one of these three ways:
Using <citerefentry><refentrytitle>ftp</refentrytitle><manvolnum>1</manvolnum></citerefentry>
If the transfer speed is in first place, use this example:
<prompt>#</prompt> <userinput>ftp myhost
get _.disk.image "| sh updatep1"</userinput>
Using <citerefentry><refentrytitle>ssh</refentrytitle><manvolnum>1</manvolnum></citerefentry>
If a secure transfer is preferred, consider using this example:
<prompt>#</prompt> <userinput>ssh myhost cat _.disk.image.gz | zcat | sh updatep1</userinput>
Using <citerefentry><refentrytitle>nc</refentrytitle><manvolnum>1</manvolnum></citerefentry>
Try this example if the remote host is not running neither <citerefentry><refentrytitle>ftpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> or <citerefentry><refentrytitle>sshd</refentrytitle><manvolnum>8</manvolnum></citerefentry> service:
At first, open a TCP listener on host serving the image and make it send the image to client:
myhost<prompt>#</prompt> <userinput>nc -l <replaceable>2222</replaceable> &lt; _.disk.image</userinput>
Make sure that the used port is not blocked to receive incoming connections from <application>NanoBSD</application> host by firewall.
Connect to the host serving new image and execute <filename>updatep1</filename> script:
<prompt>#</prompt> <userinput>nc myhost <replaceable>2222</replaceable> | sh updatep1</userinput>

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: step/para
Flags
read-only
Source string location
article.translate.xml:454
String age
a year ago
Source string age
a year ago
Translation file
articles/nanobsd.pot, string 78