1 .\" $NetBSD: mkbootimage.8,v 1.4 2008/04/30 21:15:33 garbled Exp $
2 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
3 .\" All rights reserved.
5 .\" This code is derived from software contributed to The NetBSD Foundation
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 .\" POSSIBILITY OF SUCH DAMAGE.
30 .Dt MKBOOTIMAGE 8 prep
34 .Nd create a prep boot image
38 .Op Fl m Ar machine_arch
45 is the utility used to create a bootable kernel image on
47 for prep, bebox or rs6000.
51 utility takes the boot-program, and the optional kernel, and creates a boot
53 This image contains the boot code, kernel, and optionally
54 an i386 partition table.
55 The image can be written directly to a floppy or hard drive with
58 command, or it can be directly netbooted via
61 The following options are available:
62 .Bl -tag -width indent
64 Specifies which bootloader to embed in the bootable image.
68 Specifies which kernel binary to embed in the bootable image.
72 Creates a partition table for a 2.88MB floppy instead of a 1.44MB floppy.
73 This is primarily used for El-Torrito style CD images.
75 Selects the machine architecture to build the image for.
76 Currently supports prep, rs6000 and bebox.
77 Defaults to the machine architecture you are currently running on.
78 This option is required if you are building an image for another machine, such
79 as building a prep boot image on i386.
81 Specifies the raw device to read to gather the current partition table.
85 Generates a standalone image with no partition table embedded.
87 Generates verbose output, useful for debugging.
90 There are three primary ways to use
92 to build a bootable image:
94 The first method is to build an image suitable for a floppy or netboot.
95 This will create an image with an embedded partition table with a
96 single PReP boot partition of type 0x41(65).
97 The image can be directly netbooted, or if it
98 is small enough, written directly to a floppy with
101 will warn you if the generated image is too large to be written to a floppy.
103 The second method is to build a standalone image with no partition table.
104 This should be written to the PReP boot partition on your hard drive with
107 The third method is for use in upgrading older systems that have
108 been built by writing the floppy image directly to the head of the
110 This method reads the existing partition table and embeds that in
112 This should prevent loss of your current partition layout.
113 This image should be written directly to the head of the disk with
116 The recommended setup for a PReP machine is to build a partition table with
118 that contains a PReP boot partition (type 65) as partition 0, marked active,
119 and a second partition for
121 encompassing the remainder of the disk.
122 You should then create a disklabel on
123 that disk with a partition (such as e) pointing to the PReP boot partition.
124 Partition c should be the whole disk, and partition d can optionally be the
127 You may then use the other partitions for your normal disk layout.
128 The PReP boot partition can be placed anywhere on the disk, but it is
129 recommended that it be placed at the beginning of the disk.
131 Create a floppy or netboot image for prep named
133 .Dl Ic mkbootimage -m prep -b /usr/mdec/boot -k /netbsd boot.fs
134 Create a standalone bebox image for booting from a hard disk:
135 .Dl Ic mkbootimage -s -m bebox -b /usr/mdec/boot -k /netbsd boot.fs
136 Use the partition information on
138 to create a new bootable image with com0 as the console:
139 .Dl Ic mkbootimage -b /usr/mdec/boot_com0 -k /netbsd -r /dev/rsd0c boot.fs
153 .An NONAKA Kimihiro .