INSTALLBOOT(1M) Maintenance Commands INSTALLBOOT(1M)

NAME


installboot - install bootloader in a disk partition

SYNOPSIS


SPARC


installboot [-fn] [-F zfs|ufs|hsfs] [-u verstr] bootblk raw-device
installboot [-enV] -F zfs -i raw-device | file
installboot [-n] -F zfs -M raw-device attach-raw-device

x86
installboot [-fFmn] [-u verstr] stage1 stage2 raw-device
installboot [-enV] -i raw-device | file
installboot [-n] -M raw-device attach-raw-device

DESCRIPTION


The boot(1M) boot program is loaded from disk and is responsible of loading
kernel and its support files from specific file system.

The SPARC systems have one boot loader program file to be installed on the
boot area of a disk slice. As the SPARC zfs boot loader is too large to
fit into boot area at the start of the disk slice, installboot command will
split the zfs boot loader between disk slice boot area, and zfs pool boot
area.

The x86 systems have boot loader implemented as three stages:

stage1 /boot/pmbr is used as master boot record (MBR) and partition boot
program.

stage2 /boot/gptzfsboot is responsible for loading files from file system.
The stage2 on x86 systems is always installed to zfs pool boot
area, and therefore only zfs boot is supported. installboot
command will record the location of stage2 to stage1, which is
always installed at least on partition (MBR or GPT) boot area,
making it possible to boot via chainload from other boot loaders.

When installboot command is used with the -m option, installboot
installs the stage1 file on the master boot sector of the disk as
well.

stage3 /boot/loader is read from file system and executed by stage2 and
will provide boot loader user environment and is responsible of
loading and starting the operating system kernel.

In case of GPT partitioning scheme, if the file system to boot from
is either UFS or PCFS, there must be boot partition defined to
store stage2 boot program. This is needed because UFS and PCFS do
not have sufficient space reserved to store boot programs.

The boot partition must use following GPT UUID:

6a82cb45-1dd2-11b2-99a6-080020736631

which is provided by "boot" tag in format(1M) partition menu.

Options


The installboot command accepts the following options:

-h Prints short usage message.

-m Installs stage1 on the master boot sector interactively. You must
use this option if OS is installed on an extended FDISK or an
EFI/GPT partition.

-f Suppresses interaction when overwriting the master boot sector on
x86. Force update on SPARC.

-n Dry run session. Will not write to disk.

-F On SPARC, specify file system type. On x86, inhibit version check
and enforce boot loader update.

-u verstr
Specify custom version string. Can be used to add version on non-
versioned boot loader or change built in version string.

-i Print version string from installed boot loader or from indicated
file.

-e Print version string from installed boot loader without
description.

-V Print version string from installed boot loader with full
description.

-M Mirror boot loader from installed disk partition.

Operands


The installboot command accepts the following operands:

bootblk
The name of the SPARC boot loader code.

stage1 The name of the loader stage 1 file.

stage2 The name of the loader stage 2 file.

raw-device
The name of the device onto which bootloader code is to be
installed. It must be a character device that is readable and
writable and part of boot pool.

FILES


/boot Directory where x86 loader files reside.

/usr/platform/platform name/lib/fs
Directory where SPARC boot loader files reside.

EXAMPLES


Example 1 Installing zfs boot loader on SPARC disk slice
The following command installs zfs boot loader on SPARC system:

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \
/dev/rdsk/c0t0d0s0

Example 2 Installing boot loader on x86 system
The following command installs loader stage files and master boot
record:

# installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0

INTERFACE STABILITY


Uncommitted

SEE ALSO


boot(1M), bootadm(1M), fdisk(1M), fmthard(1M), format(1M), kernel(1M),
attributes(5)

WARNINGS


Installing stage1 on the master boot sector (-m option) overrides any boot
loader currently installed on the machine. The system will always boot the
current OS partition regardless of which fdisk partition is active.

If version string indicates the source boot loader might be more recent,
installboot will also verify md5 checksums to determine if update is really
necessary. If checksums match, the install will not be performed.

illumos July 20, 2018 illumos