Table of Contents
Sometimes you may want to create your own boot or install floppies for i386 instead of using the precompiled ones, or tailor the ones built by the NetBSD build system. This section outlines the steps to do so.
The overall idea is to have a filesystem with some tools
(sysinst, ls, whatever), and embed this filesystem as some sort
of ramdisk into a NetBSD kernel. The kernel needs to include the
md
pseudo device to be able to hold a ramdisk.
The kernel with the ramdisk can then be put on removable media or made
available via the net (using NFS or TFTP).
To perform the following steps, you need to be running a kernel
with the vnd
pseudo device enabled (this is
the default for a GENERIC kernel).
First, you must create a valid kernel to put on your floppies,
e.g. INSTALL. This kernel must include the
md
pseudo device, which allows embedding
a ramdisk. See Chapter 31, Compiling the kernel for kernel building
instructions.
The next step is to create the ramdisk that gets embedded
into the kernel. The ramdisk contains a filesystem with
whatever tools are needed, usually init(8) and some
tools like sysinst, ls(1), etc. To create the standard
ramdisk, run make
in the src/distrib/i386/ramdisks/ramdisk-big
directory (for NetBSD 3.x:
src/distrib/i386/floppies/ramdisk-big
).
This will create the
ramdisk.fs
file in the directory. If
you want to customize the contents of the filesystem,
customize the list
file.
Now, the ramdisk gets inserted into the kernel, producing a
new kernel which includes the ramdisk, all in one file. To
do so, change into the
src/distrib/i386/instkernel
directory (for NetBSD 3.x:
src/distrib/i386/floppies/instkernel
)
and run make.
The next step is to make one or more floppy images,
depending on the size of the kernel (including the ramdisk).
This is done by changing into
/usr/src/distrib/i386/floppies/bootfloppy-big
,
and running make again.
This will create one or two (depending on the size of kernel)
files named boot1.fs
and
boot2.fs
Last, transfer these files to the floppies with the commands
#
dd if=boot1.fs of=/dev/fd0a bs=36b
#
dd if=boot2.fs of=/dev/fd0a bs=36b
Put the first floppy in the drive and power on!
Creating custom install or boot CDs is easy with build.sh. The NetBSD base system includes the makefs tool for creating filesystems. This tool is used to create iso-images. Creating iso-images includes these tasks:
Release build
#
./build.sh release
CD-ROM iso-image build
#
./build.sh iso-image
The build.sh iso-image command will
build a CD-ROM image in RELEASEDIR/MACHINE/installation
For now not all architectures are supported. The mac/68k ports doesn't boot for now.