Annotation of wikisrc/guide/inst-media.mdwn, revision 1.1
1.1 ! jdf 1: # Building NetBSD installation media
! 3: ## Creating custom install or boot floppies for your architecture e.g. i386
! 5: Sometimes you may want to create your own boot or install floppies for i386
! 6: instead of using the precompiled ones, or tailor the ones built by the NetBSD
! 7: build system. This section outlines the steps to do so.
! 9: The overall idea is to have a filesystem with some tools (sysinst, ls,
! 10: whatever), and embed this filesystem as some sort of ramdisk into a NetBSD
! 11: kernel. The kernel needs to include the `md` pseudo device to be able to hold a
! 12: ramdisk. The kernel with the ramdisk can then be put on removable media or made
! 13: available via the net (using NFS or TFTP).
! 15: To perform the following steps, you need to be running a kernel with the `vnd`
! 16: pseudo device enabled (this is the default for a GENERIC kernel).
! 18: 1. First, you must create a valid kernel to put on your floppies, e.g.
! 19: INSTALL. This kernel must include the `md` pseudo device, which allows
! 20: embedding a ramdisk. See [[Compiling the kernel|guide/kernel]] for kernel
! 21: building instructions.
! 23: 2. The next step is to create the ramdisk that gets embedded into the kernel.
! 24: The ramdisk contains a filesystem with whatever tools are needed, usually
! 25: [init(8)](http://netbsd.gw.com/cgi-bin/man-cgi?init+8+NetBSD-5.0.1+i386) and
! 26: some tools like sysinst,
! 27: [ls(1)](http://netbsd.gw.com/cgi-bin/man-cgi?ls+1+NetBSD-5.0.1+i386), etc.
! 28: To create the standard ramdisk, run `make` in the
! 29: `src/distrib/i386/ramdisks/ramdisk-big` directory (for NetBSD 3.x:
! 30: `src/distrib/i386/floppies/ramdisk-big`).
! 32: This will create the `ramdisk.fs` file in the directory. If you want to
! 33: customize the contents of the filesystem, customize the `list` file.
! 35: 3. Now, the ramdisk gets inserted into the kernel, producing a new kernel which
! 36: includes the ramdisk, all in one file. To do so, change into the
! 37: `src/distrib/i386/instkernel` directory (for NetBSD 3.x:
! 38: `src/distrib/i386/floppies/instkernel`) and run `make`.
! 40: 4. The next step is to make one or more floppy images, depending on the size of
! 41: the kernel (including the ramdisk). This is done by changing into
! 42: `/usr/src/distrib/i386/floppies/bootfloppy-big`, and running `make` again.
! 44: This will create one or two (depending on the size of kernel) files named
! 45: `boot1.fs` and `boot2.fs`
! 47: 5. Last, transfer these files to the floppies with the commands
! 49: # dd if=boot1.fs of=/dev/fd0a bs=36b
! 50: # dd if=boot2.fs of=/dev/fd0a bs=36b
! 52: 6. Put the first floppy in the drive and power on!
! 54: ## Creating a custom install or boot CD with build.sh
! 56: Creating custom install or boot CDs is easy with `build.sh`. The NetBSD base
! 57: system includes the
! 58: [makefs(8)](http://netbsd.gw.com/cgi-bin/man-cgi?makefs+8+NetBSD-current)
! 59: tool for creating filesystems. This tool is used to create iso-images. Creating
! 60: iso-images includes these tasks:
! 62: 1. Release build
! 64: #./build.sh release
! 66: 2. CD-ROM iso-image build
! 68: #./build.sh iso-image
! 70: The `build.sh` iso-image command will build a CD-ROM image in
! 71: `RELEASEDIR/MACHINE/installation`
! 73: **Warning**: For now not all architectures are supported. The mac/68k ports
! 74: doesn't boot for now.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb