xref: /titanic_52/usr/src/man/man1m/installboot.1m (revision 161da084b704271993dcfe6c1ed128c60a3a75b0)
14c1177a4SToomas Soome.\"
24c1177a4SToomas Soome.\" This file and its contents are supplied under the terms of the
34c1177a4SToomas Soome.\" Common Development and Distribution License ("CDDL"), version 1.0.
44c1177a4SToomas Soome.\" You may only use this file in accordance with the terms of version
54c1177a4SToomas Soome.\" 1.0 of the CDDL.
64c1177a4SToomas Soome.\"
74c1177a4SToomas Soome.\" A full copy of the text of the CDDL should have accompanied this
84c1177a4SToomas Soome.\" source.  A copy of the CDDL is also available via the Internet at
94c1177a4SToomas Soome.\" http://www.illumos.org/license/CDDL.
104c1177a4SToomas Soome.\"
114c1177a4SToomas Soome.\"
12*161da084SToomas Soome.\" Copyright 2017 Toomas Soome <tsoome@me.com>
134c1177a4SToomas Soome.\"
14*161da084SToomas Soome.Dd February 19, 2017
154c1177a4SToomas Soome.Dt INSTALLBOOT 1M
164c1177a4SToomas Soome.Os
174c1177a4SToomas Soome.Sh NAME
184c1177a4SToomas Soome.Nm installboot
194c1177a4SToomas Soome.Nd install bootloader in a disk partition
204c1177a4SToomas Soome.Sh SYNOPSIS
214c1177a4SToomas Soome.Ss SPARC
224c1177a4SToomas Soome.Nm
234c1177a4SToomas Soome.Op Fl fn
244c1177a4SToomas Soome.Op Fl F Sy zfs Ns | Ns Sy ufs Ns | Ns Sy hsfs
254c1177a4SToomas Soome.Op Fl u Ar verstr
264c1177a4SToomas Soome.Ar bootblk raw-device
274c1177a4SToomas Soome.Nm
284c1177a4SToomas Soome.Op Fl enV
294c1177a4SToomas Soome.Fl F Sy zfs
304c1177a4SToomas Soome.Fl i
31*161da084SToomas Soome.Ar raw-device | Ar file
324c1177a4SToomas Soome.Nm
334c1177a4SToomas Soome.Op Fl n
344c1177a4SToomas Soome.Fl F Sy zfs
354c1177a4SToomas Soome.Fl M
364c1177a4SToomas Soome.Ar raw-device attach-raw-device
374c1177a4SToomas Soome.Ss x86
384c1177a4SToomas Soome.Nm
394c1177a4SToomas Soome.Op Fl fFmn
404c1177a4SToomas Soome.Op Fl u Ar verstr
414c1177a4SToomas Soome.Ar stage1 stage2 raw-device
424c1177a4SToomas Soome.Nm
434c1177a4SToomas Soome.Op Fl enV
444c1177a4SToomas Soome.Fl i
45*161da084SToomas Soome.Ar raw-device | Ar file
464c1177a4SToomas Soome.Nm
474c1177a4SToomas Soome.Op Fl n
484c1177a4SToomas Soome.Fl M
494c1177a4SToomas Soome.Ar raw-device attach-raw-device
504c1177a4SToomas Soome.Sh DESCRIPTION
514c1177a4SToomas SoomeThe
524c1177a4SToomas Soome.Xr boot 1M
534c1177a4SToomas Soomeboot program is loaded from disk and is responsible of loading kernel and its
544c1177a4SToomas Soomesupport files from specific file system.
554c1177a4SToomas Soome.Pp
564c1177a4SToomas SoomeThe SPARC systems have one boot loader program file to be installed on the boot
574c1177a4SToomas Soomearea of a disk slice. As the SPARC zfs boot loader is too large to fit into
584c1177a4SToomas Soomeboot area at the start of the disk slice,
594c1177a4SToomas Soome.Nm
604c1177a4SToomas Soomecommand will split the zfs boot loader between disk slice boot area, and zfs
614c1177a4SToomas Soomepool boot area.
624c1177a4SToomas Soome.Pp
634c1177a4SToomas SoomeThe x86 systems have boot loader implemented as three stages:
644c1177a4SToomas Soome.Bl -tag -width Ds
654c1177a4SToomas Soome.It Sy stage1
664c1177a4SToomas Soome.Pa /boot/pmbr
674c1177a4SToomas Soomeis used as master boot record
684c1177a4SToomas Soome.Pq MBR
694c1177a4SToomas Soomeand partition boot program.
704c1177a4SToomas Soome.It Sy stage2
714c1177a4SToomas Soome.Pa /boot/gptzfsboot
724c1177a4SToomas Soomeis responsible for loading files from file system. The
734c1177a4SToomas Soome.Sy stage2
744c1177a4SToomas Soomeon x86 systems is always installed to zfs pool boot area, and therefore only zfs
754c1177a4SToomas Soomeboot is supported.
764c1177a4SToomas Soome.Nm
774c1177a4SToomas Soomecommand will record the location of
784c1177a4SToomas Soome.Sy stage2
794c1177a4SToomas Soometo
804c1177a4SToomas Soome.Sy stage1 ,
814c1177a4SToomas Soomewhich is always installed at least on partition
824c1177a4SToomas Soome.Pq MBR or GPT
834c1177a4SToomas Soomeboot area, making it possible to boot via chainload from other boot loaders.
844c1177a4SToomas Soome.Pp
854c1177a4SToomas SoomeWhen
864c1177a4SToomas Soome.Nm
874c1177a4SToomas Soomecommand is used with the
884c1177a4SToomas Soome.Fl m
894c1177a4SToomas Soomeoption,
904c1177a4SToomas Soome.Nm
914c1177a4SToomas Soomeinstalls the stage1 file on the master boot sector of the disk as well.
924c1177a4SToomas Soome.It Sy stage3
934c1177a4SToomas Soome.Pa /boot/zfsloader
944c1177a4SToomas Soomeis read from file system and executed by
954c1177a4SToomas Soome.Sy stage2
964c1177a4SToomas Soomeand will provide boot loader user environment and is responsible of loading
974c1177a4SToomas Soomeand starting the operating system kernel.
984c1177a4SToomas Soome.Pp
994c1177a4SToomas SoomeIn case of GPT partitioning scheme, if the file system to boot from is either
1004c1177a4SToomas SoomeUFS or PCFS, there must be
1014c1177a4SToomas Soome.Sy boot
1024c1177a4SToomas Soomepartition defined to store stage2 boot program. This is needed because UFS and
1034c1177a4SToomas SoomePCFS do not have sufficient space reserved to store boot programs.
1044c1177a4SToomas Soome.Pp
1054c1177a4SToomas SoomeThe boot partition must use following GPT UUID:
1064c1177a4SToomas Soome.Bd -literal -offset indent
1074c1177a4SToomas Soome6a82cb45-1dd2-11b2-99a6-080020736631
1084c1177a4SToomas Soome.Ed
1094c1177a4SToomas Soome.Pp
1104c1177a4SToomas Soomewhich is provided by
1114c1177a4SToomas Soome.Qq boot
1124c1177a4SToomas Soometag in
1134c1177a4SToomas Soome.Xr format 1M
1144c1177a4SToomas Soomepartition menu.
1154c1177a4SToomas Soome.El
1164c1177a4SToomas Soome.Ss Options
1174c1177a4SToomas SoomeThe
1184c1177a4SToomas Soome.Nm
1194c1177a4SToomas Soomecommand accepts the following options:
1204c1177a4SToomas Soome.Bl -tag -width Ds
1214c1177a4SToomas Soome.It Fl h
1224c1177a4SToomas SoomePrints short usage message.
1234c1177a4SToomas Soome.It Fl m
1244c1177a4SToomas SoomeInstalls
1254c1177a4SToomas Soome.Sy stage1
1264c1177a4SToomas Soomeon the master boot sector interactively. You must use this option if OS is
1274c1177a4SToomas Soomeinstalled on an extended FDISK or an EFI/GPT partition.
1284c1177a4SToomas Soome.It Fl f
1294c1177a4SToomas SoomeSuppresses interaction when overwriting the master boot sector on x86.
1304c1177a4SToomas SoomeForce update on SPARC.
1314c1177a4SToomas Soome.It Fl n
1324c1177a4SToomas SoomeDry run session. Will not write to disk.
1334c1177a4SToomas Soome.It Fl F
1344c1177a4SToomas SoomeOn SPARC, specify file system type. On x86, inhibit version check and enforce
1354c1177a4SToomas Soomeboot loader update.
1364c1177a4SToomas Soome.It Fl u Ar verstr
1374c1177a4SToomas SoomeSpecify custom version string. Can be used to add version on non-versioned
1384c1177a4SToomas Soomeboot loader or change built in version string.
1394c1177a4SToomas Soome.It Fl i
140*161da084SToomas SoomePrint version string from installed boot loader or from indicated file.
1414c1177a4SToomas Soome.It Fl e
1424c1177a4SToomas SoomePrint version string from installed boot loader without description.
1434c1177a4SToomas Soome.It Fl V
1444c1177a4SToomas SoomePrint version string from installed boot loader with full description.
1454c1177a4SToomas Soome.It Fl M
1464c1177a4SToomas SoomeMirror boot loader from installed disk partition.
1474c1177a4SToomas Soome.El
1484c1177a4SToomas Soome.Ss Operands
1494c1177a4SToomas SoomeThe
1504c1177a4SToomas Soome.Nm
1514c1177a4SToomas Soomecommand accepts the following operands:
1524c1177a4SToomas Soome.Bl -tag -width Ds
1534c1177a4SToomas Soome.It Ar bootblk
1544c1177a4SToomas SoomeThe name of the SPARC boot loader code.
1554c1177a4SToomas Soome.It Ar stage1
1564c1177a4SToomas SoomeThe name of the loader stage 1 file.
1574c1177a4SToomas Soome.It Ar stage2
1584c1177a4SToomas SoomeThe name of the loader stage 2 file.
1594c1177a4SToomas Soome.It Ar raw-device
1604c1177a4SToomas SoomeThe name of the device onto which bootloader code is to be installed. It must be
1614c1177a4SToomas Soomea character device that is readable and writable and part of boot pool.
1624c1177a4SToomas Soome.El
1634c1177a4SToomas Soome.Sh FILES
1644c1177a4SToomas Soome.Bl -tag -width Ds
1654c1177a4SToomas Soome.It Pa /boot
1664c1177a4SToomas SoomeDirectory where x86 loader files reside.
1674c1177a4SToomas Soome.It Pa /usr/platform/platform name/lib/fs
1684c1177a4SToomas SoomeDirectory where SPARC boot loader files reside.
1694c1177a4SToomas Soome.El
1704c1177a4SToomas Soome.Sh EXAMPLES
1714c1177a4SToomas Soome.Bl -tag -width Ds
1724c1177a4SToomas Soome.It Sy Example 1 No Installing zfs boot loader on SPARC disk slice
1734c1177a4SToomas SoomeThe following command installs zfs boot loader on SPARC system:
1744c1177a4SToomas Soome.Bd -literal
1754c1177a4SToomas Soome# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \e
1764c1177a4SToomas Soome  /dev/rdsk/c0t0d0s0
1774c1177a4SToomas Soome.Ed
1784c1177a4SToomas Soome.It Sy Example 2 No Installing boot loader on x86 system
1794c1177a4SToomas SoomeThe following command installs loader stage files and master boot record:
1804c1177a4SToomas Soome.Bd -literal
1814c1177a4SToomas Soome# installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/c0t0d0s0
1824c1177a4SToomas Soome.Ed
1834c1177a4SToomas Soome.El
1844c1177a4SToomas Soome.Sh INTERFACE STABILITY
1854c1177a4SToomas Soome.Sy Uncommitted
1864c1177a4SToomas Soome.Sh SEE ALSO
1874c1177a4SToomas Soome.Xr boot 1M ,
1884c1177a4SToomas Soome.Xr bootadm 1M ,
1894c1177a4SToomas Soome.Xr fdisk 1M ,
1904c1177a4SToomas Soome.Xr fmthard 1M ,
1914c1177a4SToomas Soome.Xr format 1M ,
1924c1177a4SToomas Soome.Xr kernel 1M ,
1934c1177a4SToomas Soome.Xr attributes 5
1944c1177a4SToomas Soome.Sh WARNINGS
1954c1177a4SToomas SoomeInstalling
1964c1177a4SToomas Soome.Sy stage1
1974c1177a4SToomas Soomeon the master boot sector
1984c1177a4SToomas Soome.Po
1994c1177a4SToomas Soome.Fl m
2004c1177a4SToomas Soomeoption
2014c1177a4SToomas Soome.Pc
2024c1177a4SToomas Soomeoverrides any boot loader currently installed on the machine. The system will
2034c1177a4SToomas Soomealways boot the current OS partition regardless of which fdisk partition is
2044c1177a4SToomas Soomeactive.
2054c1177a4SToomas Soome.Pp
2064c1177a4SToomas SoomeIf version string indicates the source boot loader might be more recent,
2074c1177a4SToomas Soome.Nm
2084c1177a4SToomas Soomewill also verify md5 checksums to determine if update is really necessary. If
2094c1177a4SToomas Soomechecksums match, the install will not be performed.
210