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