3 installboot \- make a device bootable
5 .B installboot \-i(mage)
8 .IR "mm fs" " ... " init
10 .B installboot \-(e)x(tract)
13 .B installboot \-d(evice)
14 .I device bootblock boot
18 .B installboot \-b(oot)
19 .I device bootblock boot
23 .B installboot \-m(aster)
25 .RI [ keys " [" logical ]]
32 may be used to make a device bootable by constructing a kernel image and
33 installing bootstrap code into the boot block of a MINIX 3 file system. To
34 understand how this can be done one first has to know what happens when a
37 When the power is turned on the typical PC will try to read the first sector
38 from the first floppy disk or from the first hard disk into memory and execute
39 it. The code obtained from the hard disk (from the so-called master boot
40 sector) will immediately replace itself by the code found in the first sector
41 of the active partition. Thus the PC is now executing the bootstrap code found
42 in the first sector of /dev/fd0, /dev/c0d0p0, /dev/c0d0p1, /dev/c0d0p2, or
43 /dev/c0d0p3 (assuming the boot disk is attached to controller 0.)
44 The bootstrap will locate the operating system on the device it itself was
45 loaded from, load it, and execute it.
47 To make a MINIX 3 file system
51 bootable, enter the following:
55 cp /usr/mdec/boot /mnt/boot
57 installboot \-i /mnt/minix kernel mm fs init
59 installboot \-d /dev/fd0 /usr/mdec/bootblock boot
63 The "boot" program in the example is named the "Boot Monitor". It is loaded
64 by the bootblock code placed in the boot sector of /dev/fd0 and it will take
65 care of loading the kernel image "minix" from the root directory of the
68 for a description of the Boot Monitor. Note that
70 is a name in the file system on
72 in this example, the same file as
76 is normally not necessary, there is usually a kernel image in the
83 .IR "mm fs" " ... " init
89 shorthand) combines the executable files needed to run MINIX 3 in one file.
90 Only the names and a few zero bytes are inserted into the image. The name
91 is for identification and the zeros are used to pad separate pieces to
92 sector boundaries for fast loading.
94 An executable may be prefixed by a label. The Monitor may be instructed to
95 load processes by label. So more than one kernel process may be included in
96 the image, each with a different winchester driver for instance. So if you
97 have compiled two different kernels with an AT or XT driver then
100 .BI "installboot \-i" " image AT:at_kernel XT:xt_kernel mm fs init"
103 will make an image with two different labeled kernels and one
104 unlabeled set of the other binaries.
110 Extract the binaries from
112 under the names stored in the image. (The name includes the optional label.)
116 .I device bootblock boot
117 .RI [[ label :] image
122 in the boot sector of
124 together with the disk addresses to
126 These disk addresses are needed to load
128 from the file system at boot time. The argument
130 is first searched in the file system on
132 If it is not found then it is read as a normal file and added at the end of
133 the file system. The file system should be smaller than the device it is on
134 to allow this. Any extra images are also added to the end as described
137 (Make sure you understand all this.)
139 The device need not be mounted when
141 is run, nor does it matter if it is.
144 needs to be run again if
146 is rewritten, because it will then occupy a new place on the disk.
148 Old boot parameters are kept if there are no images added.
152 .I device bootblock boot
156 This option fills a blank floppy in
158 with boot code and kernel images. This "boot disk" does not have a root
159 file system, only the Boot Monitor and MINIX 3 kernels. The boot parameters
160 sector is filled with code that enables menu options for selecting an
161 image. After loading an image, the Monitor will ask you to insert a root
162 file system diskette before starting MINIX 3.
164 The labels used on the images should match those on the executables used
165 inside the image. You can put a comma separated list of labels on an image
166 for each label used within the image. For the image created earlier one
167 would create a boot floppy like this:
171 .BI "installboot \-b /dev/fd0 bootblock boot" " AT,XT:image"
175 If a label-list is omitted on an image, then that image will be selected by
176 default. (Like in the normal one image, no labels case.)
182 together allow you to make a boot floppy with or without a root file system.
183 With the boot code in the file system, attached to the end of it, or after
184 the boot block. And with one or more kernel images in the file system or
185 at the end of the device. Somewhat confusing.
190 .RI [ keys " [" logical ]]
192 This option installs the
194 program into the boot sector of the given device. If another device is
197 then its bootstrap code is copied to
199 The master bootstrap on a hard disk boots the active partition on that disk
200 at boot time. The MS-DOS fdisk command normally puts a master bootstrap on
201 the hard disk. MINIX 3 has two bootstraps that can be used as a master
208 is a fairly normal master bootstrap that works as follows:
211 If installed on a hard disk then it will load the bootstrap of the active
212 partition and run it.
214 can be put in the first sector of a hard disk to boot the active partition,
215 or in the first sector of a MINIX 3 partition to boot the active subpartition.
217 If installed on a MINIX 3 floppy then it will try to boot the next floppy or
218 the first hard disk. Ideal for floppies with just data on it, they will no
219 longer obstruct the boot process if left in the drive. Also a very useful
220 trick to boot from floppy drive 1.
223 The other bootstrap named
225 is used for the weird cases:
228 If your default operating system is installed on another disk then
230 can be installed on the first disk and instructed to boot the disk,
231 partition or subpartition that must be booted by default.
233 If one of your operating systems insists on being active when booted then use
235 to ignore the active flag and boot your preferred O.S. instead. The Boot
236 Monitor's "\fBboot\ \(**\fP" trick to activate the partition to boot is
239 To boot a logical partition within an extended partition. Note that you can
242 in the first sector of the extended partition in this case, with the
243 extended partition marked active.
245 If you hold down the ALT key while
247 is being executed, then you can type the disk, partition or subpartition
248 you want to boot as one to three digits followed by typing ENTER.
252 can be programmed to boot a certain partition with the
254 argument and optionally also the
258 are one to three digits naming the disk, partition or subpartition. If the
265 These are the same three digits you can type manually if you hold down ALT
268 to boot a logical partition within an extended partition, let
270 be just a disk number, and specify
272 as the name of the logical partition on that disk that is to be booted.
275 can be any device name, but this form should be avoided because it offers
276 less checking to see if the device is still there after a disk
279 A backup copy of the current master bootstrap (including the partition
280 table) can be made with:
283 dd if=\fIdevice\fP of=\fIbackup-file\fP count=1
286 A simple 'cp \fIbackup-file\fP \fIdevice\fP' will put it back. You can
289 under MS-DOS 5.0 (or newer) to restore the master bootstrap.
294 .B /usr/mdec/bootblock
295 MINIX 3 bootstrap for the Minix root device. To be placed in the boot sector.
298 MINIX 3 Boot Monitor. Can usually be found in the root directory of a bootable
301 .B /usr/mdec/masterboot
302 Master bootstrap. Can be placed in the first sector of a disk to select the
303 active partition. In a MINIX 3 primary partition it selects the active
306 .B /usr/mdec/jumpboot
307 Special "boot this" bootstrap.
315 What you think is boot code or part of the kernel isn't.
319 will crash, text/data segment larger then 64K
321 One of the 16-bit programs added to an image has a text or data segment
322 that is larger than 64K. You probably enabled too many drivers, or
323 configured too many buffers.
330 You are trying to put the boot monitor or an image after a file system, but
331 there is no or not enough space. Did you specify the full path of the
332 monitor instead of just "boot"?
336 is not a MINIX 3 file system
340 on a device that doesn't contain a file system. Maybe you specified the
341 wrong device, maybe you should make a file system, or maybe you should use
346 contains a file system
348 You are about to destroy a file system with
350 Maybe you meant to use
352 You have 10 seconds to make up your mind...
358 Several types of messages like these will tell you that
360 can't be installed in a boot sector, or that there is no room to add some
365 .SS "Bootstrap errors"
368 A read error trying to get the next bit of boot code. You may even get the
369 BIOS error code in hex. Either the device has a bad block, or jumpboot is
370 told to read a nonexistent disk.
375 None of the partitions in a partition table is marked active.
380 Partition does not exist (jumpboot), or it's bootstrap isn't executable.
383 The MINIX 3 bootstraps can boot beyond the 8G disk size limit if the BIOS
384 supports the IBM/MS INT 13 Extensions. Alas only Minix-vmd can make use of
385 this, standard MINIX 3 has a 4G disk size limit.
387 It has four more options than the SunOS installboot program it is modeled
390 The bootblock code has been crunched to such ugliness that you can use it
391 to scare little kids out of your garden.
393 Kees J. Bot (kjb@cs.vu.nl)
395 .\" $PchId: installboot.8,v 1.7 2000/08/13 22:09:31 philip Exp $