2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2018 Toomas Soome <tsoome@me.com>
19 .Nd install bootloader in a disk partition
24 .Op Fl F Sy zfs Ns | Ns Sy ufs Ns | Ns Sy hsfs
26 .Ar bootblk raw-device
31 .Ar raw-device | Ar file
36 .Ar raw-device attach-raw-device
41 .Ar stage1 stage2 raw-device
45 .Ar raw-device | Ar file
49 .Ar raw-device attach-raw-device
53 boot program is loaded from disk and is responsible of loading kernel and its
54 support files from specific file system.
56 The SPARC systems have one boot loader program file to be installed on the boot
58 As the SPARC zfs boot loader is too large to fit into boot area at the start of
61 command will split the zfs boot loader between disk slice boot area, and zfs
64 The x86 systems have boot loader implemented as three stages:
68 is used as master boot record
70 and partition boot program.
73 is responsible for loading files from file system.
76 on x86 systems is always installed to zfs pool boot area, and therefore only zfs
79 command will record the location of
83 which is always installed at least on partition
85 boot area, making it possible to boot via chainload from other boot loaders.
89 command is used with the
93 installs the stage1 file on the master boot sector of the disk as well.
96 is read from file system and executed by
98 and will provide boot loader user environment and is responsible of loading
99 and starting the operating system kernel.
101 In case of GPT partitioning scheme, if the file system to boot from is either
102 UFS or PCFS, there must be
104 partition defined to store stage2 boot program.
105 This is needed because UFS and PCFS do not have sufficient space reserved to
108 The boot partition must use following GPT UUID:
109 .Bd -literal -offset indent
110 6a82cb45-1dd2-11b2-99a6-080020736631
122 command accepts the following options:
125 Prints short usage message.
129 on the master boot sector interactively.
130 You must use this option if OS is installed on an extended FDISK or an EFI/GPT
133 Suppresses interaction when overwriting the master boot sector on x86.
134 Force update on SPARC.
137 Will not write to disk.
139 On SPARC, specify file system type.
140 On x86, inhibit version check and enforce boot loader update.
142 Specify custom version string.
143 Can be used to add version on non-versioned boot loader or change built in
146 Print version string from installed boot loader or from indicated file.
148 Print version string from installed boot loader without description.
150 Print version string from installed boot loader with full description.
152 Mirror boot loader from installed disk partition.
157 command accepts the following operands:
160 The name of the SPARC boot loader code.
162 The name of the loader stage 1 file.
164 The name of the loader stage 2 file.
166 The name of the device onto which bootloader code is to be installed.
167 It must be a character device that is readable and writable and part of boot
173 Directory where x86 loader files reside.
174 .It Pa /usr/platform/platform name/lib/fs
175 Directory where SPARC boot loader files reside.
179 .It Sy Example 1 No Installing zfs boot loader on SPARC disk slice
180 The following command installs zfs boot loader on SPARC system:
182 # installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \e
185 .It Sy Example 2 No Installing boot loader on x86 system
186 The following command installs loader stage files and master boot record:
188 # installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0
191 .Sh INTERFACE STABILITY
204 on the master boot sector
209 overrides any boot loader currently installed on the machine.
210 The system will always boot the current OS partition regardless of which fdisk
213 If version string indicates the source boot loader might be more recent,
215 will also verify md5 checksums to determine if update is really necessary.
216 If checksums match, the install will not be performed.