summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/bootadm.1m
blob: 608807a7feafb638508d6aae175f06832fac1bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.\" Copyright 2016 Toomas Soome <tsoome@me.com>
.\" Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
.TH BOOTADM 1M "Jul 05, 2018"
.SH NAME
bootadm \- manage bootability of the operating system
.SH SYNOPSIS
.LP
.nf
\fB/sbin/bootadm\fR update-archive [\fB-vnf\fR] [\fB-R\fR \fIaltroot\fR [\fB-p\fR \fIplatform\fR]]
     [\fB-F \fIformat\fR]
.fi

.LP
.nf
\fB/sbin/bootadm\fR list-archive [\fB-vn\fR] [\fB-R\fR \fIaltroot\fR [\fB-p\fR \fIplatform\fR]]
.fi

.LP
.nf
\fB/sbin/bootadm\fR install-bootloader [\fB-Mfv\fR] [\fB-R\fR \fIaltroot\fR] [\fB-P\fR \fIpool\fR]
.fi

.LP
.nf
 x86 only
.fi

.LP
.nf
\fB/sbin/bootadm\fR set-menu [\fB-R\fR \fIaltroot\fR] \fIkey\fR=\fIvalue\fR
.fi

.LP
.nf
\fB/sbin/bootadm\fR list-menu [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIkey\fR=\fIvalue\fR\fR]
.fi

.SH DESCRIPTION
.LP
The \fBbootadm\fR command manages the boot archive and, with x86 boot
environments, the boot loader menu. The
\fBupdate-archive\fR option provides a way for user to update the boot archive
as a preventative measure or as part of a recovery procedure. The
\fBset-menu\fR subcommand allows you to switch the \fBauto-boot\fR timeout and
default boot entry in the boot menu.
.sp
.LP
The \fBinstall-bootloader\fR subcommand installs the system boot loader on a
ZFS pool. If ZFS pool was not specified with the \fB-P\fR option, then the boot
loader is installed on the ZFS pool that the system booted from. If the
system did not boot from a ZFS pool (for example, it booted an installer via PXE
or CD-ROM) then the \fB-P\fR option is required.
.sp
This subcommand can be used to install, update, and repair the boot loader on a
ZFS pool intended for booting. When disks in the ZFS pool used for booting the
system have been replaced, one should run \fBbootadm install-bootloader\fR to
ensure that all disks in that pool have the system boot loader installed.
.sp
.LP
The \fBlist-menu\fR subcommand displays the location of the boot menu and the
current boot menu entries. The location of the boot menu list is
\fB/<boot pool root dataset mountpoint>/boot/menu.lst\fR.
Use the \fBlist-menu\fR subcommand to
locate the boot menu. See the EXAMPLES section for typical output from
the \fBlist-menu\fR option.
.sp
.LP
Note that OpenBoot PROM (OBP)-based machines, such as SPARC systems, use
PROM variables to set boot behavior and are managed by the \fBeeprom\fR(1M)
command.
.sp
.LP
The \fBbootadm\fR command determines dynamically the options supported by the
image to be managed, so that \fBbootadm\fR invoked on one platform can be used
to manage diskless clients of a different platform type.
.SH SUBCOMMANDS
.LP
The \fBbootadm\fR command has the following subcommands:
.sp
.ne 2
.na
\fB\fBupdate-archive\fR\fR
.ad
.sp .6
.RS 4n
Updates current boot archive if required. Applies to both SPARC and x86
platforms. The boot archive can be created in a number of different formats;
the default format is an IEEE/P1003 Data Interchange Standard cpio archive.
The format is configured through the following service management facility
(\fBsmf\fR(5)) property:
.sp
.in +2
.nf
svc:/system/boot-archive:default/config/format
.fi
.in -2

.sp
.LP
This property takes one of the following values:
.RS 8n

.sp
.ne 2
.na
\fBcpio\fR
.ad
.sp .6
.RS 4n
IEEE/P1003 Data Interchange Standard cpio archive (default).
.RE

.sp
.ne 2
.na
\fBhsfs\fR
.ad
.sp .6
.RS 4n
ISO 9660 filesystem image (only supported if \fI/usr/bin/mkisofs\fR is
available).
.RE

.sp
.ne 2
.na
\fBufs\fR
.ad
.sp .6
.RS 4n
UFS filesystem in which the files within are compressed using gzip if
\fI/usr/bin/gzip\fR is available.
.RE

.sp
.ne 2
.na
\fBufs-nocompress\fR
.ad
.sp .6
.RS 4n
UFS filesystem. The files within are not compressed but the resulting overall
boot archive will still be compressed if \fI/usr/bin/gzip\fR is available.
.RE
.RE

See \fBEXAMPLES\fR for how to change this value.

.RE

.sp
.ne 2
.na
\fB\fBlist-archive\fR\fR
.ad
.sp .6
.RS 4n
Lists the files and directories to be included in the boot archive. Applies to
both SPARC and x86 platforms.
.RE

.sp
.ne 2
.na
\fB\fBinstall-bootloader\fR\fR
.ad
.sp .6
.RS 4n
Applies platform specific method to install the system boot loader to the disks
that are part of the selected ZFS pool (either specified with \fB-P\fR or
the default).
.sp
On SPARC, the boot loader is installed in the boot area of the disk partition
used by the ZFS pool.
.sp
On x86, disks are formatted using either \fBMBR Partitioning\fR (Master Boot
Record) or using \fBGPT Partitioning\fR (GUID Partition Tables). The first
sector on the disk that is used by the \fBBIOS\fR to find a boot loader
is referred to as the \fBMBR\fR (Master Boot Record) and is always used
regardless of the partition scheme.
.sp
On x86, disks in a ZFS pool may be a combination of either type of partitioning
scheme.  If an entire disk was added to a ZFS pool (e.g. c0t0d0), then it was
formatted with \fBGPT\fR partitioning and the fact is recorded. The
\fBinstall-bootloader\fR subcommand will always update the system boot loader on
the disks. However, unless the entire disk was given a ZFS pool or the \fB-M\fR
option is specified, the \fBMBR\fR of the disk will not updated, as the system
cannot guarantee that the \fBMBR\fR belongs to it. If, for example, the system
was being dual booted, a different initial boot loader may be installed there.
.sp
To reinstall the boot loader on some or all of the disks, the \fB-f\fR option
must be passed to the \fBinstall-bootloader\fR subcommand to override boot
program version checks.
.RE

.sp
.ne 2
.na
\fB\fBset-menu\fR\fR
.ad
.sp .6
.RS 4n
Maintain the menu configuration. The index of menu entries is listed in the
\fBmenu.lst\fR file, and the actual configuration of the menu entry is located
in the boot environment \fB/boot\fR directory.
Applies to x86 platforms only.
.RE

.sp
.ne 2
.na
\fB\fBlist-menu\fR\fR
.ad
.sp .6
.RS 4n
Lists the location of the \fBmenu.lst\fR, as well as the current menu
entries. This listing includes the default entry, dataset name, and the
title of each entry. Applies to x86 platforms only.
.RE

.SH OPTIONS
.LP
The \fBbootadm\fR command has the following options:

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.sp .6
.RS 4n
In an \fBupdate-archive\fR operation, force re-generation of the boot-archive
even if no files have changed.

In an \fBinstall-bootloader\fR operation, override the boot loader versioning
constraints.
.RE

.sp
.ne 2
.na
\fB-F \fIformat\fR\fR
.ad
.sp .6
.RS 4n
In an \fBupdate-archive\fR operation, select the desired archive format. The
format can be any of the values shown above for the
svc:/system/boot-archive:default/config/format property.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
In an \fBupdate-archive\fR operation, archive content is checked but not
updated.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR \fIkey\fR=\fIvalue\fR
.ad
.sp .6
.RS 4n
In a \fBlist-menu\fR operation, specify the menu entry for detailed inspection.
Possible keys are \fBentry\fR and \fBtitle\fR, taking either entry number or
title name as values.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR \fIplatform\fR\fR
.ad
.sp .6
.RS 4n
The platform, or machine hardware class, of the client. The platform type can
only be specified together with \fB-R\fR, and is generally useful only for
managing a diskless client where the client is of a different platform class
than the server. Platform must be one of \fBi86pc\fR, \fBsun4u\fR, or
\fBsun4v\fR.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
In an \fBupdate-archive\fR operation, stale files are displayed on stderr.
.sp
In an \fBinstall-bootloader\fR operation, display any output from tasks
performed.
.RE

.sp
.ne 2
.na
\fB\fB-M\fR\fR
.ad
.sp .6
.RS 4n
On x86 systems, in an \fBinstall-bootloader\fR operation, additionally installs
the system boot loader to the \fBMBR\fR (master boot record). For more
information, see the discussion of \fBinstall-bootloader\fR in the
\fBSUBCOMMANDS\fR section.
.sp
This option is not supported on non-x86 systems, and it is an error to specify
it.
.RE

.sp
.ne 2
.na
\fB-P\fR\ \fIpool\fR
.ad
.sp .6
.RS 4n
In an \fBinstall-bootloader\fR operation, the boot loader is installed on
the disks in the ZFS pool \fIpool\fR. If the \fB-P\fR option is not specified,
then the boot loader is installed on the ZFS pool that the system booted from.
If the system did not boot from a ZFS pool then the \fB-P\fR option is required.
.RE

.sp
.ne 2
.na
\fB\fB-R\fR\ \fIaltroot\fR\fR
.ad
.sp .6
.RS 4n
Operation is applied to an alternate root path. In an \fBinstall-bootloader\fR
operation, the boot loader is still installed on the specified pool; however,
the boot loader itself will come from the alternate root.
.LP
Note -
.sp
.RS 2
The root file system of any non-global zones must not be referenced with the
\fB-R\fR option. Doing so might damage the global zone's file system, might
compromise the security of the global zone, and might damage the non-global
zone's file system. See \fBzones\fR(5).
.RE
.RE

.sp
.ne 2
.na
\fB\fIkey\fR=\fIvalue\fR\fR
.ad
.sp .6
.RS 4n
Possible values are:
.sp
.ne 2
.na
\fB\fBdefault=\fR\fIentrynum\fR\fR
.ad
.sp .6
.RS 4n
The item number (for example, 0, 1, or 2) in the boot menu designating the
operating system to boot when the timer expires.
.RE

.sp
.ne 2
.na
\fB\fBtimeout=\fR\fIseconds\fR\fR
.ad
.sp .6
.RS 4n
The number of seconds before the operating system designated by the default
item number is booted. If the value is -1, auto boot is disabled.
.RE

.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRUpdating the Current Boot Archive
.sp
.LP
The following command updates the current boot archive:

.sp
.in +2
.nf
# bootadm update-archive
.fi
.in -2

.LP
\fBExample 2 \fRUpdating the Boot Archive on an Alternate Root
.sp
.LP
The following command updates the boot archive on an alternate root:

.sp
.in +2
.nf
# bootadm update-archive -R /a
.fi
.in -2

.LP
\fBExample 3 \fRListing Boot Menu Entries and Location of Boot Menu
.sp
.LP
The following command lists the boot environments and the location of the
\fBmenu.lst\fR:

.sp
.in +2
.nf
# bootadm list-menu
the location for the active menu is: /raid/boot/menu.lst
Index  Default  Dataset             Menu
0      -        raid/ROOT/test-182  test-182
1      -        raid/ROOT/test-183  test-183
2      *        raid/ROOT/test-184  test-184
.fi
.in -2

.LP
\fBExample 4 \fRSwitching Default Boot Entry
.sp
.LP
The following command refers to the menu displayed in the previous example. The
user selects test-183 (item 1).

.sp
.in +2
.nf
# bootadm set-menu default=1
.fi
.in -2

.LP
\fBExample 5 \fRChanging archive format
.sp
.LP
The following command changes the boot archive format to \fIufs\fR

.sp
.in +2
.nf
# svccfg -s system/boot-archive:default setprop config/format = ufs
# svcadm refresh system/boot-archive:default
# bootadm update-archive -f
.fi
.in -2

.LP
\fBExample 6 \fRDetailed information about menu entry.
.sp
.LP
The following command lists more detailed information about a boot menu entry:

.sp
.in +2
.nf
# bootadm list-menu -o entry=2
the location for the active menu is: /raid/boot/menu.lst

Title:       test-184
Timeout:     10
Console:     text
Bootfs:      raid/ROOT/test-184
Kernel:      /platform/i86pc/kernel/amd64/unix
Boot-args:   "-v"

Modules:
Name:        boot_archive
Path:        /platform/i86pc/${ISADIR}/boot_archive
Type:        rootfs
Status:      Load

Name:        boot_archive.hash
Path:        /platform/i86pc/${ISADIR}/boot_archive.hash
Type:        hash
Status:      Load

Name:        system
Path:        /boot/modules/etc/system
Type:        file
Hash:        4f4fe2d2dfae393a2a87ce29e3c71b803938c5fb
Flags:       name=etc/system
Status:      Load

.fi
.in -2

.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
The command completed successfully.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.sp .6
.RS 4n
The command exited due to an error.
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.LP
\fBboot\fR(1M), \fBbeadm\fR(1M), \fBinstallboot\fR(1M), \fBattributes\fR(5)