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
|
'\" 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]
.TH BOOTADM 1M "Apr 25, 2008"
.SH NAME
bootadm \- manage bootability of GRUB-enabled operating system
.SH SYNOPSIS
.LP
.nf
\fB/sbin/bootadm\fR update-archive [\fB-vn\fR] [\fB-R\fR \fIaltroot\fR [\fB-p\fR \fIplatform\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
x86 only
.fi
.LP
.nf
\fB/sbin/bootadm\fR set-menu [\fB-R\fR \fIaltroot\fR [\fB-p\fR \fIplatform\fR]] \fIkey\fR=\fIvalue\fR
.fi
.LP
.nf
\fB/sbin/bootadm\fR list-menu [\fB-R\fR \fIaltroot\fR [\fB-p\fR \fIplatform\fR]]
.fi
.SH DESCRIPTION
.sp
.LP
The \fBbootadm\fR command manages the boot archive and, with x86 boot
environments, the GRUB (GRand Unified Bootloader) 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 GRUB menu.
.sp
.LP
The \fBlist-menu\fR subcommand displays the location of the GRUB menu and the
current GRUB menu entries. While the typical location of the GRUB menu is
\fB/boot/grub/menu.lst\fR, depending on the install method used the active GRUB
menu might be located somewhere else. Use the \fBlist-menu\fR subcommand to
locate the active GRUB 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, do not use
GRUB and have no boot menu manageable by \fBbootadm\fR.
.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
.sp
.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.
.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\fBset-menu\fR\fR
.ad
.sp .6
.RS 4n
Maintain the GRUB menu. The current GRUB menu is \fBboot/grub/menu.lst\fR,
relative to root. Do not depend on this location, because it is subject to
change. 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 active GRUB menu, as well as the current GRUB menu
entries. This includes the autoboot-timeout, the default entry number, and the
title of each entry. Applies to x86 platforms only.
.RE
.SH OPTIONS
.sp
.LP
The \fBbootadm\fR command has the following options:
.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.
.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-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-R\fR\ \fIaltroot\fR\fR
.ad
.sp .6
.RS 4n
Operation is applied to an alternate root path.
.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 GRUB 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 Installed OS Instances
.sp
.LP
The following command lists the installed operating system instances in a GRUB
menu:
.sp
.in +2
.nf
# bootadm list-menu
default=0
timeout=10
(0) Solaris10
(1) Solaris10 Failsafe
(2) Linux
.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 Linux (item 2).
.sp
.in +2
.nf
# bootadm set-menu default=2
.fi
.in -2
.LP
\fBExample 5 \fRListing GRUB Menu Entries and Location of GRUB Menu
.sp
.LP
The following command lists the GRUB menu entries and the location of the GRUB
menu:
.sp
.in +2
.nf
# bootadm list-menu
The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst
default 0
timeout 10
0 Solaris10
1 Solaris10 failsafe
2 Linux
.fi
.in -2
.LP
\fBExample 6 \fRDisplaying Location of GRUB Menu
.sp
.LP
The following command displays the location of the GRUB menu:
.sp
.in +2
.nf
# bootadm list-menu
The location for the active GRUB menu is: /dev/dsk/c0t1d0s0 (not mounted)
The filesystem type of the menu device is <ufs>
default 2
timeout 10
0 c0t1d0s3
1 c0t1d0s3 failsafe
2 Solaris10
3 Solaris10 failsafe
.fi
.in -2
.sp
.LP
In this example, the active GRUB menu is located on a device which is \fBnot\fR
mounted. To access the GRUB menu, mount the device and access the GRUB menu at
\fB\fI<mountpoint>\fR/boot/grub/menu.lst\fR.
.SH EXIT STATUS
.sp
.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
.sp
.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
.sp
.LP
\fBboot\fR(1M), \fBinstallgrub\fR(1M), \fBattributes\fR(5)
.sp
.LP
Consult the GRUB home page, under:
.sp
.in +2
.nf
http://www.gnu.org/
.fi
.in -2
|