[ConsoleKit] extend ConsoleKit to support fast reboot on OpenSolaris x86

David Zeuthen zeuthen at gmail.com
Wed Sep 9 06:51:41 PDT 2009


Hey Jedy,

On Mon, Sep 7, 2009 at 4:46 AM, Jedy Wang<Jedy.Wang at sun.com> wrote:
> Hi all,
>
> I am a developer from SUN Microsystems. Now OpenSolaris x86 supports a
> new feature called "Fast Reboot" which can skip BIOS and reboot directly
> to a boot environment(a bootable OpenSolaris installation). For details,
> you can refer to
> http://www.opensolaris.org/os/project/intel-platform/fastreboot/fastrebootdocs/;jsessionid=5DB98E4F0A5C6D99B8CDAD3D9C1CD356.

This looks pretty nifty.

> I am working on adding fast reboot support for the restart dialog. In
> order to accomplish this and because ConsoleKit provide the
> functionality to reboot a system, I think ConsoleKit should be extended
> to support fast reboot. Our plan is to:
>
> 1) add a checkbox to the restart dialog which indicating to do a fast
> reboot or a normal reboot.
>
> 2) add a list of radio buttons with every radio button representing a
> boot environment.

If 'fast reboot' is available, why would I even want slow (e.g.
'normal reboot')?

(Yes, I'm playing the devils advocate here)

> And here is 2 options we currently have:
>
> 1) Add 2 DBus methods, "GetRestartOptions" and "SetRestartOptions".
> GetRestartOptions can be used to retrieve all options which can be used
> in reboot. In my use case, these options include "Type" whose value is
> "Fast" and "BE" whose value is a list of boot environments
> ("BE1,BE2,BE3"), if they are supported. And according to the options
> returned by "GetRestartOptions", one can use "SetRestartOptions" to set
> the options to control the behavior of reboot.
>
> For example, if we want to fast reboot to a boot environment called
> "BE1", we can use "SetRestartOptions Type:Fast BE:BE1" and then call
> "Restart".

This sounds racy.

> 2) Add 1 DBus method, "RestartWithOptions".This method takes the same
> options as option 1. Compared to option 1, this option is easy to
> implement. But because there is no "GetRestartOptions", you do not know
> which option is supported for your system and you have to take care of
> this problem in your code.
>
> Comments are welcomed.

I think this is sorta-kinda conflating boot loader configuration
(something people rarely need to do) with restart/shutdown (something
people often need to do).

Now, as far as I know, there is currently no cross-platform
cross-bootloader configuration tool - in Fedora we have something
called system-config-boot a GTK+ UI, see

 http://people.freedesktop.org/~david/system-config-boot.png

but (AFAIK) this tool it only handles GRUB and it also (AFAIK) relies
on Fedora-specific stuff like grubby(8).

It would be nice to have a cross-platform cross-bootloader
configuration tool (split into a DE- and OS-agnostic mechanism that
runs on Linux/Solaris/whatever with a GTK+/Qt/text/whatever UI on top)
but I don't think ConsoleKit should be that thing.

So my view is that

 - the bootloader configuration should not be part of ConsoleKit

 - we don't want to ask the user if they want 'fast' or 'slow' reboot
- from a 50,000 point of view it just doesn't make any sense to ask
for 'slow' if 'fast' is available

 - we might want "Startup Disk" button in the shutdown/restart dialog
that launches said bootloader configuration tool (or rather: we
probably don't since it is so uncommon to want to change this)

Thanks,
David


More information about the ConsoleKit mailing list