1.\"	$NetBSD: installboot_nbsd.8,v 1.79 2011/11/03 20:09:18 martin Exp $
2.\"
3.\" Copyright (c) 2002-2009 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Luke Mewburn of Wasabi Systems.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd August 3, 2011
31.Dt INSTALLBOOT 8
32.Os
33.Sh NAME
34.Nm installboot_nbsd
35.Nd install disk bootstrap software
36.
37.Sh SYNOPSIS
38.Nm
39.Op Fl fnv
40.Op Fl B Ar s2bno
41.Op Fl b Ar s1bno
42.Op Fl o Ar options
43.Op Fl t Ar fstype
44.Ar filesystem
45.Ar primary
46.Op Ar secondary
47.Nm
48.Fl c
49.Op Fl fnv
50.Op Fl o Ar options
51.Op Fl t Ar fstype
52.Ar filesystem
53.Nm
54.Fl e
55.Op Fl fnv
56.Op Fl o Ar options
57.Ar bootstrap
58.Nm
59.Fl m(aster)
60.Ar device
61.Ar masterboot
62.
63.Sh DESCRIPTION
64The
65.Nm
66utility installs and removes
67.Nx
68disk bootstrap software into a file system.
69.Nm
70can install
71.Ar primary
72into
73.Ar filesystem ,
74or disable an existing bootstrap in
75.Ar filesystem .
76.Pp
77On some architectures the options of an existing installed bootstrap,
78or those of a bootstrap file can be changed.
79Installing a new primary bootstrap will reset those options to default
80values.
81.Pp
82Generally,
83.Nx
84disk bootstrap software consists of two parts: a
85.Dq primary
86bootstrap program usually written into the disklabel area of the
87file system by
88.Nm ,
89and a
90.Dq secondary
91bootstrap program that usually resides as an ordinary file in the file system.
92.Pp
93When booting, the primary bootstrap program is loaded and invoked by
94the machine's PROM or BIOS.
95After receiving control of the system it loads and runs the secondary
96bootstrap program, which in turn loads and runs the kernel.
97The secondary bootstrap may allow control over various boot parameters
98passed to the kernel.
99.Pp
100Perform the following steps to make a file system bootable:
101.Bl -enum
102.It
103Copy the secondary bootstrap (usually
104.Pa /usr/mdec/boot. Ns Sy MACHINE
105or
106.Pa /usr/mdec/boot )
107to the root directory of the target file system.
108.Pp
109.
110.It
111Use
112.Nm
113to install the primary bootstrap program
114(usually
115.Pa /usr/mdec/bootxx_ Ns Sy FSTYPE )
116into
117.Ar filesystem .
118.Pp
119The following platforms do not require this step if the primary bootstrap
120already exists and the secondary bootstrap file is just being updated:
121.Sy alpha ,
122.Sy amd64 ,
123.Sy amiga ,
124.Sy i386 ,
125.Sy pmax ,
126.Sy sparc64 ,
127and
128.Sy vax .
129.Pp
130The following platform does not require the first step since a
131single bootstrap file is used.
132The single bootstrap is installed like the primary bootstrap on
133other platforms:
134.Sy next68k .
135.Pp
136.El
137.Pp
138The options and arguments recognized by
139.Nm
140are as follows:
141.
142.Bl -tag -width "optionsxxx"
143.
144.It Fl B Ar s2bno
145When hard-coding the blocks of
146.Ar secondary
147into
148.Ar primary ,
149start from block
150.Ar s2bno
151instead of trying to determine the block numbers occupied by
152.Ar secondary
153by examining
154.Ar filesystem .
155If this option is supplied,
156.Ar secondary
157should refer to an actual secondary bootstrap (rather than the
158file name of the one present in
159.Ar filesystem )
160so that its size can be determined.
161.
162.It Fl b Ar s1bno
163Install
164.Ar primary
165at block number
166.Ar s1bno
167instead of the default location for the machine and file system type.
168.Sy [ alpha ,
169.Sy pmax ,
170.Sy vax ]
171.
172.It Fl c
173Clear (remove) any existing bootstrap instead of installing one.
174.
175.It Fl e
176Edit the options of an existing bootstrap.
177This can be use to change the options in bootxx_xxxfs files,
178raw disk partitions, and the
179.Pa pxeboot_ia32.bin
180file.
181With
182.Fl v
183and without
184.Fl o ,
185show the current options.
186.Sy [ amd64 , i386 ]
187.
188.It Fl f
189Forces
190.Nm
191to ignore some errors.
192.
193.It Fl n
194Do not write to
195.Ar filesystem .
196.
197.It Fl o Ar options
198Machine specific
199.Nm
200options, comma separated.
201.Pp
202Supported options are (with the machines for they are valid in brackets):
203.
204.Bl -tag -offset indent -width alphasum
205.
206.It Sy alphasum
207.Sy [ alpha ]
208Recalculate and restore the Alpha checksum.
209This is the default for
210.Nx Ns Tn /alpha .
211.
212.It Sy append
213.Sy [ alpha ,
214.Sy pmax ,
215.Sy vax ]
216Append
217.Ar primary
218to the end of
219.Ar filesystem ,
220which must be a regular file in this case.
221.
222.It Sy bootconf
223.Sy [ amd64 ,
224.Sy i386 ]
225(Don't) read a
226.Dq boot.cfg
227file.
228.
229.It Sy command=\*[Lt]boot command\*[Gt]
230.Sy [ amiga ]
231Modify the default boot command line.
232.
233.It Sy console=\*[Lt]console name\*[Gt]
234.Sy [ amd64 ,
235.Sy i386 ]
236Set the console device, \*[Lt]console name\*[Gt] must be one of:
237pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd.
238.
239.It Sy ioaddr=\*[Lt]ioaddr\*[Gt]
240.Sy [ amd64 ,
241.Sy i386 ]
242Set the IO address to be used for the console serial port.
243Defaults to the IO address used by the system BIOS for the specified port.
244.
245.It Sy keymap=\*[Lt]keymap\*[Gt]
246.Sy [ amd64 ,
247.Sy i386 ]
248Set a boot time keyboard translation map.
249Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it.
250For example, an argument of
251.Dq zyz
252would swap the lowercase letters
253.Sq y
254and
255.Sq z .
256.
257.It Sy modules
258.Sy [ amd64 ,
259.Sy i386 ]
260(Don't) load kernel modules.
261.
262.It Sy password=\*[Lt]password\*[Gt]
263.Sy [ amd64 ,
264.Sy i386 ]
265Set the password which must be entered before the boot menu can be accessed.
266.
267.It Sy resetvideo
268.Sy [ amd64 ,
269.Sy i386 ]
270Reset the video before booting.
271.
272.It Sy speed=\*[Lt]baud rate\*[Gt]
273.Sy [ amd64 ,
274.Sy i386 ]
275Set the baud rate for the serial console.
276If a value of zero is specified, then the current baud rate (set by the
277BIOS) will be used.
278.
279.It Sy sunsum
280.Sy [ alpha ,
281.Sy pmax ,
282.Sy vax ]
283Recalculate and restore the Sun and
284.Nx Ns Tn /sparc
285compatible checksum.
286.Em Note :
287The existing
288.Nx Ns Tn /sparc
289disklabel should use no more than 4 partitions.
290.
291.It Sy timeout=\*[Lt]seconds\*[Gt]
292.Sy [ amd64 ,
293.Sy i386 ]
294Set the timeout before the automatic boot begins to the given number of seconds.
295.El
296.
297.It Fl t Ar fstype
298Use
299.Ar fstype
300as the type of
301.Ar filesystem .
302The default operation is to attempt to auto-detect this setting.
303The following file system types are currently supported by
304.Nm :
305.
306.Bl -tag -offset indent -width raid
307.
308.It Sy ffs
309.Bx
310Fast File System.
311.
312.It Sy raid
313Mirrored RAIDframe File System.
314.
315.It Sy raw
316.Sq Raw
317image.
318Note: if a platform needs to hard-code the block offset of the secondary
319bootstrap, it cannot be searched for on this file system type, and must
320be provided with
321.Fl B Ar s2bno .
322.El
323.
324.It Fl v
325Verbose operation.
326.
327.It Ar filesystem
328The path name of the device or file system image that
329.Nm
330is to operate on.
331It is not necessary for
332.Ar filesystem
333to be a currently mounted file system.
334.
335.It Ar primary
336The path name of the
337.Dq primary
338boot block to install.
339The path name must refer to a file in a file system that is currently
340mounted.
341.
342.It Ar secondary
343The path name of the
344.Dq secondary
345boot block, relative to the root of
346the file system in the device or image specified by the
347.Ar filesystem
348argument.
349Note that this may refer to a file in a file system that is not mounted.
350Most systems require
351.Ar secondary
352to be in the
353.Dq root
354directory of the file system, so the leading
355.Dq Pa /
356is not necessary on
357.Ar secondary .
358.Pp
359Only certain combinations of
360platform
361.Pq Fl m Ar machine
362and file system type
363.Pq Fl t Ar fstype
364require that the name of the secondary bootstrap is
365supplied as
366.Ar secondary ,
367so that information such as the disk block numbers occupied
368by the secondary bootstrap can be stored in the primary bootstrap.
369These are:
370.Bl -column "Platform" "File systems" -offset indent
371.It Sy "Platform" Ta Sy "File systems"
372.It macppc Ta ffs, raw
373.It news68k Ta ffs, raw
374.It newsmips Ta ffs, raw
375.It sparc Ta ffs, raid, raw
376.It sun2 Ta ffs, raw
377.It sun3 Ta ffs, raw
378.El
379.El
380.Pp
381.Nm
382exits 0 on success, and \*[Gt]0 if an error occurs.
383.
384.Sh ENVIRONMENT
385.Nm
386uses the following environment variables:
387.
388.Bl -tag -width "MACHINE"
389.
390.It Ev MACHINE
391Default value for
392.Ar machine ,
393overriding the result from
394.Xr uname 3 .
395.
396.El
397.
398.Sh FILES
399Most
400.Nx
401ports will contain variations of the following files:
402.Pp
403.Bl -tag -width /usr/mdec/bootxx_ustarfs
404.
405.It Pa /usr/mdec/bootxx_ Ns Sy FSTYPE
406Primary bootstrap for file system type
407.Sy FSTYPE .
408Installed into the bootstrap area of the file system by
409.Nm .
410.
411.It Pa /usr/mdec/bootxx_fat16
412Primary bootstrap for
413.Tn MS-DOS
414.Sy FAT16
415file systems.
416This differs from
417.Nm bootxx_msdos
418in that it doesn't require the filesystem to have been initialised with
419any
420.Ql reserved sectors .
421It also uses the information in the
422.Ql Boot Parameter Block
423to get the media and filesytem properties.
424.
425.It Pa /usr/mdec/bootxx_ffsv1
426Primary bootstrap for
427.Sy FFSv1
428file systems
429(the "traditional"
430.Nx
431file system).
432Use
433.Xr dumpfs 8
434to confirm the file system format is
435.Sy FFSv1 .
436.
437.It Pa /usr/mdec/bootxx_ffsv2
438Primary bootstrap for
439.Sy FFSv2
440file systems.
441Use
442.Xr dumpfs 8
443to confirm the file system format is
444.Sy FFSv2 .
445.
446.It Pa /usr/mdec/bootxx_lfsv1
447Primary bootstrap for
448.Sy LFSv1
449file systems.
450.
451.It Pa /usr/mdec/bootxx_lfsv2
452Primary bootstrap for
453.Sy LFSv2
454file systems
455(the default LFS version).
456.
457.It Pa /usr/mdec/bootxx_msdos
458Primary bootstrap for
459.Tn MS-DOS
460.Sy FAT
461file systems.
462.
463.It Pa /usr/mdec/bootxx_ustarfs
464Primary bootstrap for
465.Sy TARFS
466boot images.
467This is used by various install media.
468.
469.It Pa /usr/mdec/boot. Ns Sy MACHINE
470Secondary bootstrap for machine type
471.Sy MACHINE .
472This should be installed into the file system before
473.Nm
474is run.
475.
476.It Pa /usr/mdec/boot
477Synonym for
478.Pa /usr/mdec/boot. Ns Sy MACHINE
479.
480.It Pa /boot. Ns Sy MACHINE
481Installed copy of secondary bootstrap for machine type
482.Sy MACHINE .
483.
484.It Pa /boot
485Installed copy of secondary bootstrap.
486Searched for by the primary bootstrap if
487.Pa /boot. Ns Sy MACHINE
488is not found.
489.
490.El
491.
492.Ss Nx Ns Tn /macppc files
493.
494.Bl -tag -width /usr/mdec/bootxx_ustarfs
495.
496.It Pa /usr/mdec/bootxx
497.Nx Ns Tn /macppc
498primary bootstrap.
499.
500.It Pa /usr/mdec/ofwboot
501.Nx Ns Tn /macppc
502secondary bootstrap.
503.
504.It Pa /ofwboot
505Installed copy of
506.Nx Ns Tn /macppc
507secondary bootstrap.
508.
509.El
510.
511.Ss Nx Ns Tn /next68k files
512.
513.Bl -tag -width /usr/mdec/bootxx_ustarfs
514.
515.It Pa /usr/mdec/boot
516.Nx Ns Tn /next68k
517bootstrap.
518.
519.El
520.
521.Ss Nx Ns Tn /sparc64 files
522.
523.Bl -tag -width /usr/mdec/bootxx_ustarfs
524.
525.It Pa /usr/mdec/bootblk
526.Nx Ns Tn /sparc64
527primary bootstrap.
528.
529.It Pa /usr/mdec/ofwboot
530.Nx Ns Tn /sparc64
531secondary bootstrap.
532.
533.It Pa /ofwboot
534Installed copy of
535.Nx Ns Tn /sparc64
536secondary bootstrap.
537.
538.El
539.
540.Sh EXAMPLES
541.
542.Ss common
543Verbosely install the Berkeley Fast File System primary bootstrap on to disk
544.Sq sd0 :
545.Dl Ic installboot_nbsd -v /dev/rsd0c /usr/mdec/bootxx_ffs
546Note: the
547.Dq whole disk
548partition (c on some ports, d on others) is used here, since the a partition
549probably is already opened (mounted as
550.Pa / ) ,
551so
552.Nm
553would not be able to access it.
554.Pp
555Remove the primary bootstrap from disk
556.Sq sd1 :
557.Dl Ic installboot_nbsd -c /dev/rsd1c
558.
559.Ss Nx Ns Tn /amiga
560Modify the command line to change the default from "netbsd -ASn2" to
561"netbsd -S":
562.Dl Ic installboot_nbsd -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs
563.
564.Ss Nx Ns Tn /ews4800mips
565Install the System V Boot File System primary bootstrap on to disk
566.Sq sd0 ,
567with the secondary bootstrap
568.Sq Pa /boot
569already present in the SysVBFS partition on the disk:
570.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/bootxx_bfs
571.
572.Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64
573Install new boot blocks on an existing mounted root file system on
574.Sq wd0 ,
575setting the timeout to five seconds, after copying a new secondary
576bootstrap:
577.Dl Ic cp /usr/mdec/boot /boot
578.Dl Ic installboot_nbsd -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1
579.
580.Pp
581Create a bootable CD-ROM with an ISO9660
582file system for an i386 system with a serial console:
583.Dl Ic mkdir cdrom
584.Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd
585.Dl Ic cp /usr/mdec/boot cdrom/boot
586.Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx
587.Dl Ic installboot_nbsd -o console=com0,speed=19200 -m i386 -e bootxx
588.Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \
589	cdrom
590.
591.Pp
592Create a bootable floppy disk with an FFSv1
593file system for a small custom kernel (note: bigger kernels needing
594multiple disks are handled with the ustarfs file system):
595.Dl Ic newfs -s 1440k /dev/rfd0a
596.Bd -ragged -offset indent-two -compact
597.Em Note :
598Ignore the warnings that
599.Xr newfs 8
600displays; it can not write a disklabel,
601which is not a problem for a floppy disk.
602.Ed
603.Dl Ic mount /dev/fd0a /mnt
604.Dl Ic cp /usr/mdec/boot /mnt/boot
605.Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz
606.Dl Ic umount /mnt
607.Dl Ic installboot_nbsd -v /dev/rfd0a /usr/mdec/bootxx_ffsv1
608.
609.Pp
610Create a bootable FAT file system on
611.Sq wd1a ,
612which should have the same offset and size as a FAT primary partition
613in the Master Boot Record (MBR):
614.Dl Ic newfs_msdos -r 16 /dev/rwd1a
615.Bd -ragged -offset indent-two -compact
616.Em Notes :
617The
618.Fl r Ar 16
619is to reserve space for the primary bootstrap.
620.Xr newfs_msdos 8
621will display an
622.Dq MBR type
623such as
624.Ql 1 ,
625.Ql 4 ,
626or
627.Ql 6 ;
628the MBR partition type of the appropriate primary partition should be
629changed to this value.
630.Ed
631.Dl Ic mount -t msdos /dev/wd1a /mnt
632.Dl Ic cp /usr/mdec/boot /mnt/boot
633.Dl Ic cp path/to/kernel /mnt/netbsd
634.Dl Ic umount /mnt
635.Dl Ic installboot_nbsd -t raw /dev/rwd1a /usr/mdec/bootxx_msdos
636.Pp
637Make the existing FAT16 filesystem on
638.Sq sd0e
639bootable.
640This can be used to make USB memory bootable provided it has 512 byte
641sectors and that the manufacturer correctly initialised the file system.
642.Dl Ic mount -t msdos /dev/sd0e /mnt
643.Dl Ic cp /usr/mdec/boot /mnt/boot
644.Dl Ic cp path/to/kernel /mnt/netbsd
645.Dl Ic umount /mnt
646.Dl Ic installboot_nbsd /dev/rsd0e /usr/mdec/bootxx_fat16
647It may also be necessary to use
648.Nm fdisk
649to make the device itself bootable.
650.
651.Pp
652Switch the existing installed bootstrap to use a serial console without
653reinstalling or altering other options such as timeout.
654.Dl Ic installboot_nbsd -e -o console=com0 /dev/rwd0a
655.Ss Nx Ns Tn /macppc
656Note the
657.Nm
658utility is only required for macppc machines with OpenFirmware version 2
659to boot.
660OpenFirmware 3 cannot load bootblocks specified in the Apple partition
661map.
662.Pp
663Install the Berkeley Fast File System primary bootstrap on to disk
664.Sq wd0 :
665.Dl Ic installboot_nbsd /dev/rwd0c /usr/mdec/bootxx /ofwboot
666.Pp
667The secondary
668.Nx Ns Tn /macppc
669bootstrap is located in
670.Pa /usr/mdec/ofwboot .
671.Pp
672The primary bootstrap requires the raw
673.Pa ofwboot
674for the secondary bootstrap, not
675.Pa ofwboot.xcf ,
676which is used for the OpenFirmware to load kernels.
677.Ss Nx Ns Tn /next68k
678Install the bootstrap on to disk
679.Sq sd0 :
680.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/boot
681.Pp
682.
683.Ss Nx Ns Tn /pmax
684Install the Berkeley Fast File System primary bootstrap on to disk
685.Sq sd0 :
686.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/bootxx_ffs
687.Pp
688.Nx Ns Tn /pmax
689requires that this file system starts at block 0 of the disk.
690.Pp
691Install the ISO 9660 primary bootstrap in the file
692.Pa /tmp/cd-image :
693.Dl Ic installboot_nbsd -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660
694.Pp
695Make an ISO 9660 filesystem in the file
696.Pa /tmp/cd-image
697and install the ISO 9660 primary bootstrap in the filesystem, where the
698source directory for the ISO 9660 filesystem contains a kernel, the
699primary bootstrap
700.Pa bootxx_cd9660
701and the secondary bootstrap
702.Pa boot.pmax :
703.Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir
704.Dl ...
705.Dl 48 51 iso-source-dir/bootxx_cd9660
706.Dl ...
707.Dl Ic installboot_nbsd -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660
708.
709.Ss Nx Ns Tn /sparc
710Install the Berkeley Fast File System primary bootstrap on to disk
711.Sq sd0 ,
712with the secondary bootstrap
713.Sq Pa /boot
714already present:
715.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/bootxx /boot
716.
717.Ss Nx Ns Tn /sparc64
718Install the primary bootstrap on to disk
719.Sq sd0 :
720.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/bootblk
721.Pp
722The secondary
723.Nx Ns Tn /sparc64
724bootstrap is located in
725.Pa /usr/mdec/ofwboot .
726.
727.Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3
728Install the Berkeley Fast File System primary bootstrap on to disk
729.Sq sd0 ,
730with the secondary bootstrap
731.Sq Pa /boot
732already present:
733.Dl Ic installboot_nbsd /dev/rsd0c /usr/mdec/bootxx /boot
734.
735.Sh SEE ALSO
736.Xr uname 3 ,
737.Xr boot 8 ,
738.Xr disklabel 8 ,
739.Xr dumpfs 8 ,
740.Xr fdisk 8 ,
741.Xr pxeboot 8
742.
743.Sh HISTORY
744This implementation of
745.Nm
746appeared in
747.Nx 1.6 .
748.
749.Sh AUTHORS
750The machine independent portion of this implementation of
751.Nm
752was written by Luke Mewburn.
753The following people contributed to the various machine dependent
754back-ends:
755Simon Burge (pmax),
756Chris Demetriou (alpha),
757Matthew Fredette (sun2, sun3),
758Matthew Green (sparc64),
759Ross Harvey (alpha),
760Michael Hitch (amiga),
761Paul Kranenburg (sparc),
762David Laight (i386),
763Christian Limpach (next68k),
764Luke Mewburn (macppc),
765Matt Thomas (vax),
766Izumi Tsutsui (news68k, newsmips),
767and
768UCHIYAMA Yasushi (ews4800mips).
769.
770.Sh BUGS
771There are not currently primary bootstraps to support all file systems
772types which are capable of being the root file system.
773.Pp
774If a disk has been converted from
775.Sy FFS
776to
777.Sy RAID
778without the contents of the disk erased, then the original
779.Sy FFS
780installation may be auto-detected instead of the
781.Sy RAID
782installation.
783In this case, the
784.Fl t Ar raid
785option must be provided.
786.
787.Ss Nx Ns Tn /alpha
788The
789.Nx Ns Tn /alpha
790primary bootstrap program can only load the secondary bootstrap program
791from file systems starting at the beginning (block 0) of disks.
792Similarly, the secondary bootstrap program can only load kernels from
793file systems starting at the beginning of disks.
794.Pp
795The size of primary bootstrap programs is restricted to 7.5KB, even
796though some file systems (e.g., ISO 9660) are able to accommodate larger
797ones.
798.
799.Ss Nx Ns Tn /hp300
800The disk must have a boot partition large enough to hold the bootstrap code.
801Currently the primary bootstrap must be a LIF format file.
802.
803.Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64
804The bootstrap must be installed in the
805.Nx
806partition that starts at the beginning of the mbr partition.
807If that is a valid filesystem and contains the
808.Pa /boot
809program then it will be used as the root filesystem, otherwise the
810.Sq a
811partition will be booted.
812.Pp
813The size of primary bootstrap programs is restricted to 8KB, even
814though some file systems (e.g., ISO 9660) are able to accommodate larger
815ones.
816.
817.Ss Nx Ns Tn /macppc
818Due to restrictions in
819.Nm
820and the secondary bootstrap implementation, file systems where kernels exist
821must start at the beginning of disks.
822.Pp
823Currently,
824.Nm
825doesn't recognize an existing Apple partition map on the disk
826and always writes a faked map to make disks bootable.
827.Pp
828The
829.Nx Ns Tn /macppc
830bootstrap program can't load kernels from
831.Sy FFSv2
832partitions.
833.Ss Nx Ns Tn /next68k
834The size of bootstrap programs is restricted to the free space before
835the file system at the beginning of the disk minus 8KB.
836.
837.Ss Nx Ns Tn /pmax
838The
839.Nx Ns Tn /pmax
840secondary bootstrap program can only load kernels from file
841systems starting at the beginning of disks.
842.Pp
843The size of primary bootstrap programs is restricted to 7.5KB, even
844though some file systems (e.g., ISO 9660) are able to accommodate larger
845ones.
846.
847.Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3
848The
849.Nx Ns Tn /sun2
850and
851.Nx Ns Tn /sun3
852secondary bootstrap program can only load kernels from file
853systems starting at the beginning of disks.
854.
855.Ss Nx Ns Tn /vax
856The
857.Nx Ns Tn /vax
858secondary bootstrap program can only load kernels from file systems
859starting at the beginning of disks.
860.Pp
861The size of primary bootstrap programs is restricted to 7.5KB, even
862though some file systems (e.g., ISO 9660) are able to accommodate larger
863ones.
864