I am sponsoring this case for myself.  I believe it qualifies
for self-review with automatic approval and I've marked it as
such, but if anyone disagrees, it can be promoted to a fast-track.
I am requesting minor/patch binding for this change.



Background
----------
The boot architecture introduced by PSARC 2004/454 was originally
only implemented on x86, with bootadm(1M) hard-wired to manage
only x86 platforms, either natively or as a diskless client on
a server.   PSARC 2006/525 introduced the same boot architecture
on sparc, modifying bootadm(1M) to manage boot administration on
either sparc or x86.

Problem
-------
With the sparc introduction of the new boot architecture, bootadm
can no longer be used to manage a diskless client of a platform
implementation other than the server.  Bootadm(1M) presently assumes
the client is of the same platform implementation as the server.
The platform implementation needs to be made explicit as a client's
implementation cannot be intuited from a client's root path alone.


Proposal
----------
Support a command-line argument to bootadm(1M) to specify the client's
platform implementation for boot administration of a client.

Analogous updates to the create_ramdisk and extract_boot_filelist
utilities, invoked by bootadm, are needed.

The diskless administration tools such as smosservice(1M) are
aware of a client's platform and can invoke bootadm appropriately.
The miniroot construction process uses the root_archive tool
and would not be impacted by this change.

Minor release/patch binding is requested.


Interfaces
----------
________________________________________________________________________________
|                             Interfaces Exported                              |
|______________________________|________________|______________________________|
|Interface                     |  Classification|  Comments                    |
|______________________________|________________|______________________________|
|                              |                |                              |
|bootadm(1M)                   |  Stable        |                              |
|  -p platform                 |  Stable        |  diskless client management  |
|                              |                |                              |
|create_ramdisk:               |  Cons. Priv.   |                              |
|  -p platform                 |  Cons. Priv.   |  diskless client management  |
|                              |                |                              |
|extract_boot_filelist:        |  Cons. Priv.   |                              |
|  -p platform                 |  Cons. Priv.   |  diskless client management  |
|______________________________|________________|______________________________|



References
----------

        PSARC 2005/198 Install Interface Changes Under New Boot
        PSARC 2004/454 Solaris Boot Architecture


Documentation
-------------


System Administration Commands                        bootadm(1M)



NAME
     bootadm - manage bootability of GRUB-enabled operating  sys-
     tem

SYNOPSIS
-     /sbin/bootadm update-archive [-vn] [-R altroot]
+     /sbin/bootadm update-archive [-vn] [-R altroot] [-p platform]


-     /sbin/bootadm list-archive [-vn] [-R altroot]
+     /sbin/bootadm list-archive [-vn] [-R altroot] [-p platform]


      x86 only


-     /sbin/bootadm set-menu [-R altroot] key=value
+     /sbin/bootadm set-menu [-R altroot] [-p platform] key=value


-     /sbin/bootadm list-menu [-R altroot]
+     /sbin/bootadm list-menu [-R altroot] [-p platform]


DESCRIPTION
     The bootadm command manages the boot archive and,  with  x86
     boot environments, the GRUB (GRand Unified Bootloader) menu.
     The update-archive option provides a way for user to  update
     the  boot  archive as a preventative measure or as part of a
     recovery procedure. The set-menu subcommand  allows  you  to
     switch  the  auto-boot timeout and default boot entry in the
     GRUB menu.


     The list-menu subcommand displays the location of  the  GRUB
     menu  and  the  current GRUB menu entries. While the typical
     location of the GRUB menu is /boot/grub/menu.lst,  depending
     on  the  install  method  used the active GRUB menu might be
     located somewhere else.  Use  the  list-menu  subcommand  to
     locate  the  active  GRUB menu. For example, if a system was
     installed using Live Upgrade, the GRUB  menu  might  not  be
     located  in  the  current boot environment. See the EXAMPLES
     section for typical output from the list-menu option.


     Note that OpenBoot PROM (OBP)-based machines, such as  SPARC
     systems, do not use GRUB and have no boot menu manageable by
     bootadm.


     The bootadm command determines dynamically the options  sup-
     ported  by  the image to be managed, so that bootadm invoked
     on one platform can be used to manage diskless clients of  a
     different platform type.


SUBCOMMANDS
     The bootadm command has the following subcommands:

     update-archive

         Updates current boot archive  if  required.  Applies  to
         both SPARC and x86 platforms.


     list-archive

         Lists the files and directories to be  included  in  the
         boot archive. Applies to both SPARC and x86 platforms.


     set-menu

         Maintain  the  GRUB  menu.  The  current  GRUB  menu  is
         boot/grub/menu.lst,  relative  to root. Do not depend on
         this location, because it is subject to change.  Applies
         to x86 platforms only.


     list-menu

         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.


OPTIONS
     The bootadm command has the following options:

     -v

         In  an  update-archive  operation,   stale   files   are
         displayed on stderr.


     -n

         In  an  update-archive  operation,  archive  content  is
         checked but not updated.


     -R altroot

         Operation is applied to an alternate root path.

         Note -
           The root file system of any non-global zones must  not
           be  referenced with the -R option. Doing so might dam-
           age 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 zones(5).
+
+     -p platform
+
+         The platform, or machine hardware class, of the client.
+         The platform type can only be specified together with
+         -R, and is designed for use when managing a diskless
+         client where the client is of a different platform
+         hardware class than the server.  Currently supported
+         platform classes are i86pc, sun4u and sun4v.
+
     key=value

         Possible values are:

         default=entrynum

             The item number (for example, 0, 1,  or  2)  in  the
             GRUB  menu  designating the operating system to boot
             when the timer expires.


         timeout=seconds

             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.



EXAMPLES
     Example 1 Updating the Current Boot Archive


     The following command updates the current boot archive:


       # bootadm update-archive


     Example 2 Updating the Boot Archive on an Alternate Root


     The following command updates the boot archive on an  alter-
     nate root:


       # bootadm update-archive -R /a


     Example 3 Listing Installed OS Instances


     The following command lists the installed  operating  system
     instances in a GRUB menu:

       # bootadm list-menu

       default=0
       timeout=10
       (0) Solaris10
       (1) Solaris10 Failsafe
       (2) Linux


     Example 4 Switching Default Boot Entry


     The following command refers to the menu  displayed  in  the
     previous example. The user selects Linux (item 2).


       # bootadm set-menu default=2


     Example 5 Listing GRUB Menu Entries  and  Location  of  GRUB
     Menu


     The following command lists the GRUB menu  entries  and  the
     location of the GRUB menu:


       # 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


     Example 6 Displaying Location of GRUB Menu


     The following command displays  the  location  of  the  GRUB
     menu:


       # 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


     In this example, the active GRUB menu is located on a device
     which  is  not  mounted.  To access the GRUB menu, mount the
     device     and     access     the     GRUB      menu      at
     <mountpoint>/boot/grub/menu.lst.


EXIT STATUS
     The following exit values are returned:

     0

         The command completed successfully.


     1

         The command exited due to an error.


ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsu                     |
    |_____________________________|_____________________________|
    | Interface Stability         | Committed                   |
    |_____________________________|_____________________________|


SEE ALSO
     boot(1M), installgrub(1M), attributes(5)


     Consult the GRUB home page, under:

       http://www.gnu.org/


Reply via email to