Print this page
11581 'debug' loader option is a little obscure
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Rob Johnston <rob.johnston@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/boot/sys/boot/forth/beadm.4th.man.txt
          +++ new/usr/src/boot/sys/boot/forth/beadm.4th.man.txt
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3  
   4    4  
   5    5   This file and its contents are supplied under the terms of the  Common
   6    6  Development and Distribution License ("CDDL"), version 1.0.   You may only use
   7    7  this file in accordance with the terms of version  1.0 of the CDDL.   A full
   8    8  copy of the text of the CDDL should have accompanied this  source.  A copy of
   9    9  the CDDL is also available via the Internet at
  10   10  http://www.illumos.org/license/CDDL.
  11   11  
  12   12   Copyright 2017 Toomas Soome <tsoome@me.com>  Copyright 2019 OmniOS Community
  13      -Edition (OmniOSce) Association.
       13 +Edition (OmniOSce) Association.   Copyright 2019 Joyent, Inc.
  14   14  
  15   15   This module is implementing the beadm user command to support listing  and
  16   16  switching Boot Environments (BE) from command line and  support words to
  17   17  provide data for BE menu in loader menu system.   Note: this module needs an
  18   18  update to provide proper BE vocabulary.
  19   19  
  20   20  only forth also support-functions also file-processing also file-processing
  21   21  definitions also parser also line-reading definitions also builtins
  22   22  definitions
  23   23  
↓ open down ↓ 95 lines elided ↑ open up ↑
 119  119                      dup 5 + allocate if ENOMEM throw then                  0
 120  120  s" zfs:" strcat                    2swap strcat                  colon+
 121  121                 then                2dup s" currdev" setenv            drop
 122  122  free-memory         else                ." No such BE in menu.lst or menu.lst
 123  123  is missing." cr               exit           then      then
 124  124  
 125  125        reset BE menu      0 page_count !       need to do:   0 unload drop
 126  126       free-module-options       unset the env variables with kernel arguments
 127  127       s" acpi-user-options" unsetenv     s" boot-args" unsetenv   s" boot_ask"
 128  128  unsetenv  s" boot_single" unsetenv      s" boot_verbose" unsetenv     s"
 129      -boot_kmdb" unsetenv      s" boot_debug" unsetenv  s" boot_reconfigure"
 130      -unsetenv  start                load config, kernel and modules   ." Current
 131      -boot device: " s" currdev" getenv type cr ;
      129 +boot_kmdb" unsetenv      s" boot_drop_into_kmdb" unsetenv   s"
      130 +boot_reconfigure" unsetenv    start                load config, kernel and
      131 +modules   ." Current boot device: " s" currdev" getenv type cr ;
 132  132  
 133  133   beadm list [device]  beadm activate BE [device] | device  lists BE's from
 134  134  current or specified device /boot/menu.lst file  activates specified BE by
 135  135  unloading modules, setting currdev and  running start to load configuration.
 136  136  : beadm ( -- ) ( throws: abort )   0= if ( interpreted ) get_arguments then
 137  137  
 138  138       dup 0= if           ." Usage:" cr       ." beadm activate {beName
 139  139  [device] | device}" cr        ." beadm list [device]" cr         ." Use lsdev
 140  140  to get device names." cr           drop exit      then       First argument is
 141  141  0 when we're interprated.  See support.4th    for get_arguments reading the
↓ open down ↓ 124 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX