1.\" $NetBSD: installboot.8,v 1.84 2012/02/11 07:27:25 ast Exp $ 2.\" 3.\" Copyright (c) 2002-2012 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 February 11, 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 462.Ql traditional 463file system prior to 464.Nx 6.0 ) . 465Use 466.Xr dumpfs 8 467to confirm the file system format is 468.Sy FFSv1 . 469. 470.It Pa /usr/mdec/bootxx_ffsv2 471Primary bootstrap for 472.Sy FFSv2 473file systems (the default file system for some platforms as of 474.Nx 6.0 ) . 475Use 476.Xr dumpfs 8 477to confirm the file system format is 478.Sy FFSv2 . 479. 480.It Pa /usr/mdec/bootxx_lfsv1 481Primary bootstrap for 482.Sy LFSv1 483file systems. 484. 485.It Pa /usr/mdec/bootxx_lfsv2 486Primary bootstrap for 487.Sy LFSv2 488file systems 489(the default LFS version). 490. 491.It Pa /usr/mdec/bootxx_msdos 492Primary bootstrap for 493.Tn MS-DOS 494.Sy FAT 495file systems. 496. 497.It Pa /usr/mdec/bootxx_ustarfs 498Primary bootstrap for 499.Sy TARFS 500boot images. 501This is used by various install media. 502. 503.It Pa /usr/mdec/boot. Ns Sy MACHINE 504Secondary bootstrap for machine type 505.Sy MACHINE . 506This should be installed into the file system before 507.Nm 508is run. 509. 510.It Pa /usr/mdec/boot 511Synonym for 512.Pa /usr/mdec/boot. Ns Sy MACHINE 513. 514.It Pa /boot. Ns Sy MACHINE 515Installed copy of secondary bootstrap for machine type 516.Sy MACHINE . 517. 518.It Pa /boot 519Installed copy of secondary bootstrap. 520Searched for by the primary bootstrap if 521.Pa /boot. Ns Sy MACHINE 522is not found. 523. 524.El 525. 526.Ss Nx Ns Tn /hp700 files 527. 528.Bl -tag -width /usr/mdec/bootxx_ustarfs 529. 530.It Pa /usr/mdec/xxboot 531.Nx Ns Tn /hp700 532primary bootstrap for 533.Sy FFSv1 , 534.Sy FFSv2 , 535.Sy LFSv1 , 536and 537.Sy LFSv2 . 538.It Pa /usr/mdec/cdboot 539.Nx Ns Tn /hp700 540primary bootstrap for ISO 9660 file system. 541.It Pa /usr/mdec/sdboot 542Synonym for 543.Pa /usr/mdec/xxboot 544. 545.El 546. 547.Ss Nx Ns Tn /macppc files 548. 549.Bl -tag -width /usr/mdec/bootxx_ustarfs 550. 551.It Pa /usr/mdec/bootxx 552.Nx Ns Tn /macppc 553primary bootstrap. 554. 555.It Pa /usr/mdec/ofwboot 556.Nx Ns Tn /macppc 557secondary bootstrap. 558. 559.It Pa /ofwboot 560Installed copy of 561.Nx Ns Tn /macppc 562secondary bootstrap. 563. 564.El 565. 566.Ss Nx Ns Tn /next68k files 567. 568.Bl -tag -width /usr/mdec/bootxx_ustarfs 569. 570.It Pa /usr/mdec/boot 571.Nx Ns Tn /next68k 572bootstrap. 573. 574.El 575. 576.Ss Nx Ns Tn /sparc64 files 577. 578.Bl -tag -width /usr/mdec/bootxx_ustarfs 579. 580.It Pa /usr/mdec/bootblk 581.Nx Ns Tn /sparc64 582primary bootstrap. 583. 584.It Pa /usr/mdec/ofwboot 585.Nx Ns Tn /sparc64 586secondary bootstrap. 587. 588.It Pa /ofwboot 589Installed copy of 590.Nx Ns Tn /sparc64 591secondary bootstrap. 592. 593.El 594. 595.Sh EXAMPLES 596. 597.Ss common 598Verbosely install the Berkeley Fast File System primary bootstrap on to disk 599.Sq sd0 : 600.Dl Ic installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs 601Note: the 602.Dq whole disk 603partition (c on some ports, d on others) is used here, since the a partition 604probably is already opened (mounted as 605.Pa / ) , 606so 607.Nm 608would not be able to access it. 609.Pp 610Remove the primary bootstrap from disk 611.Sq sd1 : 612.Dl Ic installboot -c /dev/rsd1c 613. 614.Ss Nx Ns Tn /amiga 615Modify the command line to change the default from "netbsd -ASn2" to 616"netbsd -S": 617.Dl Ic installboot -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs 618. 619.Ss Nx Ns Tn /ews4800mips 620Install the System V Boot File System primary bootstrap on to disk 621.Sq sd0 , 622with the secondary bootstrap 623.Sq Pa /boot 624already present in the SysVBFS partition on the disk: 625.Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs 626. 627.Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 628Install new boot blocks on an existing 629.Sy FFSv2 630mounted root file system on 631.Sq wd0 , 632setting the timeout to five seconds, after copying a new secondary 633bootstrap: 634.Dl Ic cp /usr/mdec/boot /boot 635.Dl Ic installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv2 636.Bd -ragged -offset indent-two -compact 637.Em Note : 638Pre 639.Nx 6.0 640systems used 641.Sy FFSv1 642file systems on these platforms; double check with 643.Xr dumpfs 8 644to be sure to use the correct secondary bootstrap. 645.Ed 646.Pp 647Create a bootable CD-ROM with an ISO 9660 648file system for an i386 system with a serial console: 649.Dl Ic mkdir cdrom 650.Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd 651.Dl Ic cp /usr/mdec/boot cdrom/boot 652.Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx 653.Dl Ic installboot -o console=com0,speed=19200 -m i386 -e bootxx 654.Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \ 655 cdrom 656. 657.Pp 658Create a bootable floppy disk with an FFSv1 659file system for a small custom kernel (note: bigger kernels needing 660multiple disks are handled with the ustarfs file system): 661.Dl Ic newfs -s 1440k /dev/rfd0a 662.Bd -ragged -offset indent-two -compact 663.Em Note : 664Ignore the warnings that 665.Xr newfs 8 666displays; it can not write a disklabel, 667which is not a problem for a floppy disk. 668.Ed 669.Dl Ic mount /dev/fd0a /mnt 670.Dl Ic cp /usr/mdec/boot /mnt/boot 671.Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz 672.Dl Ic umount /mnt 673.Dl Ic installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1 674. 675.Pp 676Create a bootable FAT file system on 677.Sq wd1a , 678which should have the same offset and size as a FAT primary partition 679in the Master Boot Record (MBR): 680.Dl Ic newfs_msdos -r 16 /dev/rwd1a 681.Bd -ragged -offset indent-two -compact 682.Em Notes : 683The 684.Fl r Ar 16 685is to reserve space for the primary bootstrap. 686.Xr newfs_msdos 8 687will display an 688.Dq MBR type 689such as 690.Ql 1 , 691.Ql 4 , 692or 693.Ql 6 ; 694the MBR partition type of the appropriate primary partition should be 695changed to this value. 696.Ed 697.Dl Ic mount -t msdos /dev/wd1a /mnt 698.Dl Ic cp /usr/mdec/boot /mnt/boot 699.Dl Ic cp path/to/kernel /mnt/netbsd 700.Dl Ic umount /mnt 701.Dl Ic installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos 702.Pp 703Make the existing FAT16 filesystem on 704.Sq sd0e 705bootable. 706This can be used to make USB memory bootable provided it has 512 byte 707sectors and that the manufacturer correctly initialised the file system. 708.Dl Ic mount -t msdos /dev/sd0e /mnt 709.Dl Ic cp /usr/mdec/boot /mnt/boot 710.Dl Ic cp path/to/kernel /mnt/netbsd 711.Dl Ic umount /mnt 712.Dl Ic installboot /dev/rsd0e /usr/mdec/bootxx_fat16 713It may also be necessary to use 714.Nm fdisk 715to make the device itself bootable. 716. 717.Pp 718Switch the existing installed bootstrap to use a serial console without 719reinstalling or altering other options such as timeout. 720.Dl Ic installboot -e -o console=com0 /dev/rwd0a 721.Ss Nx Ns Tn /macppc 722Note the 723.Nm 724utility is only required for macppc machines with OpenFirmware version 2 725to boot. 726OpenFirmware 3 cannot load bootblocks specified in the Apple partition 727map. 728.Pp 729Install the Berkeley Fast File System primary bootstrap on to disk 730.Sq wd0 : 731.Dl Ic installboot /dev/rwd0c /usr/mdec/bootxx /ofwboot 732.Pp 733The secondary 734.Nx Ns Tn /macppc 735bootstrap is located in 736.Pa /usr/mdec/ofwboot . 737.Pp 738The primary bootstrap requires the raw 739.Pa ofwboot 740for the secondary bootstrap, not 741.Pa ofwboot.xcf , 742which is used for the OpenFirmware to load kernels. 743.Ss Nx Ns Tn /next68k 744Install the bootstrap on to disk 745.Sq sd0 : 746.Dl Ic installboot /dev/rsd0c /usr/mdec/boot 747.Pp 748. 749.Ss Nx Ns Tn /pmax 750Install the Berkeley Fast File System primary bootstrap on to disk 751.Sq sd0 : 752.Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_ffs 753.Pp 754.Nx Ns Tn /pmax 755requires that this file system starts at block 0 of the disk. 756.Pp 757Install the ISO 9660 primary bootstrap in the file 758.Pa /tmp/cd-image : 759.Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 760.Pp 761Make an ISO 9660 filesystem in the file 762.Pa /tmp/cd-image 763and install the ISO 9660 primary bootstrap in the filesystem, where the 764source directory for the ISO 9660 filesystem contains a kernel, the 765primary bootstrap 766.Pa bootxx_cd9660 767and the secondary bootstrap 768.Pa boot.pmax : 769.Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir 770.Dl ... 771.Dl 48 51 iso-source-dir/bootxx_cd9660 772.Dl ... 773.Dl Ic installboot -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 774. 775.Ss Nx Ns Tn /sparc 776Install the Berkeley Fast File System primary bootstrap on to disk 777.Sq sd0 , 778with the secondary bootstrap 779.Sq Pa /boot 780already present: 781.Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot 782. 783.Ss Nx Ns Tn /sparc64 784Install the primary bootstrap on to disk 785.Sq sd0 : 786.Dl Ic installboot /dev/rsd0c /usr/mdec/bootblk 787.Pp 788The secondary 789.Nx Ns Tn /sparc64 790bootstrap is located in 791.Pa /usr/mdec/ofwboot . 792. 793.Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 794Install the Berkeley Fast File System primary bootstrap on to disk 795.Sq sd0 , 796with the secondary bootstrap 797.Sq Pa /boot 798already present: 799.Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot 800. 801.Sh SEE ALSO 802.Xr uname 3 , 803.Xr boot 8 , 804.Xr disklabel 8 , 805.Xr dumpfs 8 , 806.Xr fdisk 8 , 807.Xr pxeboot 8 808. 809.Sh HISTORY 810This implementation of 811.Nm 812appeared in 813.Nx 1.6 . 814. 815.Sh AUTHORS 816The machine independent portion of this implementation of 817.Nm 818was written by Luke Mewburn. 819The following people contributed to the various machine dependent 820back-ends: 821Simon Burge (pmax), 822Chris Demetriou (alpha), 823Matthew Fredette (sun2, sun3), 824Matthew Green (sparc64), 825Ross Harvey (alpha), 826Michael Hitch (amiga), 827Paul Kranenburg (sparc), 828David Laight (i386), 829Christian Limpach (next68k), 830Luke Mewburn (macppc), 831Matt Thomas (vax), 832Izumi Tsutsui (news68k, newsmips), 833and 834UCHIYAMA Yasushi (ews4800mips). 835. 836.Sh BUGS 837There are not currently primary bootstraps to support all file systems 838types which are capable of being the root file system. 839.Pp 840If a disk has been converted from 841.Sy FFS 842to 843.Sy RAID 844without the contents of the disk erased, then the original 845.Sy FFS 846installation may be auto-detected instead of the 847.Sy RAID 848installation. 849In this case, the 850.Fl t Ar raid 851option must be provided. 852. 853.Ss Nx Ns Tn /alpha 854The 855.Nx Ns Tn /alpha 856primary bootstrap program can only load the secondary bootstrap program 857from file systems starting at the beginning (block 0) of disks. 858Similarly, the secondary bootstrap program can only load kernels from 859file systems starting 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. 865.Ss Nx Ns Tn /hp300 866The disk must have a boot partition large enough to hold the bootstrap code. 867Currently the primary bootstrap must be a LIF format file. 868. 869.Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 870The bootstrap must be installed in the 871.Nx 872partition that starts at the beginning of the mbr partition. 873If that is a valid filesystem and contains the 874.Pa /boot 875program then it will be used as the root filesystem, otherwise the 876.Sq a 877partition will be booted. 878.Pp 879The size of primary bootstrap programs is restricted to 8KB, even 880though some file systems (e.g., ISO 9660) are able to accommodate larger 881ones. 882. 883.Ss Nx Ns Tn /macppc 884Due to restrictions in 885.Nm 886and the secondary bootstrap implementation, file systems where kernels exist 887must start at the beginning of disks. 888.Pp 889Currently, 890.Nm 891doesn't recognize an existing Apple partition map on the disk 892and always writes a faked map to make disks bootable. 893.Pp 894The 895.Nx Ns Tn /macppc 896bootstrap program can't load kernels from 897.Sy FFSv2 898partitions. 899.Ss Nx Ns Tn /next68k 900The size of bootstrap programs is restricted to the free space before 901the file system at the beginning of the disk minus 8KB. 902. 903.Ss Nx Ns Tn /pmax 904The 905.Nx Ns Tn /pmax 906secondary bootstrap program can only load kernels from file 907systems starting at the beginning of disks. 908.Pp 909The size of primary bootstrap programs is restricted to 7.5KB, even 910though some file systems (e.g., ISO 9660) are able to accommodate larger 911ones. 912. 913.Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 914The 915.Nx Ns Tn /sun2 916and 917.Nx Ns Tn /sun3 918secondary bootstrap program can only load kernels from file 919systems starting at the beginning of disks. 920. 921.Ss Nx Ns Tn /vax 922The 923.Nx Ns Tn /vax 924secondary bootstrap program can only load kernels from file systems 925starting at the beginning of disks. 926.Pp 927The size of primary bootstrap programs is restricted to 7.5KB, even 928though some file systems (e.g., ISO 9660) are able to accommodate larger 929ones. 930