Table of Contents
For some architectures, you can build a disk or ISO image
that boots into an installer.
This is accomplished by running
with the targets
install-image (for an USB stick) or
iso-image (for a DVD or CD):
./build.sh -U -u -j2 -m amd64 -O ~/obj tools
./build.sh -U -u -j2 -m amd64 -O ~/obj release
./build.sh -U -u -j2 -m amd64 -O ~/obj install-image
./build.sh targets are available, see
Chapter 33, Crosscompiling NetBSD with
Sometimes you may want to create your own customized pre-installed ("live") images instead of using the precompiled images, for e.g. mass deployment on embedded systems. This section outlines the steps to do so.
You must build a release of NetBSD so there are binaries
to fill the image.
See Chapter 33, Crosscompiling NetBSD with
build.sh for instructions.
You must write or pick a sh(1) script from
Examine the default configurations, and if necessary,
customize one to your needs.
The scripts can alter and add to the system configuration files.
Run the utility:
./distrib/utils/embedded/mkimage -D obj/destdir.amd64 -K sys/arch/amd64/compile/obj/GENERIC/netbsd -h amd64 -x ./example-amd64-image.img
In this case, we are building an image for the amd64.conf configuration, so we specify -h amd64.
We want to include the X11 sets, so we specify -x.
We specify MKDTB=no in the environment to avoid building device tree blobs, which are only used on ARM and MIPS.
vndconfig vnd0 ./example-amd64-image.img
mount /dev/vnd0a /mnt
pkg_add -P /mnt -K /usr/pkg/pkgdb -v darkstat-3.0.719.tgz
Write the image to your live media:
dd if=example-amd64-image.img ibs=1m | progress dd of=/dev/rsd0 obs=1m