1bootadm(1M)             System Administration Commands             bootadm(1M)
2
3
4

NAME

6       bootadm - manage bootability of GRUB-enabled operating system
7

SYNOPSIS

9       /sbin/bootadm update-archive [-vn] [-R altroot [-p platform]]
10
11
12       /sbin/bootadm list-archive [-vn] [-R altroot [-p platform]]
13
14
15        x86 only
16
17
18       /sbin/bootadm set-menu [-R altroot [-p platform]] key=value
19
20
21       /sbin/bootadm list-menu [-R altroot [-p platform]]
22
23

DESCRIPTION

25       The  bootadm  command manages the boot archive and, with x86 boot envi‐
26       ronments, the GRUB (GRand Unified Bootloader) menu. The  update-archive
27       option  provides a way for user to update the boot archive as a preven‐
28       tative measure or as part of a recovery procedure. The set-menu subcom‐
29       mand  allows you to switch the auto-boot timeout and default boot entry
30       in the GRUB menu.
31
32
33       The list-menu subcommand displays the location of the GRUB menu and the
34       current  GRUB menu entries. While the typical location of the GRUB menu
35       is /boot/grub/menu.lst, depending on the install method used the active
36       GRUB menu might be located somewhere else. Use the list-menu subcommand
37       to locate the active GRUB menu. For example, if a system was  installed
38       using  Live  Upgrade, the GRUB menu might not be located in the current
39       boot environment. See the EXAMPLES section for typical output from  the
40       list-menu option.
41
42
43       Note that OpenBoot PROM (OBP)-based machines, such as SPARC systems, do
44       not use GRUB and have no boot menu manageable by bootadm.
45
46
47       The bootadm command determines dynamically the options supported by the
48       image  to  be  managed,  so that bootadm invoked on one platform can be
49       used to manage diskless clients of a different platform type.
50

SUBCOMMANDS

52       The bootadm command has the following subcommands:
53
54       update-archive
55
56           Updates current boot archive if required. Applies to both SPARC and
57           x86 platforms.
58
59
60       list-archive
61
62           Lists the files and directories to be included in the boot archive.
63           Applies to both SPARC and x86 platforms.
64
65
66       set-menu
67
68           Maintain   the   GRUB   menu.   The   current    GRUB    menu    is
69           boot/grub/menu.lst,  relative  to root. Do not depend on this loca‐
70           tion, because it is subject to change.  Applies  to  x86  platforms
71           only.
72
73
74       list-menu
75
76           Lists  the location of the active GRUB menu, as well as the current
77           GRUB menu entries. This includes the autoboot-timeout, the  default
78           entry number, and the title of each entry. Applies to x86 platforms
79           only.
80
81

OPTIONS

83       The bootadm command has the following options:
84
85       -v
86
87           In an  update-archive  operation,  stale  files  are  displayed  on
88           stderr.
89
90
91       -n
92
93           In  an update-archive operation, archive content is checked but not
94           updated.
95
96
97       -p platform
98
99           The platform, or machine hardware class, of the client.  The  plat‐
100           form  type can only be specified together with -R, and is generally
101           useful only for managing a diskless client where the client is of a
102           different  platform  class than the server. Platform must be one of
103           i86pc, sun4u, or sun4v.
104
105
106       -R altroot
107
108           Operation is applied to an alternate root path.
109
110           Note -
111
112             The root file system of any non-global zones must not  be  refer‐
113             enced with the -R option. Doing so might damage the global zone's
114             file system, might compromise the security of  the  global  zone,
115             and might damage the non-global zone's file system. See zones(5).
116
117
118       key=value
119
120           Possible values are:
121
122           default=entrynum
123
124               The item number (for example, 0, 1, or 2) in the GRUB menu des‐
125               ignating the operating system to boot when the timer expires.
126
127
128           timeout=seconds
129
130               The number of seconds before the operating system designated by
131               the  default  item  number  is booted. If the value is -1, auto
132               boot is disabled.
133
134
135

EXAMPLES

137       Example 1 Updating the Current Boot Archive
138
139
140       The following command updates the current boot archive:
141
142
143         # bootadm update-archive
144
145
146       Example 2 Updating the Boot Archive on an Alternate Root
147
148
149       The following command updates the boot archive on an alternate root:
150
151
152         # bootadm update-archive -R /a
153
154
155       Example 3 Listing Installed OS Instances
156
157
158       The following command lists the installed operating system instances in
159       a GRUB menu:
160
161
162         # bootadm list-menu
163
164         default=0
165         timeout=10
166         (0) Solaris10
167         (1) Solaris10 Failsafe
168         (2) Linux
169
170
171       Example 4 Switching Default Boot Entry
172
173
174       The  following  command  refers  to  the menu displayed in the previous
175       example. The user selects Linux (item 2).
176
177
178         # bootadm set-menu default=2
179
180
181       Example 5 Listing GRUB Menu Entries and Location of GRUB Menu
182
183
184       The following command lists the GRUB menu entries and the  location  of
185       the GRUB menu:
186
187
188         # bootadm list-menu
189         The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst
190         default 0
191         timeout 10
192         0 Solaris10
193         1 Solaris10 failsafe
194         2 Linux
195
196
197       Example 6 Displaying Location of GRUB Menu
198
199
200       The following command displays the location of the GRUB menu:
201
202
203         # bootadm list-menu
204         The location for the active GRUB menu is: /dev/dsk/c0t1d0s0 (not mounted)
205         The filesystem type of the menu device is <ufs>
206         default 2
207         timeout 10
208         0 c0t1d0s3
209         1 c0t1d0s3 failsafe
210         2 Solaris10
211         3 Solaris10 failsafe
212
213
214
215       In  this  example, the active GRUB menu is located on a device which is
216       not mounted. To access the GRUB menu, mount the device and  access  the
217       GRUB menu at <mountpoint>/boot/grub/menu.lst.
218
219

EXIT STATUS

221       The following exit values are returned:
222
223       0
224
225           The command completed successfully.
226
227
228       1
229
230           The command exited due to an error.
231
232

ATTRIBUTES

234       See attributes(5) for descriptions of the following attributes:
235
236
237
238
239       ┌─────────────────────────────┬─────────────────────────────┐
240       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
241       ├─────────────────────────────┼─────────────────────────────┤
242       │Availability                 │SUNWcsu                      │
243       ├─────────────────────────────┼─────────────────────────────┤
244       │Interface Stability          │Committed                    │
245       └─────────────────────────────┴─────────────────────────────┘
246

SEE ALSO

248       boot(1M), installgrub(1M), attributes(5)
249
250
251       Consult the GRUB home page, under:
252
253         http://www.gnu.org/
254
255
256
257
258SunOS 5.11                        25 Apr 2008                      bootadm(1M)
Impressum