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
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
mdpseudo device, which allows embedding a ramdisk. See 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
src/distrib/i386/ramdisks/ramdisk-bigdirectory (for NetBSD 3.x:
This will create the
ramdisk.fsfile in the directory. If you want to customize the contents of the filesystem, customize the
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/instkerneldirectory (for NetBSD 3.x:
src/distrib/i386/floppies/instkernel) and run
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
This will create one or two (depending on the size of kernel) files named
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
tool for creating filesystems. This tool is used to create iso-images. Creating
iso-images includes these tasks:
CD-ROM iso-image build
build.sh iso-image command will build a CD-ROM image in
Warning: For now not all architectures are supported. The mac/68k ports doesn't boot for now.