1*4c1177a4SToomas Soome.\" 2*4c1177a4SToomas Soome.\" This file and its contents are supplied under the terms of the 3*4c1177a4SToomas Soome.\" Common Development and Distribution License ("CDDL"), version 1.0. 4*4c1177a4SToomas Soome.\" You may only use this file in accordance with the terms of version 5*4c1177a4SToomas Soome.\" 1.0 of the CDDL. 6*4c1177a4SToomas Soome.\" 7*4c1177a4SToomas Soome.\" A full copy of the text of the CDDL should have accompanied this 8*4c1177a4SToomas Soome.\" source. A copy of the CDDL is also available via the Internet at 9*4c1177a4SToomas Soome.\" http://www.illumos.org/license/CDDL. 10*4c1177a4SToomas Soome.\" 11*4c1177a4SToomas Soome.\" 12*4c1177a4SToomas Soome.\" Copyright 2016 Toomas Soome <tsoome@me.com> 13*4c1177a4SToomas Soome.\" 14*4c1177a4SToomas Soome.Dd February 10, 2016 15*4c1177a4SToomas Soome.Dt INSTALLBOOT 1M 16*4c1177a4SToomas Soome.Os 17*4c1177a4SToomas Soome.Sh NAME 18*4c1177a4SToomas Soome.Nm installboot 19*4c1177a4SToomas Soome.Nd install bootloader in a disk partition 20*4c1177a4SToomas Soome.Sh SYNOPSIS 21*4c1177a4SToomas Soome.Ss SPARC 22*4c1177a4SToomas Soome.Nm 23*4c1177a4SToomas Soome.Op Fl fn 24*4c1177a4SToomas Soome.Op Fl F Sy zfs Ns | Ns Sy ufs Ns | Ns Sy hsfs 25*4c1177a4SToomas Soome.Op Fl u Ar verstr 26*4c1177a4SToomas Soome.Ar bootblk raw-device 27*4c1177a4SToomas Soome.Nm 28*4c1177a4SToomas Soome.Op Fl enV 29*4c1177a4SToomas Soome.Fl F Sy zfs 30*4c1177a4SToomas Soome.Fl i 31*4c1177a4SToomas Soome.Ar raw-device 32*4c1177a4SToomas Soome.Nm 33*4c1177a4SToomas Soome.Op Fl n 34*4c1177a4SToomas Soome.Fl F Sy zfs 35*4c1177a4SToomas Soome.Fl M 36*4c1177a4SToomas Soome.Ar raw-device attach-raw-device 37*4c1177a4SToomas Soome.Ss x86 38*4c1177a4SToomas Soome.Nm 39*4c1177a4SToomas Soome.Op Fl fFmn 40*4c1177a4SToomas Soome.Op Fl u Ar verstr 41*4c1177a4SToomas Soome.Ar stage1 stage2 raw-device 42*4c1177a4SToomas Soome.Nm 43*4c1177a4SToomas Soome.Op Fl enV 44*4c1177a4SToomas Soome.Fl i 45*4c1177a4SToomas Soome.Ar raw-device 46*4c1177a4SToomas Soome.Nm 47*4c1177a4SToomas Soome.Op Fl n 48*4c1177a4SToomas Soome.Fl M 49*4c1177a4SToomas Soome.Ar raw-device attach-raw-device 50*4c1177a4SToomas Soome.Sh DESCRIPTION 51*4c1177a4SToomas SoomeThe 52*4c1177a4SToomas Soome.Xr boot 1M 53*4c1177a4SToomas Soomeboot program is loaded from disk and is responsible of loading kernel and its 54*4c1177a4SToomas Soomesupport files from specific file system. 55*4c1177a4SToomas Soome.Pp 56*4c1177a4SToomas SoomeThe SPARC systems have one boot loader program file to be installed on the boot 57*4c1177a4SToomas Soomearea of a disk slice. As the SPARC zfs boot loader is too large to fit into 58*4c1177a4SToomas Soomeboot area at the start of the disk slice, 59*4c1177a4SToomas Soome.Nm 60*4c1177a4SToomas Soomecommand will split the zfs boot loader between disk slice boot area, and zfs 61*4c1177a4SToomas Soomepool boot area. 62*4c1177a4SToomas Soome.Pp 63*4c1177a4SToomas SoomeThe x86 systems have boot loader implemented as three stages: 64*4c1177a4SToomas Soome.Bl -tag -width Ds 65*4c1177a4SToomas Soome.It Sy stage1 66*4c1177a4SToomas Soome.Pa /boot/pmbr 67*4c1177a4SToomas Soomeis used as master boot record 68*4c1177a4SToomas Soome.Pq MBR 69*4c1177a4SToomas Soomeand partition boot program. 70*4c1177a4SToomas Soome.It Sy stage2 71*4c1177a4SToomas Soome.Pa /boot/gptzfsboot 72*4c1177a4SToomas Soomeis responsible for loading files from file system. The 73*4c1177a4SToomas Soome.Sy stage2 74*4c1177a4SToomas Soomeon x86 systems is always installed to zfs pool boot area, and therefore only zfs 75*4c1177a4SToomas Soomeboot is supported. 76*4c1177a4SToomas Soome.Nm 77*4c1177a4SToomas Soomecommand will record the location of 78*4c1177a4SToomas Soome.Sy stage2 79*4c1177a4SToomas Soometo 80*4c1177a4SToomas Soome.Sy stage1 , 81*4c1177a4SToomas Soomewhich is always installed at least on partition 82*4c1177a4SToomas Soome.Pq MBR or GPT 83*4c1177a4SToomas Soomeboot area, making it possible to boot via chainload from other boot loaders. 84*4c1177a4SToomas Soome.Pp 85*4c1177a4SToomas SoomeWhen 86*4c1177a4SToomas Soome.Nm 87*4c1177a4SToomas Soomecommand is used with the 88*4c1177a4SToomas Soome.Fl m 89*4c1177a4SToomas Soomeoption, 90*4c1177a4SToomas Soome.Nm 91*4c1177a4SToomas Soomeinstalls the stage1 file on the master boot sector of the disk as well. 92*4c1177a4SToomas Soome.It Sy stage3 93*4c1177a4SToomas Soome.Pa /boot/zfsloader 94*4c1177a4SToomas Soomeis read from file system and executed by 95*4c1177a4SToomas Soome.Sy stage2 96*4c1177a4SToomas Soomeand will provide boot loader user environment and is responsible of loading 97*4c1177a4SToomas Soomeand starting the operating system kernel. 98*4c1177a4SToomas Soome.Pp 99*4c1177a4SToomas SoomeIn case of GPT partitioning scheme, if the file system to boot from is either 100*4c1177a4SToomas SoomeUFS or PCFS, there must be 101*4c1177a4SToomas Soome.Sy boot 102*4c1177a4SToomas Soomepartition defined to store stage2 boot program. This is needed because UFS and 103*4c1177a4SToomas SoomePCFS do not have sufficient space reserved to store boot programs. 104*4c1177a4SToomas Soome.Pp 105*4c1177a4SToomas SoomeThe boot partition must use following GPT UUID: 106*4c1177a4SToomas Soome.Bd -literal -offset indent 107*4c1177a4SToomas Soome6a82cb45-1dd2-11b2-99a6-080020736631 108*4c1177a4SToomas Soome.Ed 109*4c1177a4SToomas Soome.Pp 110*4c1177a4SToomas Soomewhich is provided by 111*4c1177a4SToomas Soome.Qq boot 112*4c1177a4SToomas Soometag in 113*4c1177a4SToomas Soome.Xr format 1M 114*4c1177a4SToomas Soomepartition menu. 115*4c1177a4SToomas Soome.El 116*4c1177a4SToomas Soome.Ss Options 117*4c1177a4SToomas SoomeThe 118*4c1177a4SToomas Soome.Nm 119*4c1177a4SToomas Soomecommand accepts the following options: 120*4c1177a4SToomas Soome.Bl -tag -width Ds 121*4c1177a4SToomas Soome.It Fl h 122*4c1177a4SToomas SoomePrints short usage message. 123*4c1177a4SToomas Soome.It Fl m 124*4c1177a4SToomas SoomeInstalls 125*4c1177a4SToomas Soome.Sy stage1 126*4c1177a4SToomas Soomeon the master boot sector interactively. You must use this option if OS is 127*4c1177a4SToomas Soomeinstalled on an extended FDISK or an EFI/GPT partition. 128*4c1177a4SToomas Soome.It Fl f 129*4c1177a4SToomas SoomeSuppresses interaction when overwriting the master boot sector on x86. 130*4c1177a4SToomas SoomeForce update on SPARC. 131*4c1177a4SToomas Soome.It Fl n 132*4c1177a4SToomas SoomeDry run session. Will not write to disk. 133*4c1177a4SToomas Soome.It Fl F 134*4c1177a4SToomas SoomeOn SPARC, specify file system type. On x86, inhibit version check and enforce 135*4c1177a4SToomas Soomeboot loader update. 136*4c1177a4SToomas Soome.It Fl u Ar verstr 137*4c1177a4SToomas SoomeSpecify custom version string. Can be used to add version on non-versioned 138*4c1177a4SToomas Soomeboot loader or change built in version string. 139*4c1177a4SToomas Soome.It Fl i 140*4c1177a4SToomas SoomePrint version string from installed boot loader. 141*4c1177a4SToomas Soome.It Fl e 142*4c1177a4SToomas SoomePrint version string from installed boot loader without description. 143*4c1177a4SToomas Soome.It Fl V 144*4c1177a4SToomas SoomePrint version string from installed boot loader with full description. 145*4c1177a4SToomas Soome.It Fl M 146*4c1177a4SToomas SoomeMirror boot loader from installed disk partition. 147*4c1177a4SToomas Soome.El 148*4c1177a4SToomas Soome.Ss Operands 149*4c1177a4SToomas SoomeThe 150*4c1177a4SToomas Soome.Nm 151*4c1177a4SToomas Soomecommand accepts the following operands: 152*4c1177a4SToomas Soome.Bl -tag -width Ds 153*4c1177a4SToomas Soome.It Ar bootblk 154*4c1177a4SToomas SoomeThe name of the SPARC boot loader code. 155*4c1177a4SToomas Soome.It Ar stage1 156*4c1177a4SToomas SoomeThe name of the loader stage 1 file. 157*4c1177a4SToomas Soome.It Ar stage2 158*4c1177a4SToomas SoomeThe name of the loader stage 2 file. 159*4c1177a4SToomas Soome.It Ar raw-device 160*4c1177a4SToomas SoomeThe name of the device onto which bootloader code is to be installed. It must be 161*4c1177a4SToomas Soomea character device that is readable and writable and part of boot pool. 162*4c1177a4SToomas Soome.El 163*4c1177a4SToomas Soome.Sh FILES 164*4c1177a4SToomas Soome.Bl -tag -width Ds 165*4c1177a4SToomas Soome.It Pa /boot 166*4c1177a4SToomas SoomeDirectory where x86 loader files reside. 167*4c1177a4SToomas Soome.It Pa /usr/platform/platform name/lib/fs 168*4c1177a4SToomas SoomeDirectory where SPARC boot loader files reside. 169*4c1177a4SToomas Soome.El 170*4c1177a4SToomas Soome.Sh EXAMPLES 171*4c1177a4SToomas Soome.Bl -tag -width Ds 172*4c1177a4SToomas Soome.It Sy Example 1 No Installing zfs boot loader on SPARC disk slice 173*4c1177a4SToomas SoomeThe following command installs zfs boot loader on SPARC system: 174*4c1177a4SToomas Soome.Bd -literal 175*4c1177a4SToomas Soome# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \e 176*4c1177a4SToomas Soome /dev/rdsk/c0t0d0s0 177*4c1177a4SToomas Soome.Ed 178*4c1177a4SToomas Soome.It Sy Example 2 No Installing boot loader on x86 system 179*4c1177a4SToomas SoomeThe following command installs loader stage files and master boot record: 180*4c1177a4SToomas Soome.Bd -literal 181*4c1177a4SToomas Soome# installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0 182*4c1177a4SToomas Soome.Ed 183*4c1177a4SToomas Soome.El 184*4c1177a4SToomas Soome.Sh INTERFACE STABILITY 185*4c1177a4SToomas Soome.Sy Uncommitted 186*4c1177a4SToomas Soome.Sh SEE ALSO 187*4c1177a4SToomas Soome.Xr boot 1M , 188*4c1177a4SToomas Soome.Xr bootadm 1M , 189*4c1177a4SToomas Soome.Xr fdisk 1M , 190*4c1177a4SToomas Soome.Xr fmthard 1M , 191*4c1177a4SToomas Soome.Xr format 1M , 192*4c1177a4SToomas Soome.Xr kernel 1M , 193*4c1177a4SToomas Soome.Xr attributes 5 194*4c1177a4SToomas Soome.Sh WARNINGS 195*4c1177a4SToomas SoomeInstalling 196*4c1177a4SToomas Soome.Sy stage1 197*4c1177a4SToomas Soomeon the master boot sector 198*4c1177a4SToomas Soome.Po 199*4c1177a4SToomas Soome.Fl m 200*4c1177a4SToomas Soomeoption 201*4c1177a4SToomas Soome.Pc 202*4c1177a4SToomas Soomeoverrides any boot loader currently installed on the machine. The system will 203*4c1177a4SToomas Soomealways boot the current OS partition regardless of which fdisk partition is 204*4c1177a4SToomas Soomeactive. 205*4c1177a4SToomas Soome.Pp 206*4c1177a4SToomas SoomeIf version string indicates the source boot loader might be more recent, 207*4c1177a4SToomas Soome.Nm 208*4c1177a4SToomas Soomewill also verify md5 checksums to determine if update is really necessary. If 209*4c1177a4SToomas Soomechecksums match, the install will not be performed. 210