libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-19 Thread Jerry Gilliam


This fast-track has expired so I am now marking this case
as closed approved.


-jg




libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-13 Thread Konstantin Ananyev
Hi Rick,
> In your examples (4.1.2), you cite:
>init 6 
>
> Would init 6 3, select the 3rd set of bootargs?
No, "init 6 3" will not select the 3rd set of bootargs, because
init(1M) only takes one argument.

# init 6 3
Usage: init [0123456SsQqabc]
>
>
> Does the nth entry in the Grub menu correspond to that in the
> "bootadm list-menu" command?
That's right.
Thanks
Konstantin





libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-13 Thread Rick Matthews
In your examples (4.1.2), you cite:
init 6 

Would init 6 3, select the 3rd set of bootargs?

Does the nth entry in the Grub menu correspond to that in the
"bootadm list-menu" command?

-- 
-
Rick Matthews   email: Rick.Matthews at sun.com
Sun Microsystems, Inc.  phone:+1(651) 554-1518
1270 Eagan Industrial Road  phone(internal): 54418
Suite 160   fax:  +1(651) 554-1540
Eagan, MN 55121-1231 USAmain: +1(651) 554-1500  
-




libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-13 Thread Konstantin Ananyev
Actually after extensive discussions with other project teams, we have 
decided to ship the header file too.
Thanks
Konstantin
> Hi Rainer,
>
> Ok, as there no need to deliver them,
> neither the .so nor the .h file will be shipped in the product.
> Thanks
> Konstantin
>> Jerry Gilliam  writes:
>>
>>  
>>> 4.5. Interfaces:
>>>
>>> Minor binding only.
>>> 
>>> INTERFACE   COMMITMENT LEVEL
>>> =   
>>> /lib/libgrubmgmt.so.1consolidation private
>>> /lib/libgrubmgmt.soconsolidation private
>>> /usr/include/libgrubmgmt.hconsolidation private
>>> SUNWgrubuconsolidation private
>>> 
>>
>> Should the .so symlink and the include file be delivered at all while 
>> this
>> is still consolidation private?
>>
>>  
>>> 4.6. Doc Impact:
>>> 
>> [...]
>>  
>>> 4.6.2 New man pages for libgrubmgmt
>>>
>>>  See appendix A.
>>> 
>>
>> Same here: in particular, the proposed man pages conflicts with the
>> commitment level proposed above:
>>
>>  
>>> ATTRIBUTES
>>>  See attributes(5) for descriptions of the  following  attri-
>>>  butes:
>>>
>>>  
>>> |   ATTRIBUTE TYPE|   ATTRIBUTE VALUE   |
>>> |_|_|
>>> | Interface Stability | Evolving|
>>> |_|_|
>>> 
>>
>> So what is it?  Evolving or Consolidation Private?
>>
>> Rainer
>>
>>   
>
>




libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-12 Thread Konstantin Ananyev
Hi Rainer,

Ok, as there no need to deliver them,
neither the .so nor the .h file will be shipped in the product.
Thanks
Konstantin
> Jerry Gilliam  writes:
>
>   
>> 4.5. Interfaces:
>>
>>  Minor binding only.
>>  
>>  INTERFACE   COMMITMENT LEVEL
>>  =   
>>  /lib/libgrubmgmt.so.1   consolidation private
>>  /lib/libgrubmgmt.so consolidation private
>>  /usr/include/libgrubmgmt.h  consolidation private
>>  SUNWgrubu   consolidation private
>> 
>
> Should the .so symlink and the include file be delivered at all while this
> is still consolidation private?
>
>   
>> 4.6. Doc Impact:
>> 
> [...]
>   
>>  4.6.2 New man pages for libgrubmgmt
>>
>>   See appendix A.
>> 
>
> Same here: in particular, the proposed man pages conflicts with the
> commitment level proposed above:
>
>   
>> ATTRIBUTES
>>  See attributes(5) for descriptions of the  following  attri-
>>  butes:
>>
>>  
>> |   ATTRIBUTE TYPE|   ATTRIBUTE VALUE   |
>> |_|_|
>> | Interface Stability | Evolving|
>> |_|_|
>> 
>
> So what is it?  Evolving or Consolidation Private?
>
>   Rainer
>
>   




libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-12 Thread Ethan Quach


Rainer Orth wrote:
> Jerry Gilliam  writes:
> 
>> 4.5. Interfaces:
>>
>>  Minor binding only.
>>  
>>  INTERFACE   COMMITMENT LEVEL
>>  =   
>>  /lib/libgrubmgmt.so.1   consolidation private
>>  /lib/libgrubmgmt.so consolidation private
>>  /usr/include/libgrubmgmt.h  consolidation private
>>  SUNWgrubu   consolidation private
> 
> Should the .so symlink and the include file be delivered at all while this
> is still consolidation private?

The BE tools in OpenSolaris could make use of this sooner rather
than later, so it'd be nice if the headers were there.


-ethan



libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-12 Thread Rainer Orth
Jerry Gilliam  writes:

> 4.5. Interfaces:
> 
>   Minor binding only.
>   
>   INTERFACE   COMMITMENT LEVEL
>   =   
>   /lib/libgrubmgmt.so.1   consolidation private
>   /lib/libgrubmgmt.so consolidation private
>   /usr/include/libgrubmgmt.h  consolidation private
>   SUNWgrubu   consolidation private

Should the .so symlink and the include file be delivered at all while this
is still consolidation private?

> 4.6. Doc Impact:
[...]
>   4.6.2 New man pages for libgrubmgmt
> 
>See appendix A.

Same here: in particular, the proposed man pages conflicts with the
commitment level proposed above:

> ATTRIBUTES
>  See attributes(5) for descriptions of the  following  attri-
>  butes:
> 
>  
> |   ATTRIBUTE TYPE|   ATTRIBUTE VALUE   |
> |_|_|
> | Interface Stability | Evolving|
> |_|_|

So what is it?  Evolving or Consolidation Private?

Rainer

-- 
-
Rainer Orth, Faculty of Technology, Bielefeld University



libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-12 Thread Jerry Gilliam


>
>Same here: in particular, the proposed man pages conflicts with the
>commitment level proposed above:
>
>> ATTRIBUTES
>>  See attributes(5) for descriptions of the  following  attri-
>>  butes:
>> 
>>  
>> |   ATTRIBUTE TYPE|   ATTRIBUTE VALUE   |
>> |_|_|
>> | Interface Stability | Evolving|
>> |_|_|
>
>So what is it?  Evolving or Consolidation Private?
>
>   Rainer
>


The above is boiler-plate from the man page format and shouldn't
have been included here in the spec.


-jg




libgrubmgmt - library for GRUB menu management [PSARC/2009/092 02/18/2009]

2009-02-11 Thread Jerry Gilliam


I am submitting the following fast-track on behalf of Konstanin Ananyev
and Sherry Moore.  Minor release binding is requested.  The timeout is
set for 02-18-2009.

-jg

1. Introduction
   1.1. Project/Component Working Name:
Introducing libgrubmgmt library for GRUB menu management.

   1.2. Name of Document Author/Supplier:
Konstantin Ananyev

   1.3. Date of This Document:
01/07/2009

1.3.1. Date this project was conceived:
06/01/2008

2. Project Summary

2.1. Project Description:

This project will provide a library to process the GRUB menu.  The
library libgrubmgmt provides APIs to locate the active menu.lst,
parse it and interpret GRUB menu entries.

2.2 Risks and Assumptions:

This project has dependencies on stable GRUB menu format for
Solaris.

4. Technical Description:

4.1. Details:

The library libgrubmgmt provides APIs to locate the active
menu.lst, parse the menu and interpret GRUB menu entries.  It
will interpret the following GRUB menu entry commands:
findroot, bootfs, kernel, kernel$, module, module$.

When Fast Reboot is enabled either by setting the
"config/fastreboot_default" property in "system/boot-config"
service to "true", or by invoking reboot(1M) with the "-f"
option directly, the library will be used by commands
reboot(1M) or init(1M) 6 to extract boot arguments associated
with the default or specified menu entry from menu.lst.  If
libgrubmgmt fails to interpret the GRUB menu entry, reboot(1M)
and init(1M) would fall back to the regular reboot behavior.

4.1.1 APIs and Consumers

With initial integration, the consumers of the library are
reboot(1M) and init(1M) on x86.  They are only using the 
two of the interfaces listed in section 4.5 Interfaces

grub_get_boot_args()
grub_cleanup_boot_args()

Other utilities that manipulate GRUB menus, such as
bootadm(1M), can be modified to leverage this library, at
which point additional interfaces can be ARC'ed.

4.1.2 Examples

On systems with "config/fastreboot_default" set to "true":

# reboot
# init 6
Fast reboot with bootargs from the default GRUB menu
entry.

# reboot 3
Fast reboot with bootargs from the 3rd GRUB menu entry.

For example for the following default GRUB menu entry:

title benew1
findroot (BE_benew1,0,a)
bootfs rpool/ROOT/benew1
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

# reboot

is equivalent to:

# reboot -f -- rpool/ROOT/benew1 \
/platform/i86pc/kernel/amd64/unix  \
-B zfs-bootfs=rpool/ROOT/benew1,\
bootpath="/pci at 0,0/pci10de,5c at 9/pci108e,4131 at 1/sd at 
0,0:a"

4.2. Bug/RFE Number(s):

6768468 Introducing svc:/system/boot-config service
6775160 reboot -f ignores active BE and resets zfs pool bootfs property

4.5. Interfaces:

Minor binding only.

INTERFACE   COMMITMENT LEVEL
=   
/lib/libgrubmgmt.so.1   consolidation private
/lib/libgrubmgmt.so consolidation private
/usr/include/libgrubmgmt.h  consolidation private
SUNWgrubu   consolidation private

grub_get_boot_args()consolidation private
grub_cleanup_boot_args()consolidation private
grub_strerror() consolidation private

4.6. Doc Impact:

Man pages for reboot(1M) needs to be modified.

4.6.1 Man pages for reboot(1M) 

 Example 3 Fast Rebooting

 The following examples use the  f  option  to  perform  fast
 reboots.

 The following command reboots to the default entry in the grub   |
 menu file menu.lst.  |

   example# reboot -f

4.6.2 New man pages for libgrubmgmt

 See appendix A.
 
4.7. Admin/Config Impact

The System Administration Guide needs to be updated to reflect
the change in the behavior when no command line arguments are
provided to reboot(1M).

6. Resources and Schedule:
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
ON
6.5. ARC review type: FastTrack
6.6. ARC Exposure: open


Appendix A

GRUB Menu Management Library Functions
   grubmgmt(3GRUBMGMT)

NAME
 grub_get_boot_args - collect boot argument from the specified GRUB
 menu en