2008/760 Boot configuration Service

Sherry Moore sherry.moore at sun.com
Tue Dec 9 23:53:07 PST 2008


Hi Garrett,

> +1.

Very cool.  Thanks!  :)

> One question though: how do uadmin/reboot/etc get these settings?  (Also, 
> in a panic reboot, the uadmin commands are not involved, are they?  So how 
> does this setting get passed to the kernel?)  I realize these are 
> implementation details, hence the unconditional +1 above.  But it would 
> still be nice to have them anyway.

Excellent question!

When the service is started or refreshed, uadmin(1M) is invoked with
the newly added project private function AD_UPDATE_BOOT_CONFIG.  Upon
being called with this function, uadmin(1M) gathers up all the relevant
property settings in svc:/system/boot-config:default service into a
data structure and invokes uadmin(2) with a pointer to the data
structure.  uadmin(2) copies the information contained in the data
structure from userland into the kernel, and calls a kernel function.
The kernel function updates the kernel variables, and either loads a
backup kernel or frees the memory depending on the variable setting.

Whew, try saying all that in one breath. :)

For user-invoked reboot with "reboot(1M)" or "init(1M) 6", the code for
the commands has been modified to look up the property values using
libscf so it's more straightforward.

Hope that answers your question.

Thanks,
Sherry
--
Sherry Moore, Solaris Core Kernel	http://blogs.sun.com/sherrym



More information about the opensolaris-arc mailing list