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 2017 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
57 area of a disk slice. As the SPARC zfs boot loader is too large to fit into
58 boot area at the start of the disk slice,
60 command will split the zfs boot loader between disk slice boot area, and zfs
63 The x86 systems have boot loader implemented as three stages:
67 is used as master boot record
69 and partition boot program.
72 is responsible for loading files from file system. The
74 on x86 systems is always installed to zfs pool boot area, and therefore only zfs
77 command will record the location of
81 which is always installed at least on partition
83 boot area, making it possible to boot via chainload from other boot loaders.
87 command is used with the
91 installs the stage1 file on the master boot sector of the disk as well.
94 is read from file system and executed by
96 and will provide boot loader user environment and is responsible of loading
97 and starting the operating system kernel.
99 In case of GPT partitioning scheme, if the file system to boot from is either
100 UFS or PCFS, there must be
102 partition defined to store stage2 boot program. This is needed because UFS and
103 PCFS do not have sufficient space reserved to store boot programs.
105 The boot partition must use following GPT UUID:
106 .Bd -literal -offset indent
107 6a82cb45-1dd2-11b2-99a6-080020736631
119 command accepts the following options:
122 Prints short usage message.
126 on the master boot sector interactively. You must use this option if OS is
127 installed on an extended FDISK or an EFI/GPT partition.
129 Suppresses interaction when overwriting the master boot sector on x86.
130 Force update on SPARC.
132 Dry run session. Will not write to disk.
134 On SPARC, specify file system type. On x86, inhibit version check and enforce
137 Specify custom version string. Can be used to add version on non-versioned
138 boot loader or change built in version string.
140 Print version string from installed boot loader or from indicated file.
142 Print version string from installed boot loader without description.
144 Print version string from installed boot loader with full description.
146 Mirror boot loader from installed disk partition.
151 command accepts the following operands:
154 The name of the SPARC boot loader code.
156 The name of the loader stage 1 file.
158 The name of the loader stage 2 file.
160 The name of the device onto which bootloader code is to be installed. It must be
161 a character device that is readable and writable and part of boot pool.
166 Directory where x86 loader files reside.
167 .It Pa /usr/platform/platform name/lib/fs
168 Directory where SPARC boot loader files reside.
172 .It Sy Example 1 No Installing zfs boot loader on SPARC disk slice
173 The following command installs zfs boot loader on SPARC system:
175 # installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \e
178 .It Sy Example 2 No Installing boot loader on x86 system
179 The following command installs loader stage files and master boot record:
181 # installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0
184 .Sh INTERFACE STABILITY
197 on the master boot sector
202 overrides any boot loader currently installed on the machine. The system will
203 always boot the current OS partition regardless of which fdisk partition is
206 If version string indicates the source boot loader might be more recent,
208 will also verify md5 checksums to determine if update is really necessary. If
209 checksums match, the install will not be performed.