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