Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/articles/nanobsd/_index.adoc
Context not available. | |||||
:sectnumlevels: 6 | :sectnumlevels: 6 | ||||
:source-highlighter: rouge | :source-highlighter: rouge | ||||
:experimental: | :experimental: | ||||
:images-path: articles/nanobsd/ | |||||
ifeval::["{backend}" == "html5"] | ifdef::env-beastie+backend-html5[] | ||||
include::shared/authors.adoc[] | include::shared/authors.adoc[] | ||||
include::shared/en/urls.adoc[] | include::shared/mirrors.adoc[] | ||||
include::shared/releases.adoc[] | |||||
include::shared/{{% lang %}}/mailing-lists.adoc[] | |||||
include::shared/{{% lang %}}/urls.adoc[] | |||||
:imagesdir: ../../../images/{images-path} | |||||
endif::[] | endif::[] | ||||
ifeval::["{backend}" == "pdf"] | ifndef::env-beastie[] | ||||
include::../../../../shared/authors.adoc[] | include::../../../../shared/asciidoctor.adoc[] | ||||
include::../../../../shared/en/urls.adoc[] | |||||
endif::[] | |||||
ifeval::["{backend}" == "epub3"] | |||||
include::../../../../shared/authors.adoc[] | |||||
include::../../../../shared/en/urls.adoc[] | |||||
endif::[] | endif::[] | ||||
[.abstract-title] | [.abstract-title] | ||||
Context not available. | |||||
With `NANO_BOOTLOADER` a bootloader file can be chosen. | With `NANO_BOOTLOADER` a bootloader file can be chosen. | ||||
The most common possible options are between [.filename]#boot0sio# and [.filename]#boot0# depending on whether the appliance has a serial port or not. | The most common possible options are between [.filename]#boot0sio# and [.filename]#boot0# depending on whether the appliance has a serial port or not. | ||||
It is best to avoid supplying a different bootloader, but it is possible. | It is best to avoid supplying a different bootloader, but it is possible. | ||||
To do so, it is best to have checked the link:{handbook}boot/[FreeBSD Handbook] chapter on the boot process. | To do so, it is best to have checked the extref:{handbook}boot[FreeBSD Handbook] chapter on the boot process. | ||||
With `NANO_BOOT0CFG`, the booting process can be tweaked, like selecting on which partition the NanoBSD image will actually boot. | With `NANO_BOOT0CFG`, the booting process can be tweaked, like selecting on which partition the NanoBSD image will actually boot. | ||||
It is best to check the man:boot0cfg[8] page before changing the default value of this variable. | It is best to check the man:boot0cfg[8] page before changing the default value of this variable. | ||||
Context not available. | |||||
* The `NANO_MEDIASIZE` variable must be set to the size (in 512 bytes sectors) of the storage media that will be used. If you set it wrong, it is possible that the NanoBSD image will not boot at all, and a message at boot time will be warning about incorrect disk geometry. | * The `NANO_MEDIASIZE` variable must be set to the size (in 512 bytes sectors) of the storage media that will be used. If you set it wrong, it is possible that the NanoBSD image will not boot at all, and a message at boot time will be warning about incorrect disk geometry. | ||||
* The [.filename]#/etc#, [.filename]#/var#, and [.filename]#/tmp# directories are allocated as man:md[4] (malloc) disks at boot time; so their sizes can be tailored to suit the appliance needs. The `NANO_RAM_ETCSIZE` variable sets the size of the [.filename]#/etc#; and the `NANO_RAM_TMPVARSIZE` variable sets the size of both the [.filename]#/var# and [.filename]#/tmp# directory, as [.filename]#/tmp# is symbolically linked to [.filename]#/var/tmp#. By default, both malloc disks sizes are set at 20MB each. They can always be changed, but usually the [.filename]#/etc# does not grow too much in size, so 20MB is a good starting point, whereas the [.filename]#/var# and especially [.filename]#/tmp# can grow much larger if not careful about it. For memory constrained systems, smaller filesystem sizes may be chosen. | * The [.filename]#/etc#, [.filename]#/var#, and [.filename]#/tmp# directories are allocated as man:md[4] (malloc) disks at boot time; so their sizes can be tailored to suit the appliance needs. The `NANO_RAM_ETCSIZE` variable sets the size of the [.filename]#/etc#; and the `NANO_RAM_TMPVARSIZE` variable sets the size of both the [.filename]#/var# and [.filename]#/tmp# directory, as [.filename]#/tmp# is symbolically linked to [.filename]#/var/tmp#. By default, both malloc disks sizes are set at 20MB each. They can always be changed, but usually the [.filename]#/etc# does not grow too much in size, so 20MB is a good starting point, whereas the [.filename]#/var# and especially [.filename]#/tmp# can grow much larger if not careful about it. For memory constrained systems, smaller filesystem sizes may be chosen. | ||||
* As NanoBSD is mainly designed to build a system image for an appliance, it is assumed that the storage media used will be relatively small. For that reason, the filesystem that is laid out is configured to have a small block size (4Kb) and a small fragment size (512b). The configuration options of the filesystem can be modified through the `NANO_NEWFS` variable, but the syntax must respect the man:newfs[8] command format. Also, by default, the filesystem has Soft Updates enabled. The link:{handbook}[FreeBSD Handbook] can be checked about this. | * As NanoBSD is mainly designed to build a system image for an appliance, it is assumed that the storage media used will be relatively small. For that reason, the filesystem that is laid out is configured to have a small block size (4Kb) and a small fragment size (512b). The configuration options of the filesystem can be modified through the `NANO_NEWFS` variable, but the syntax must respect the man:newfs[8] command format. Also, by default, the filesystem has Soft Updates enabled. The extref:{handbook}[FreeBSD Handbook] can be checked about this. | ||||
* The different partition sizes can be set through the use of `NANO_CODESIZE`, `NANO_CONFSIZE`, and `NANO_DATASIZE` as a multiple of 512 bytes sectors. `NANO_CODESIZE` defines the size of the first two image partitions: `code#1` and `code#2`. They have to be big enough to hold all the files that will be produced as a result of the `buildworld` and `buildkernel` processes. `NANO_CONFSIZE` defines the size of the configuration file partition, so it does not need to be very big; but do not make it so small that it will not hold all configuration files. Finally, `NANO_DATASIZE` defines the size of an optional partition, that can be used on the appliance. The last partition can be used, for example, to keep files created on the fly on disk. | * The different partition sizes can be set through the use of `NANO_CODESIZE`, `NANO_CONFSIZE`, and `NANO_DATASIZE` as a multiple of 512 bytes sectors. `NANO_CODESIZE` defines the size of the first two image partitions: `code#1` and `code#2`. They have to be big enough to hold all the files that will be produced as a result of the `buildworld` and `buildkernel` processes. `NANO_CONFSIZE` defines the size of the configuration file partition, so it does not need to be very big; but do not make it so small that it will not hold all configuration files. Finally, `NANO_DATASIZE` defines the size of an optional partition, that can be used on the appliance. The last partition can be used, for example, to keep files created on the fly on disk. | ||||
==== Custom Functions | ==== Custom Functions | ||||
Context not available. |