1 '\" te
   2 .\" Copyright 2012, Daniil Lunev. All rights reserved.
   3 .TH GRUBADM 1M "July 25, 2012"
   4 .SH NAME
   5 grubadm \- GRUB2 Illumos bootmenu manager
   6 .SH SYNOPSIS
   7 .LP
   8 .nf
   9 \fBgrubadm\fR [\fB--clone\fR] [\fB--new\fR] [\fB--delete\fR] [\fB--list\fR]
  10 [\fB\--helpfR] [\fB--all\fR] [\fB--enable-hyper\fR] [\fB--disable-hyper\fR]
  11 [\fB--get-name\fR] [\fB--get-uuid\fR] [\fB--get-pool\fR][\fB--get-dataset\fR]
  12 [\fBget-kernel\fR] [\fB--get-opts\fR] [\fB--get-modules\fR] [\fB--get-default\fR]
  13 [\fB--get-timeout\fR] [\fB--get-terminal\fR] [\fB--get-serial\fR] [\fB--get-all\fR]
  14 [\fB--default\fR] [\fB--set-name\fR \fIname\fR] [\fB--set-uuid\fR \fIuuid\fR]
  15 [\fB--set-pool\fR \fIpool\fR] [\fB--set-dataset\fR \fIdataset\fR]
  16 [\fB--set-kernel\fR \fIkernel\fR] [\fB--set-opts\fR \fIoptions\fR]
  17 [\fB--set-module\fR \fImodule\fR] [\fB--set-default\fR \fIdefault entry numder\fR]
  18 [\fB--set-timeout\fR \fItimeout\fR] [\fB--set-terminal\fR \fIterminals\fR]
  19 [\fB--set-serial\fR \fIserial\fR] [\fB--name\fR \fIname\fR] [\fB--uuid\fR \fIuuid\fR]
  20 [\fB--pool\fR \fIpool\fR] [\fB--dataset\fR \fIdataset\fR] [\fB--kernel\fR \fIkernel\fR]
  21 [\fB--module\fR \fImodule\fR] [\fB--number\fR \fInumber\fR]
  22 [\fB--alt-root\fR \fIalt-root\fR] [\fB--clear\fR]
  23 .fi
  24 
  25 .SH DESCRIPTION
  26 .sp
  27 .LP
  28 The command \fBgrubadm\fR is used to manipulate GRUB2 Illumos entries and GRUB2
  29 booting parameters. It modify only \fBillumos.cfg\fR and don't influence on entries
  30 that placed in different locations. If you want to see illumos entries in
  31 the GRUB2 boot menu, be sure that \fBgrub.cfg\fR contain line "illumos_entries 
  32 /@/boot/illumos.cfg".
  33 .SH OPTIONS
  34 .LP
  35 The following options are supported:
  36 .sp
  37 .ne 2
  38 .na
  39 \fB\fB--list\fR\fR
  40 .ad
  41 .sp .6
  42 .RS 4n
  43 List names of all entries and global parameters values
  44 .RE
  45 
  46 .sp
  47 .ne 2
  48 .na
  49 \fB\fB--delete\fR\fR
  50 .ad
  51 .sp .6
  52 .RS 4n
  53 Delete entry (don't stack with --clone, --new, --get-*, --set-*, 
  54 --enable-hyper, --disable-hyper)
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fB\fB--new\fR\fR
  61 .ad
  62 .sp .6
  63 .RS 4n
  64 Add new entry (don't stack with --clone, --delete, --all)
  65 .RE
  66 
  67 .sp
  68 .ne 2
  69 .na
  70 \fB\fB--default\fR\fR
  71 .ad
  72 .sp .6
  73 .RS 4n
  74 Fill entry with default values
  75 .RE
  76 
  77 .sp
  78 .ne 2
  79 .na
  80 \fB\fB--clone\fR\fR
  81 .ad
  82 .sp .6
  83 .RS 4n
  84 Clone existing entry (don't stack with --delete, --new, --all)
  85 .RE
  86 
  87 .sp
  88 .ne 2
  89 .na
  90 \fB\fB--clear\fR\fR
  91 .ad
  92 .sp .6
  93 .RS 4n
  94 Delete all entries
  95 .RE
  96 
  97 .sp
  98 .ne 2
  99 .na
 100 \fB\fB--help\fR\fR
 101 .ad
 102 .sp .6
 103 .RS 4n
 104 Show usage
 105 .RE
 106 
 107 .sp
 108 .ne 2
 109 .na
 110 \fB\fB--all\fR\fR
 111 .ad
 112 .sp .6
 113 .RS 4n
 114 Apply action to all appropriate entries
 115 .RE
 116 
 117 .sp
 118 .ne 2
 119 .na
 120 \fB\fB--number\fR\fR \fInumber\fR
 121 .ad
 122 .sp .6
 123 .RS 4n
 124 Get entry by number. If an unappropriate value are passed,
 125 default entry will be getted.
 126 .RE
 127 
 128 .sp
 129 .ne 2
 130 .na
 131 \fB\fB--name\fR\fR \fIname\fR
 132 .ad
 133 .sp .6
 134 .RS 4n
 135 Find entry by name
 136 .RE
 137 
 138 .sp
 139 .ne 2
 140 .na
 141 \fB\fB--uuid\fR\fR \fIuuid\fR
 142 .ad
 143 .sp .6
 144 .RS 4n
 145 Find entry by pool uuid
 146 .RE
 147 
 148 .sp
 149 .ne 2
 150 .na
 151 \fB\fB--pool\fR\fR \fIpool\fR
 152 .ad
 153 .sp .6
 154 .RS 4n
 155 Find entry by pool name
 156 .RE
 157 
 158 .sp
 159 .ne 2
 160 .na
 161 \fB\fB--dataset\fR\fR \fIdataset\fR
 162 .ad
 163 .sp .6
 164 .RS 4n
 165 Find entry by dataset
 166 .RE
 167 
 168 .sp
 169 .ne 2
 170 .na
 171 \fB\fB--kernel\fR\fR \fIkernel\fR
 172 .ad
 173 .sp .6
 174 .RS 4n
 175 Find entry by kernel
 176 .RE
 177 
 178 .sp
 179 .ne 2
 180 .na
 181 \fB\fB--module\fR\fR \fImodule\fR
 182 .ad
 183 .sp .6
 184 .RS 4n
 185 Find entry by module
 186 .RE
 187 
 188 .sp
 189 .ne 2
 190 .na
 191 \fB\fB--get-name\fR\fR
 192 .ad
 193 .sp .6
 194 .RS 4n
 195 Get entry name
 196 .RE
 197 
 198 .sp
 199 .ne 2
 200 .na
 201 \fB\fB--get-pool\fR\fR
 202 .ad
 203 .sp .6
 204 .RS 4n
 205 Get entry pool name
 206 .RE
 207 
 208 .sp
 209 .ne 2
 210 .na
 211 \fB\fB--get-uuid\fR\fR
 212 .ad
 213 .sp .6
 214 .RS 4n
 215 Get entry pool uuid
 216 .RE
 217 
 218 .sp
 219 .ne 2
 220 .na
 221 \fB\fB--get-dataset\fR\fR
 222 .ad
 223 .sp .6
 224 .RS 4n
 225 Get entry dataset
 226 .RE
 227 
 228 .sp
 229 .ne 2
 230 .na
 231 \fB\fB--get-kernel\fR\fR
 232 .ad
 233 .sp .6
 234 .RS 4n
 235 Get entry kernel line
 236 .RE
 237 
 238 .sp
 239 .ne 2
 240 .na
 241 \fB\fB--get-opts\fR\fR
 242 .ad
 243 .sp .6
 244 .RS 4n
 245 Get entry kernele opts
 246 .RE
 247 
 248 .sp
 249 .ne 2
 250 .na
 251 \fB\fB--get-modules\fR\fR
 252 .ad
 253 .sp .6
 254 .RS 4n
 255 Get entry modules
 256 .RE
 257 
 258 .sp
 259 .ne 2
 260 .na
 261 \fB\fB--get-default\fR\fR
 262 .ad
 263 .sp .6
 264 .RS 4n
 265 Get default entry number
 266 .RE
 267 
 268 .sp
 269 .ne 2
 270 .na
 271 \fB\fB--get-timeout\fR\fR
 272 .ad
 273 .sp .6
 274 .RS 4n
 275 Get timeout
 276 .RE
 277 
 278 .sp
 279 .ne 2
 280 .na
 281 \fB\fB--get-serial\fR\fR
 282 .ad
 283 .sp .6
 284 .RS 4n
 285 Get serial port configureation info
 286 .RE
 287 
 288 .sp
 289 .ne 2
 290 .na
 291 \fB\fB--get-terminal\fR\fR
 292 .ad
 293 .sp .6
 294 .RS 4n
 295 Get terminal
 296 .RE
 297 
 298 .sp
 299 .ne 2
 300 .na
 301 \fB\fB--get-all\fR\fR
 302 .ad
 303 .sp .6
 304 .RS 4n
 305 Get all information about appropriate entries
 306 .RE
 307 
 308 .sp
 309 .ne 2
 310 .na
 311 \fB\fB--set-name\fR\fR \fIname\fR
 312 .ad
 313 .sp .6
 314 .RS 4n
 315 Set entry name
 316 .RE
 317 
 318 .sp
 319 .ne 2
 320 .na
 321 \fB\fB--set-pool\fR\fR \fIpool\fR
 322 .ad
 323 .sp .6
 324 .RS 4n
 325 Set entry pool name
 326 .RE
 327 
 328 .sp
 329 .ne 2
 330 .na
 331 \fB\fB--set-uuid\fR\fR \fIuuid\fR
 332 .ad
 333 .sp .6
 334 .RS 4n
 335 Set entry pool uuid
 336 .RE
 337 
 338 .sp
 339 .ne 2
 340 .na
 341 \fB\fB--set-dataset\fR\fR \fIdataset\fR
 342 .ad
 343 .sp .6
 344 .RS 4n
 345 Set entry dataset
 346 .RE
 347 
 348 .sp
 349 .ne 2
 350 .na
 351 \fB\fB--set-kernel\fR\fR \fIkernel\fR
 352 .ad
 353 .sp .6
 354 .RS 4n
 355 Set entry kernel line
 356 .RE
 357 
 358 .sp
 359 .ne 2
 360 .na
 361 \fB\fB--set-opts\fR\fR \fIoptions\fR
 362 .ad
 363 .sp .6
 364 .RS 4n
 365 Set entry kernele opts
 366 .RE
 367 
 368 .sp
 369 .ne 2
 370 .na
 371 \fB\fB--set-module\fR\fR \fImodule\fR
 372 .ad
 373 .sp .6
 374 .RS 4n
 375 Set entry module (all earlier specified modules will be deleted,
 376 if you want to specify multiple modules, use several --set-module
 377 in a single command)
 378 .RE
 379 
 380 .sp
 381 .ne 2
 382 .na
 383 \fB\fB--set-default\fR\fR \fIdefault entry number\fR
 384 .ad
 385 .sp .6
 386 .RS 4n
 387 Set default entry number
 388 .RE
 389 
 390 .sp
 391 .ne 2
 392 .na
 393 \fB\fB--set-timeout\fR\fR \fItimeout\fR
 394 .ad
 395 .sp .6
 396 .RS 4n
 397 Set timeout
 398 .RE
 399 
 400 .sp
 401 .ne 2
 402 .na
 403 \fB\fB--set-serial\fR\fR \fIserial_port_params\fR
 404 .ad
 405 .sp .6
 406 .RS 4n
 407 Set serial port configureation info
 408 .RE
 409 
 410 .sp
 411 .ne 2
 412 .na
 413 \fB\fB--set-terminal\fR\fR \fIterminal\fR
 414 .ad
 415 .sp .6
 416 .RS 4n
 417 Set terminal
 418 .RE
 419 
 420 .sp
 421 .ne 2
 422 .na
 423 \fB\fB--enable-hyper\fR\fR
 424 .ad
 425 .sp .6
 426 .RS 4n
 427 Convert entry to boot with xen
 428 .RE
 429 
 430 .sp
 431 .ne 2
 432 .na
 433 \fB\fB--disable-hyper\fR\fR
 434 .ad
 435 .sp .6
 436 .RS 4n
 437 Convert entry from xen-mode to normal boot mod
 438 .RE
 439 
 440 .SH EXAMPLES
 441 .LP
 442 \fBExample 1\fR
 443 .sp
 444 .LP
 445 List all entries
 446 
 447 .sp
 448 .in +2
 449 .nf
 450 example% \fBgrubadm --list\fR
 451 .fi
 452 .in -2
 453 .sp
 454 
 455 .LP
 456 \fBExample 2\fR
 457 .sp
 458 .LP
 459 Add new entry with default paramters
 460 
 461 .sp
 462 .in +2
 463 .nf
 464 example% \fBgrubadm --new --default --set-name test\fR
 465 .fi
 466 .in -2
 467 .sp
 468 
 469 .LP
 470 \fBExample 3\fR
 471 .sp
 472 .LP
 473 Delete all entries with specified dataset
 474 
 475 .sp
 476 .in +2
 477 .nf
 478 example% \fBgrubadm --delete --all --dataset "rpool/ROOT/test_pool"\fR
 479 .fi
 480 .in -2
 481 .sp
 482 
 483 .LP
 484 \fBExample 4\fR
 485 .sp
 486 .LP
 487 Clone entry and set diffrent kernel options
 488 
 489 .sp
 490 .in +2
 491 .nf
 492 example% \fBgrubadm --clone --name test --set-name new_test --set-opt "-s"\fR
 493 .fi
 494 .in -2
 495 .sp
 496 
 497 .LP
 498 \fBExample 5\fR
 499 .sp
 500 .LP
 501 Change kernel and convert entry to hypervisor
 502 
 503 .sp
 504 .in +2
 505 .nf
 506 example% \fBgrubadm --name test --set-kernel "/platform/i86pc/kernel/unix" --enable-hyper\fR
 507 .fi
 508 .in -2
 509 .sp
 510 
 511 .LP
 512 \fBExample 6\fR
 513 .sp
 514 .LP
 515 Set up serial console
 516 
 517 .sp
 518 .in +2
 519 .nf
 520 example% \fBgrubadm --set-serial "--unit=0 --speed=9600" --set-terminal "serial"\fR
 521 .fi
 522 .in -2
 523 .sp
 524 
 525 .LP
 526 \fBExample 7\fR
 527 .sp
 528 .LP
 529 Get default entry number
 530 
 531 .sp
 532 .in +2
 533 .nf
 534 example% \fBgrubadm --get-default\fR
 535 .fi
 536 .in -2
 537 .sp
 538 
 539 .SH FILES
 540 .sp
 541 .ne 2
 542 .na
 543 /pool/boot/illumos.cfg
 544 .ad
 545 .sp .6
 546 .RS 4n
 547 Bootmenu file.
 548 .RE
 549 
 550 .SH NOTES
 551 grubadm is replacement of bootadm boot menu functionality for grub2. You can't
 552 use bootadm menu functionality on with GRUB2 as well as you can't use grubadm
 553 with GRUB-legacy.
 554